What is MPLS? – MPLS Tutorial

What is MPLS?

MPLS stands for Multi-protocol Label Switching. MPLS is a packet forwarding technology that is capable of carrying any L3 protocol and here comes the word multi-protocol. MPLS is capable of tunneling L3 packets inside the MPLS network using  MPLS labels. The MPLS label is pushed into the packet between the layer two header and the layer three header of the packet at the ingress router and is used to switch the packets across the network to its destination.

What is the MPLS Label and How is it used?

The MPLS label is a fixed 4 byte identifier added to the packet by the ingress router between the data-link layer (Layer2) and the network layer (Layer3) and is used by all middle routers to switch the packet to its destination without the need for any routing table (Layer3) look-ups. MPLS is considered a layer 2.5 technology and the MPLS header is called the shim header.

The diagram below illustrates the structure of the label. One or more labels are pushed on the packet  at the ingress router forming a label stack. The first label is called the top label or the transport label, other labels are used by different MPLS applications if needed.

MPLS label

MPLS Label Structure

  • Label: label value, 20 bits.
  • EXP: Experimental bits, Name is currently changed to Traffic class, 3 bits.
  • S: bottom of stack, 1 bit.
  • TTL: Time to live, 8 bits.

A couple of definitions are important before moving to MPLS operation:

  • Downstream router: This is the router which advertises the prefix. In other words the router that is the next hop to a specific prefix is the downstream.
  • Upstream router: This router receives the routing information from its downstream router.
  • Label Edge Router (LER): Operates at the edge of the MPLS network (ingress/egress) and make forwarding decisions based on the IP header information of the packet.
  • Label Switch router (LSR): the routers in the middle of the MPLS network which forwards MPLS packets based on label information.
Routing information flows from downstream routers to upstream router.
while data flows from upstream routers to down stream routers.

How MPLS works?

MPLS uses the concept of Forwarding Equivalence Class (FEC). The FEC is of a set of packets forwarded in the same manner by the label switching routers (LSR). Each router assigns a label to a FEC and distributes this label to other routers using label distribution protocols forming label switched paths or LSPs.

When a packet is received by the ingress router it determines the next hop  and inserts one or more labels to the  packet . Then the labeled packets are passed to the next-hop router (downstream). When the packets reach the downstream router, the top most label is examined and used as a unique identifier to look into the label forwarding table to determine the next hop and label operation to be performed on each MPLS packet.

Finally the packet reaches the egress router, the label is removed and the packet is forwarded using an IP lookup or another label based on the MPLS application used.

As you can see the provider routers do not need to examine layer 3 information of the traversed packets, allowing for protocol independent packet forwarding.


  1. R1 advertises prefix to the network using any IGP.
  2. Routing information about the subnet flows away from R1.
  3. An IP packet enters R4 (LER) with a destination of
  4. R4 looks in its label forwarding information base, determines the next hop (R3) and pushes the label  assigned by R3 (L4) for this FEC.
  5. R3 receives labeled packet from R4 with a label L4. R3  examines the LFIB and swaps L3 label to L2.
  6. R2 receives the MPLS packet, looks up the LFIB and pops the label (penultimate hop popping) before sending the packet to R1 as an IP packet.
  7. R1 forward the packet to its destination based on IP header information.

Please refer to MPLS label operations post for a description of different label operations.

MPLS network requirements

The following elements must exist in the network to be able to run MPLS

  1. A layer 3 routing protocol (IS-IS, OSPF, EIGRP or RIP); preferably IS-IS or OSPF for Traffic engineering.
  2. Label distribution protocol (RSVP, LDP or BGP).
  3. Network capable of handling MPLS traffic.

MPLS Benefits:

  1. BGP free core in the service provider.
  2. MPLS Applications like MPLS VPN and Traffic Engineering.
  3. Having unified network in the service provider as you can provide  IP, L3 VPN or L2 VPN over the same network.

I hope I have been able to clearly and simply answer this question, please do not hesitate to post any comments, corrections or request.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

7 Responses to “What is MPLS? – MPLS Tutorial”

  1. […] my previous post I explained what MPLS is and how it works from a high level perspective. In this post I will explain MPLS label operations […]

  2. […] almost every book you will read about MPLS, the author will state that one of the MPLS benefits is having a BGP free core network; sometimes they explain it sometimes not. However, to really […]

  3. […] VPN – The whole story (3) – Updated Dec 2008Passive-interface command behavior in RIP, EIGRP & OSPFWhat is MPLS?WISB Free ToolLink state protocols and Areas conceptHow to: use IS-IS overload bitNative VLAN Cisco […]

  4. Arlington smith Says:

    You picked a great topic for this post and you wrote about it well. I have seen a few other sites with comparable content but no one has carried out a better job than you on writing about it.

  5. […] I do not think I am the best one to explain MPLS here, because I am not a technical guy but I will provide good link that does. This following link will answer you question What is MPLS? […]

  6. awesome and i only request to keep this site hoing like this with new articles on all protocol

  7. Sir, Why dont you right BGP in Layer 3 routing protocol, because we can use BGP there, also i wanna know difference between Layer2 and Layer3 VPN and diffVPN and Layer2 Circuits. Any one can answer please

Leave a Reply