Discussion:
[Ryu-devel] dl_vlan not matched
Tahereh Yaghoubi
2017-06-19 07:49:04 UTC
Permalink
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
Fujimoto Satoshi
2017-06-20 04:58:10 UTC
Permalink
Hi, Tahereh
Post by Tahereh Yaghoubi
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
Post by Tahereh Yaghoubi
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
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
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!
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
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Tahereh Yaghoubi
2017-06-20 05:16:48 UTC
Permalink
​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 <
Post by Fujimoto Satoshi
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
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
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
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
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!
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
_______________________________________________
--
Tahereh Yaghoubi
Fujimoto Satoshi
2017-06-21 01:33:54 UTC
Permalink
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
Post by Tahereh Yaghoubi
​Hi, Satoshi
Packet destination is not changed and I can see it in the wireshark.
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_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
Hi, Tahereh
Post by Tahereh Yaghoubi
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'
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
Post by Tahereh Yaghoubi
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
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
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!
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
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
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Fujimoto Satoshi
2017-06-23 01:31:20 UTC
Permalink
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
​​
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
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
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
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
Post by Tahereh Yaghoubi
​Hi, Satoshi
Packet destination is not changed and I can see it in the wireshark.
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_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
Hi, Tahereh
Post by Tahereh Yaghoubi
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,
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
Post by Tahereh Yaghoubi
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_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
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!
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
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
https://lists.sourceforge.net/lists/listinfo/ryu-devel
<https://lists.sourceforge.net/lists/listinfo/ryu-devel>
--
Tahereh Yaghoubi
Loading...