MPLS for Linux

Mpls-linux is a open source package to create an MPLS forwarding plane for the Linux operating system.
You can find more about installation on mpls-linux page.
The example below describes how set up/emulate Linux MPLS box with MFA8 encapsulation (Emulation of TDM Circuits over MPLS Using Raw Encapsulation, Ethertype 0x8847) to swap incomming MPLS tunnel labels:

 
Test setup:

TDM Circuit A --- Eth1-LinuxPC-Eth2 --- TDM Circuit B


MPSL box:

Prerequisites: mlps-linux package to be installed on PC with Linux Debian 5;

 ------------------------------------------------------------------------------------------------
### MPLS box settings:

ifconfig eth1 172.16.0.1 netmask 255.255.0.0
ifconfig eth1 up

ifconfig eth2 10.10.10.1 netmask 255.0.0.0
ifconfig eth2 up

mpls labelspace set dev eth1 labelspace 0
mpls ilm add label gen 100 labelspace 0
mpls nhlfe add key 0 instructions push gen 5555 nexthop eth2 ipv4 10.10.10.10
mpls xc add ilm_label gen 100 ilm_labelspace 0 nhlfe_key 0x2

mpls labelspace set dev eth2 labelspace 0
mpls ilm add label gen 6666 labelspace 0
mpls nhlfe add key 0 instructions push gen 200 nexthop eth1 ipv4 172.16.0.10
mpls xc add ilm_label gen 6666 ilm_labelspace 0 nhlfe_key 0x3

----------------------------------------------------------------------------------------------------

It is assumed that TDM Circuit A has the following settings:
- IP address 172.16.0.10/16, next-hop IP 172.16.0.1;
- MPLS-tunnel labels: src-label 200, des-label 100;
- Pseudowire src-label 30, dest-label 40;


It is assumed that TDM Circuit B has the following settings:
- IP address 10.10.10.10/16, next-hop IP 10.10.10.1;
- MPLS-tunnel labels: src-label 5555, des-label 6666;
- Pseudowire src-label 40, dest-label 30;


In the TDM Circuit A to TDM Circuit B direction the Linux MPLS box swaps PW MFA8 encapsulated traffic with outer MPLS label 100 for MPLS label 5555 and forwards traffic towards TDM Circuit B. In the TDM Circuit B to TDM Circuit A direction the Linux MPLS box swaps PW MFA8 encapsulated traffic with outer MPLS label 6666 for MPLS label 200 and forwards traffic towards TDM Circuit A. The configuration assumes to define MAC-destination for PW traffic using ARP-protocol between the TDM Circuits and MPLS-box:

 TDM Circuit A to TDM Circuit B: MPLS label 100 > MPLS Label 5555
 TDM Circuit B to TDM Circuit A: MPLS label 6666 > MPLS Label 200


Using this MPLS-box you can emulate different traffic impairments using Netem tool.

1 comment:

  1. I try to install mpls-linux(http://sourceforge.net/projects/mpls-linux/),but i obtain the
    following message error : RTNETLINK answers: No such file when i input mpls instruction.
    install environment:
    ubuntu 10.04
    kernel:linux-2.6.35
    mpls:MPLS for Linux(http://sourceforge.net/projects/mpls-linux/)
    Can help me??

    ReplyDelete