Sorry, there's currently no example for this.

There are a couple of prerequisites:
1) You must be using a switch with the OVS/Nicira MPLS extensions
2) You must be using the POX carp branch


After that, some quick pointers are...

Import the Nicira extensions and packet library...
import pox.openflow.nicira as nx
import pox.lib.packet as pkt

Build matches which match the MPLS unicast ethertype and some MPLS label...
msg = nx.nx_flow_mod()
msg.match.of_eth_type = pkt.ethernet.MPLS_TYPE
msg.match.of_mpls_label = 42

Create actions which add/push an MPLS header and/or set the label value...
msg = nx.nx_flow_mod()
msg.actions.append(nx.nx_action_push_mpls()) # Create header/push label
msg.actions.append(nx.nx_reg_load(dst=nx.OXM_OF_MPLS_LABEL, value=42)) # Set 
label

There are also actions for popping labels, setting the MPLS TTL, etc.  See 
pox.openflow.nicira or the Open vSwitch reference.

-- Murphy 

On Aug 20, 2013, at 5:02 PM, Amer <amer7...@hotmail.com> wrote:

> Hello,
> 
> Hope you the best of health
> 
> I would like to ask these questions:
> How to push and pop MPLS Tag to new packets
> How to make switching based MPLS tag
> 
> Best Regards,
> Amer

Reply via email to