Why pushing more than 3 MPLS headers on a packet results in the packet not being forwarded?

234 views Asked by At

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

Any explanation will be appreciated

1

There are 1 answers

0
Jon On

For version 2.4.0 lib/flow.h contains a variable called FLOW_MAX_MPLS_LABELS which defines the maximum number of mpls supported in a stack. The value is set to 3

https://github.com/openvswitch/ovs/blob/v2.4.0/lib/flow.h

#define FLOW_MAX_MPLS_LABELS 3

For later version you should check but they will probably take a similar approach, limiting to 3 mpls in the code.