Author : Sanu Mathews

Published on: February 15, 2017

Category : Industry Updates

Multi-Protocol Label Switching (MPLS) is gaining a lot of interest these days. MPLS is not a recent development. It was defined  way back in 1998 by IETF.  Though it is practically used only in IP networks, theoretically it can carry many other protocols. It enables high performance traffic forwarding and quality of service traffic engineering. Typical requirement for MPLS transport might be in the retail sector where constant use of point of sale devices requires transaction data to be carried rapidly to the processing data center.

Today many applications of MPLS are within the VPN. The diagram shows point-to-point E1 lease line over VPN and building the private LAN where we can interconnect multiple LANs which are based at different sites.

MPLS VPN Applications

Why Multi-Protocol?

Well, simply put, MPLS is independent of the underlying protocol. It could be Ethernet or SDH/SONET. It simply maps on to L2 protocol and provides fast and efficient transport network over packet switched network. Want to know if it will fit into the OSI 7 layer model?  The answer is yes! It can squeezed in between L2 and L3 and is called layer 2.5 protocol.  Thus, in the transport part of the network, MPLS differs due to very important things:

  1. It maps on to any L2 protocol below

2. It checks the IP packet of both as they arrive at the door way of the transport network and sends the most efficient predetermined routes.


Before we look at how it does that, let’s understand the difference between routing and switching. When an IP router receives a packet, it has to check which network it must forward to and after which exit port. So it sends its routing table to see if there is a match with the longest network masks. If there is no match, then it retries with the next longest network masks and so on. It can only forward the packet when a match is found. Surely it is a time consuming process. But switching is different. A switch holds a table containing a simple list of input port IDs and packet reference IDs along with output port IDs and new references to be applied to the outgoing packets. This simple process enables faster forwarding of the packets.

MPLS uses the best of both routing and switching! The routing decision made for one packet as it ends at MPLS domain can be used for a whole class of similar packets. They receive a class label that is simply read and replaced in each MPLS router.  And the device that makes MLPS so efficient is called the Label Switching Router or Label Switch Router or LSR. It’s a combination of a switch and a router. In reality, LSRs are classical IP routers, more like a software upgrade to MLPS. While we previously had a lot of IP routers in packet switch networks, in the MPLS network they are replaced with LSRs. The job of the LSR is to accept the incoming packets and forward them out of the correct port as quickly as possible. There is a special function when LSRs are at the edge of the MPLS domain. They are then called Label Edge Router (LER).

MPLS Domain Routers

Let me walk you through what happens to the packet as it ends at the MPLS domain, makes its way through and exits at the far end.

First of all, the packet arrives at an ingress label edge router from the IP domain. The LAR checks the Layer 3 information on the packet and finds the reference called forward equivalence classes for that particular packet type in its lookup table. Label for that class is then added or pushed on to the packet and the packet is then forwarded into the MPLS domain. This label is actually held in a special header called shim header. The shim is just another word for a think space like a metal washer and is inserted between the layer 2 and layer 3 headers of the IP packet.

The full format for shim header is shown in the diagram below.

Shim Header

Now back to our packet. Inside the MPLS domain, the packet arrives at the label switch router. The LSR checks the packet label in its label information base and swaps it for a new number and then forwards it on MPLS domain. Finally the packet arrives at the edge of the MPLS domain at an egress LER. The LAR removes or pops the label and then forwards the packet according to normal IP forwarding rules. Now clearly one of the MPLS routing advantages over normal IP packet routing is that the path across the network is established even before the packets starts its journey. For every forwarding equivalence class we have something called Label Switched Path Predictable Route which is put in place by one of the two protocols that is running on whole LSRs in the network. This is either Label Distribution Protocol (LDP) or Resource Reservation Protocol –Traffic engineering RSVP-TE.  All Label Switched Paths (LSP) are established unidirectionally.

Let’s look at one last example.

Label Operations - (Push, Swap and Pop)

Initially the predictable LSP is established using the MPLS protocol and then the stunned IP packet arrives from network A on the left at the ingress LER. It assigns the packet to a FEC that is forwarding equivalence class and pushes label 16 on to the packet. Packet continues to the LSR which checks the label in the label information base, finds the new label 27 and swaps the labels. The packet continues to the next LSR which the does the same thing and swaps the label for 33. Remember the FEC hasn’t changed, only the label changes. Finally the packet arrives at egress LAR which pops the label off and forwards the packet without the label to network B.