Vishlesh Patel
Vishlesh Patel

Reputation: 168

Why Packets are not forwarded from ovs switch(version 2.3.1) after an MPLS header is pushed?

I am creating the ryu app to push and pop mpls labels. Here is the flow entries at ovs (version 2.3.1) switch s1:

root@ubuntu:~# sudo ovs-ofctl -O  OpenFlow14 dump-flows s1
OFPST_FLOW reply (OF1.4) (xid=0x2):
 cookie=0x0, duration=190.991s, table=0, n_packets=123, n_bytes=21852, priority=0 actions=CONTROLLER:65535
 cookie=0x0, duration=190.991s, table=0, n_packets=0, n_bytes=0, priority=10,mpls,in_port=2,mpls_label=80 actions=pop_mpls:0x0800,output:1
 cookie=0x0, duration=190.991s, table=0, n_packets=152, n_bytes=14896, priority=10,ip,in_port=1 actions=push_mpls:0x8847,set_field:80->mpls_label,output:2

Anyone knows why Packets are not forwarded even the flow entry is matched. cause if i open the wireshark and see s1-eth2 to check for mpls headers then no packet with mpls header or ethertype = 0x8847 is detected.

Only packets i see at s1-eth2 are ICMPv6(router solicitation message) ,DHCP and MDNS. any of them aren't related to ping i am sending from host 1 to h2. My topology : h1-s1-s2-h2

Do my code has bugs or it is the bug in ovs or openflow_v1.4 ryu?

Thanks.

Upvotes: 1

Views: 1353

Answers (3)

sinhayash
sinhayash

Reputation: 2803

Works for upto 2 labels in the stack in OvS 2.5.1. Perhaps error is in Ryu app. Can you post the code?

MPLS header stacks are limited to size 3. Pushing more than 3 MPLS headers on a packet results in the packet not being forwarded in Open vSwitch.

sudo mn --topo single,2 --switch ovsk
mininet> h1 ping h2

Installed a minimal set of flow entries on s1:

sudo ovs-ofctl -O OpenFlow13 add-flow s1 in_port=1,actions=push_mpls:0x8847,push_mpls:0x8847,push_mpls:0x8847,push_mpls:0x8847,output:2
sudo ovs-ofctl -O OpenFlow13 add-flow s1 in_port=2,actions=push_mpls:0x8847,push_mpls:0x8847,push_mpls:0x8847,push_mpls:0x8847,output:1

Flow entries are correctly matched. sudo ovs-ofctl -O OpenFlow13 dump-flows s1 | grep -o "n_packets=\w*" Yet no packets leave s1 confirmed by sudo tcpdump -ni s1-eth2

Upvotes: 0

emj306
emj306

Reputation: 1

Do you process the ARP requests and ARP replys?

Two ways to process the ARP packets:

  1. keep your flow tables unchanged, the ARP packets are forwarded to the controller. Let the controller processes the ARP.
  2. change the flow table.

add the last one

root@ubuntu:~# sudo ovs-ofctl -O  OpenFlow14 dump-flows s1
OFPST_FLOW reply (OF1.4) (xid=0x2):
cookie=0x0, duration=190.991s, table=0, n_packets=123, n_bytes=21852, priority=0 actions=CONTROLLER:65535
cookie=0x0, duration=190.991s, table=0, n_packets=0, n_bytes=0, priority=10,mpls,in_port=2,mpls_label=80 actions=pop_mpls:0x0800,output:1
cookie=0x0, duration=190.991s, table=0, n_packets=152, n_bytes=14896, priority=10,ip,in_port=1 actions=push_mpls:0x8847,set_field:80->mpls_label,output:2
cookie=0x0, duration=190.991s, table=0, n_packets=152, n_bytes=14896, priority=10,arp,in_port=1 actions=push_mpls:0x8847,set_field:80->mpls_label,output:2

Upvotes: 0

Abhishek
Abhishek

Reputation: 283

There were few MPLS fixed pushed in branch 2.4, Can you try it on master or branch 2.4?

Upvotes: 0

Related Questions