Setting up static MPLS network

Multiprotocol Label Switching Label Switching (MPLS) is a technology for speeding up network traffc flow and making it easier to manage. MPLS involves setting up a specific path for a given sequence of packets, identified by a label put in each packet, which saves the time needed for a router to look up the address to the next node to forward the packet to. In addition to moving traffic faster overall, MPLS makes it easy to manage a network for quality of service (QoS). MPLS is called multiprotocol because it can be implemented over multiple different networks and protocols of IP network, ATM network. MPLS allows most packets to be forwarded at the layer 2 (switching) level rather than at the layer 3 (routing) level. Infact the MPLS layer is in between the layer 2 and layer 3.

Instead of ip routing the packet, a router in the mpls network uses the label switching table (LST) or as known label forwarding informatiom base(LFIB) to forward the packet. If a router in mpls network is a edge router and receives a ip packet from other network, it uses the label switching table to map the forwarding equivalence class (FEC) to a next hop label forwarding entry (NHLFE). The NHLFE contains the outgoing label, the interface through which the packet will be forwarded and the next hop ip address. If a router in the mpls network receives a mpls packet containing a label it maps the incoming label to a NHLFE using the LST which is also called as the incoming label mapping (ILM).

We can see a simple topologi below. I want to try build MPLS network with some of computer, where two computer as client and four computer as MPLS router. And using software spesific in this testbed.

  1. Linux Operating System, Fedora core 8
  2. kernel-2.6.26.6-49.fc8.mpls.1.962.i686.
  3. iproute-2.6.26-2.fc8.mpls.1.962.i386
  4. tcpdump and ethereal for capture packet MPLS

picture topologi test lab MPLS

Client A :
ip route add default via 192.168.1.2

LER1 :
mpls nhlfe add key 0 instructions push gen 100 nexthop eth1 ipv4 192.168.2.2
ip route add 192.168.7.0/24 via 192.168.2.2 mpls 0x2
mpls labelspace set dev eth1 labelspace 0
mpls ilm add label gen 200 labelspace 0
mpls nhlfe add key 0 instructions nexthop eth0 ipv4 192.168.1.1
mpls xc add ilm_label gen 200 ilm_labelspace 0 nhlfe_key 0x3

LSR1 :
mpls labelspace set dev eth0 labelspace 0
mpls ilm add label gen 100 labelspace 0
mpls nhlfe add key 0 instructions push gen 300 nexthop eth1 ipv4 192.168.3.2
mpls xc add ilm_label gen 100 ilm_labelspace 0 nhlfe_key 0x2
mpls labelspace set dev eth1 labelspace 0
mpls ilm add label gen 400 labelspace 0
mpls nhlfe add key 0 instructions push gen 200 nexthop eth0 ipv4 192.168.2.1
mpls xc add ilm_label gen 400 ilm_labelspace 0 nhlfe_key 0x3

LSR2 :
mpls labelspace set dev eth1 labelspace 0
mpls ilm add label gen 300 labelspace 0
mpls nhlfe add key 0 instructions push gen 500 nexthop eth0 ipv4 192.168.6.2
mpls xc add ilm_label gen 300 ilm_labelspace 0 nhlfe_key 0x2
mpls labelspace set dev eth0 labelspace 0
mpls ilm add label gen 600 labelspace 0
mpls nhlfe add key 0 instructions push gen 400 nexthop eth1 ipv4 192.168.3.1
mpls xc add ilm_label gen 600 ilm_labelspace 0 nhlfe_key 0x3

LER2 :
mpls labelspace set dev eth2 labelspace 0
mpls ilm add label gen 500 labelspace 0
mpls nhlfe add key 0 instructions nexthop eth0 ipv4 192.168.7.2
mpls xc add ilm_label gen 500 ilm_labelspace 0 nhlfe_key 0x2
mpls nhlfe add key 0 instructions push gen 600 nexthop eth2 ipv4 192.168.6.1
ip route add 192.168.1.0/24 via 192.168.6.1 mpls 0x3

Client B :
ip route add default via 192.168.7.1

this is result when i typed ping from client A to client B. Commands used is “tcpdump”. tcpdump as software for capture packet which through Router MPLS.

capture packet in LER1

capture packet in LSR1

capture packet in LSR2

capture packet LER2

and now lets us see capture packet through Router LSR1 using ethereal.

capture all interfaces in LSR1

4 pemikiran pada “Setting up static MPLS network

  1. hi miroslav kral..
    here i try to answer your question..
    if you have the ouuput as below “we have this error ,,rtnetlink answers Cannot allocate memmory,,”
    you should add command “modprobe mpls4” to each of script:
    modprobe mpls4
    this command for run the MPLS kernel on operating system linux.

  2. hi miroslav karl..
    here, i try to answer your question.
    if you have output as below “we have this error ,,rtnetlink answers Cannot allocate memmory,,”
    you should add command “modprobe mpls4” in each of script,
    Example :
    “modprobe mpls4
    mpls nhlfe add key 0 instructions push gen 100 nexthop eth1 ipv4 192.168.2.2
    ip route add 192.168.7.0/24 via 192.168.2.2 mpls 0×2
    mpls labelspace set dev eth1 labelspace 0
    mpls ilm add label gen 200 labelspace 0
    mpls nhlfe add key 0 instructions nexthop eth0 ipv4 192.168.1.1
    mpls xc add ilm_label gen 200 ilm_labelspace 0 nhlfe_key 0×3”

  3. Not work for me, and your picture topology is wrong, because ethernet device name is same, please correct your ethernet device name on your picture topology.

  4. the device name not problem was same. the most important is IP adress must different.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s