MPLS Network


The Pica8 PICOS network operating system can run in two different modes:

  •  OVS (Open vSwitch) mode, in which PICOS is optimized for OpenFlow applications
  •  L2/L3 (Layer 2/Layer 3) mode, where PICOS can run traditional switching and routing protocols, as well as OpenFlow applications

 

In OVS mode, L2/L3 daemons are turned off and the switch is dedicated to OpenFlow and OVS. In this mode, PICOS open white box switches can support various configurations, including 802.1Q VLANs, Multiple Virtual Bridges, SSL Connection to Controller and Multiprotocol Label Switching (MPLS).

MPLS is a technique for routing traffic across a network using short path labels rather than long network addresses. It is intended to more efficiently and quickly route traffic across a network by avoiding routing table lookups and potentially circuitous routes to a destination.

This document describes how to configure PICOS for an MPLS network.

Traffic (Red) from host-A to host-B is forward by the MPLS network with Label 10. The traffic (Blue) from host-C to host-D is forwarded by the MPLS network with Label 20. All the flows will only push one MPLS header.

 

Figure 4-2.  MPLS network configuration

Configure Switch-A

In Switch-A, user needs to configure two flows, which will push the MPLS Label 10 and 20 for traffic RED and BLUE, respectively. 

root@PicOS-OVS# ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8
device br0 entered promiscuous mode
root@PicOS-OVS#
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/1 vlan_mode=access tag=1 -- set Interface te-1/1/1 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/2 vlan_mode=access tag=1 -- set Interface te-1/1/2 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/3 vlan_mode=access tag=1 -- set Interface te-1/1/3 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/4 vlan_mode=access tag=1 -- set Interface te-1/1/4 type=pica8
root@PicOS-OVS#
root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=1,dl_type=0x0800,nw_src=10.10.1.100,nw_dst=10.10.2.100,dl_vlan=1,actions=push_mpls:0x8847,set_field:10-\>mpls_label,output:4
root@PicOS-OVS#
root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=2,dl_type=0x0800,nw_src=10.10.3.100,nw_dst=10.10.4.100,dl_vlan=1,actions=push_mpls:0x8847,set_field:20-\>mpls_label,output:3
root@PicOS-OVS#


 

The received packet format in port te-1/1/1 and te-1/1/2 is shown as follows (ingress):

The transmitted packet format to port te-1/1/3 and te-1/1/4 is shown as follows (egress):

Configure Switch-B

In Switch-B, user needs to configure one flow, which will SWAP the MPLS Label 20 to 200 for traffic BLUE.

root@PicOS-OVS# ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8
device br0 entered promiscuous mode
root@PicOS-OVS#
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/1 vlan_mode=access tag=1 -- set Interface te-1/1/1 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/2 vlan_mode=access tag=1 -- set Interface te-1/1/2 type=pica8
root@PicOS-OVS#
root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=1,dl_type=0x08847,nw_src=10.10.3.100,nw_dst=10.10.4.100,dl_vlan=1,mpls_label=20,actions=set_field:200-\>mpls_label,output:2
root@PicOS-OVS#

 

The transmitted packet format to port te-1/1/2 is shown as follows (egress):

Configure Switch-C

In Switch-C, user needs to configure one flow which will SWAP the MPLS Label 10 to 100 for traffic RED.

root@PicOS-OVS# ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8
device br0 entered promiscuous mode
root@PicOS-OVS#
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/1 vlan_mode=access tag=1 -- set Interface te-1/1/1 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/2 vlan_mode=access tag=1 -- set Interface te-1/1/2 type=pica8
root@PicOS-OVS#
root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=1,dl_type=0x08847,nw_src=10.10.1.100,nw_dst=10.10.2.100,dl_vlan=1,mpls_label=10,actions=set_field:100-\>mpls_label,output:2
root@PicOS-OVS#

 

The transmitted packet format to port te-1/1/2 is shown as follows (egress):

Configure Switch-D

In Switch-D, user needs to configure two flows, which will POP the MPLS Label 100 and 200 for traffic RED and BLUE, respectively. 

root@PicOS-OVS# ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8
device br0 entered promiscuous mode
root@PicOS-OVS#
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/1 vlan_mode=access tag=1 -- set Interface te-1/1/1 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/2 vlan_mode=access tag=1 -- set Interface te-1/1/2 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/3 vlan_mode=access tag=1 -- set Interface te-1/1/3 type=pica8
root@PicOS-OVS# ovs-vsctl add-port br0 te-1/1/4 vlan_mode=access tag=1 -- set Interface te-1/1/4 type=pica8
root@PicOS-OVS#
root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=4,dl_type=0x08847,nw_src=10.10.1.100,nw_dst=10.10.2.100,dl_vlan=1,actions=pop_mpls:0x8847,output:1
root@PicOS-OVS#
root@PicOS-OVS# ovs-ofctl add-flow br0 in_port=3,dl_type=0x08847,nw_src=10.10.3.100,nw_dst=10.10.4.100,dl_vlan=1,actions=pop_mpls:0x8847,output:2
root@PicOS-OVS#

 

The transmitted packet format to port te-1/1/1 and te-1/1/2 is shown as follows (egress):

 

Copyright © 2024 Pica8 Inc. All Rights Reserved.