[ovs-discuss] MPLS double POP bug?

Ben Pfaff blp at nicira.com
Wed Nov 12 00:19:19 UTC 2014


Pravin, I think you mentioned that you were doing some work on
bug-fixing in MPLS.  Does it sound like it has any relationship to
this bug reported by Stefano?

On Tue, Nov 11, 2014 at 11:25:34PM +0100, Stefano Salsano wrote:
> Hi,
> 
> we need to POP out two MPLS labels in an egress node and then send
> out the packet as plain IP packet, but apparently this is not
> working in Open vSwitch v2.390 operating in kernel mode
> 
> We have replicated the problem in a simple mininet setup (script
> attached) with four nodes connected as follows:
> 
> h1---peo1----peo2---h2
> h1 source node, peo1 ingress node, peo2 egress node, h2 dest node
> 
> - h1 pings h2 (automatic static arp table are used, so there is no ARP)
> - peo1 pushes two mpls labels in the packet
> - peo2 is supposed to pop the two labels and forward the packet as IP
> 
> we have a rule to match the outer label, POP it and resubmit as MPLS packet:
> actions=pop_mpls:0x8847,resubmit(,1)
> 
> then we have a rule to match the inner label,  POP it and output on
> a port as an IP packet:
> actions=pop_mpls:0x0800,output:11
> 
> both rules match (and the first pop works), but then the packet
> does not exit from the port 11
> 
> we have also tried without success to recirculate the packet
> implicitly after the first pop, replacing the first action with:
> actions=pop_mpls:0x8847
> 
> Can anyone help us to identify the problem ? Are we doing something
> wrong or is it a bug?
> 
> The mininet script to setup the topology and create the rules in
> order to reproduce the problem is attached.
> 
> Some details are reported hereafter for the scenario with explicit resubmit.
> 
> thank you in advance for your help...
> 
> ciao
> Stefano
> 
> - peo1 flow table
> OFPST_FLOW reply (OF1.3) (xid=0x2):
> duration=275.553s, table=0, n_packets=58, n_bytes=5684,ip,in_port=2 actions=push_mpls:0x8847,set_field:262144->mpls_label,push_mpls:0x8847,set_field:524292->mpls_label,goto_table:1
> 
> duration=275.493s,table=1,n_packets=58,n_bytes=5684,mpls,in_port=2,mpls_label=524292
> actions=output:1
> 
> - peo2 flow table
> OFPST_FLOW reply (OF1.3) (xid=0x2):
> 
> duration=317.678s,table=0,n_packets=58,n_bytes=6148,mpls,in_port=1
> actions=goto_table:1
> 
> duration=317.618s,table=1,n_packets=58,n_bytes=6148,mpls,in_port=1,mpls_label=524292
> actions=pop_mpls:0x8847,resubmit(,1)
> 
> duration=317.559s,table=1,n_packets=58,n_bytes=6148,mpls,in_port=1,mpls_label=262144,mpls_bos=1
> actions=pop_mpls:0x0800,output:2
> 
> NB If the interfaces created by Mininet in the root namespace happen
> to be down, stop the Network Manager and then restart the experiment
> -- 
> *******************************************************************
> Stefano Salsano
> Professore Associato
> Dipartimento Ingegneria Elettronica
> Universita' di Roma Tor Vergata
> Via del Politecnico, 1 - 00133 Roma - ITALY
> 
> http://netgroup.uniroma2.it/Stefano_Salsano/
> 
> E-mail  : stefano.salsano at uniroma2.it
> Cell.   : +39 320 4307310
> Office  : (Tel.) +39 06 72597770  (Fax.) +39 06 72597435
> *******************************************************************
> 

> #!/usr/bin/python
> 
> import subprocess
> 
> from mininet.net import Mininet
> from mininet.node import Host, OVSKernelSwitch, Node
> from mininet.cli import CLI
> from mininet.log import lg, info
> 
> def setup():
> 
> 	lg.setLogLevel('info')
> 
> 	net = Mininet(switch=OVSKernelSwitch, build=False, autoStaticArp=True )
> 
> 	host1 = net.addHost("h1")
> 	host2 = net.addHost("h2")
> 
> 	peo1 = net.addSwitch("peo1")
> 	peo2 = net.addSwitch("peo2")
> 
> 	net.addLink(peo1, peo2) # 1 | 1
> 	net.addLink(host1, peo1)# N/A | 2
> 	net.addLink(host2, peo2)# N/A | 2
> 
> 	net.start()
> 
> 	#PEO1 Configuration
> 	root = Node( 'root', inNamespace=False )
> 	root.cmd('ovs-vsctl --no-wait set bridge %s protocols=OpenFlow13' %(peo1.name))
> 	root.cmd('ovs-ofctl -O OpenFlow13 add-flow %s "table=0,hard_timeout=0,priority=32768,in_port=2,eth_type=0x800,actions=push_mpls:0x8847,set_field:262144->mpls_label,push_mpls:0x8847,set_field:524292->mpls_label,goto_table:1"' %(peo1.name))
> 	root.cmd('ovs-ofctl -O OpenFlow13 add-flow %s "table=1,hard_timeout=0,priority=32768,in_port=2,eth_type=0x8847,mpls_label=524292,action=output:1"' %(peo1.name))
> 
> 	#PEO2 Configuration
> 	root.cmd('ovs-vsctl --no-wait set bridge %s protocols=OpenFlow13' %(peo2.name))
> 	root.cmd('ovs-ofctl -O OpenFlow13 add-flow %s "table=0,hard_timeout=0,priority=32768,in_port=1,eth_type=0x8847,actions=goto_table=1"' %(peo2.name))
> 	root.cmd('ovs-ofctl -O OpenFlow13 add-flow %s "table=1,hard_timeout=0,priority=32768,in_port=1,eth_type=0x8847,mpls_label=524292,action=pop_mpls:0x8847,resubmit(,1)"' %(peo2.name))
> 	root.cmd('ovs-ofctl -O OpenFlow13 add-flow %s "table=1,hard_timeout=0,priority=32768,in_port=1,eth_type=0x8847,mpls_label=262144,mpls_bos=1,action=pop_mpls:0x800,output:2"' %(peo2.name))
> 
> 	CLI(net)
> 	net.stop()
> 	subprocess.call(["sudo", "mn", "-c"], stdout=None, stderr=None)
> 
> 
> if __name__ == '__main__':
> 	setup()
> 
> 
> 
> 
> 
> 

> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss




More information about the discuss mailing list