Hi, Tahereh
Please keep our mailing list. :)

Sorry, I couldn't run your app "BackupRules.py" well.
I got the following error, and no group was installed to switches.

OpenFlowBackupRules: Exception occurred during handler processing. Backtrace from offending handler [packet_in_handler] servicing event [EventOFPPacketIn] follows.
Traceback (most recent call last):
File "/home/fujimoto/ryu/.tox/py27/local/lib/python2.7/site-packages/ryu/base/app_manager.py", line 290, in _event_loop
    handler(ev)
File "/home/fujimoto/ryu/ryu/app/BackupRules.py", line 284, in packet_in_handler
    flood()
  File "/home/fujimoto/ryu/ryu/app/BackupRules.py", line 184, in flood
    ports += [p.port_no for p in switch.ports if
AttributeError: 'dict' object has no attribute 'ports'

From your information, I suspect the cause may be in packets or switches.
Please confirm the following things:
* The packet which is send from s2 is vlan-tagged
* port 3 in s5 is up

By the way, looking at your topology (second_test_topo.py),
I think there is only one path to go to host2 from s5 (s5 -> s6 -> h2),
so there is no need to use Fast-Failover groups at s5, right?
Using simple flows may solve this problem (but it is not a fundamental solution...).


Thanks,
Fujimoto

On 2017年06月22日 21:22, Tahereh Yaghoubi wrote:
​​
Hi, ​Satoshi

I appreciate your response to my question. I was working on my problem, now I guessrules match correctly and the output action does not work.

I attached my Ryu code and mininet topology. when I do "link s2 s3 down" , the packet goes to s5 and matches with this rule:

     cookie=0x0, duration=208.326s, table=0, n_packets=0, n_bytes=0,
    vlan_tci=0x1000/0x1000,dl_dst=10:00:00:00:00:02 actions=group:6



but in the group table 6 of s5, output action doesn't work:

     
group_id=6,type=ff,*bucket=watch_port:3,actions=output:3*,bucket=watch_port:1,actions=output:1,set_field:4422->vlan_vid



in my simulation, two hosts ping each otherin normal state. also when I do " link s1 s2 down", main path will be changed correctly.

I'm using openflow 1.3, Ryu 4.2, ovs 2.5, mininet 2.1. Also, I tried the app with mininet 2.2 and ovs 2.7 , but the result was similar.


Many thank for your assistance.
--Tahereh


On Wed, Jun 21, 2017 at 6:03 AM, Fujimoto Satoshi <satoshi.fujimo...@gmail.com <mailto:satoshi.fujimo...@gmail.com>> wrote:

    Hi, Tahereh

    Umm, that sounds strange for me...

    Could you give me the source code of your app?
    If so, I try to reproduce your situation and find out what is
    going wrong.

    Thanks,
    Fujimoto


    On 2017年06月20日 14:16, Tahereh Yaghoubi wrote:
    ​Hi, Satoshi

    Packet destination is not changed and I can see it in the wireshark.

    The packet in the first node is matched with this rule:

    flow entry:
     cookie=0x0, duration=10.280s, table=0, n_packets=0, n_bytes=0,
     vlan_tci=0x1000/0x1000,dl_dst=10:00:00:00:00:02 actions=group:6

    group entry:
     group_id=6,type=ff,bucket=watch_port:1,actions=output:1,
     bucket=watch_port:2,actions=output:2,set_field:4162->vlan_vid

    but in the next node it is dropped.

    Thanks


    On Tue, Jun 20, 2017 at 9:28 AM, Fujimoto Satoshi
    <satoshi.fujimo...@gmail.com
    <mailto:satoshi.fujimo...@gmail.com>> wrote:

        Hi, Tahereh

        I capture the input port of next node in wireshark, vlan_id
        is correct, but the packet is dropped!

        Could you check 'dl_dst' in the packet, too?
        The rule you installed seems to have two match fields,
        'dl_vlan' and 'dl_dst':

        cookie=0x0, duration=1447.496s, table=0, n_packets=0,
        n_bytes=0,
        priority=32770,dl_vlan=198,dl_dst=10:00:00:00:00:02
        actions=output:2
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        So packets will be dropped unless it satisfies all of these
        match fields.

        Thanks,
        Fujimoto


        On 2017年06月19日 16:49, Tahereh Yaghoubi wrote:
        Hi,

        I'm trying to implement a Ryu app that calculates main and
        backup paths and save their rules in flow & group tables.
        in my code I need to use vlan_id for tagging packets in
        group table actions like this:

        
group_id=6,type=ff,bucket=weight:0,watch_port:2,actions=output:2,bucket=weight:0,watch_port:1,actions=output:1,set_field:4358->vlan_vid

        when i down port 2 (in mininet) , it adds vlan_id= 198 and
        sends the packet from port 1, but in the next ​node the
        packet does not match with this rule:

        cookie=0x0, duration=1447.496s, table=0, n_packets=0,
        n_bytes=0,
        priority=32770,dl_vlan=198,dl_dst=10:00:00:00:00:02
        actions=output:2


        I capture the input port of next node in wireshark, vlan_id
        is correct, but the packet is dropped!


        my Ryu code is like this:
        buckets.append(parser.OFPBucket(watch_port=_port,actions=[
             parser.OFPActionOutput(_port),
             parser.OFPActionSetField(vlan_vid=ofp.OFPVID_PRESENT | failure_id)
        ]))
        match =parser.OFPMatch(vlan_vid=(failure_id | 
ofp.OFPVID_PRESENT),eth_dst=dst_)
        Thanks in advance
        -Tahereh



        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org!http://sdm.link/slashdot


        _______________________________________________
        Ryu-devel mailing list
        Ryu-devel@lists.sourceforge.net
        <mailto:Ryu-devel@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/ryu-devel
        <https://lists.sourceforge.net/lists/listinfo/ryu-devel>




-- Tahereh Yaghoubi


    
------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org!http://sdm.link/slashdot


    _______________________________________________
    Ryu-devel mailing list
    Ryu-devel@lists.sourceforge.net
    <mailto:Ryu-devel@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/ryu-devel
    <https://lists.sourceforge.net/lists/listinfo/ryu-devel>




--
Tahereh Yaghoubi

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to