Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Understanding how labels are used in MPLS

Cisco Employee

MPLS or Multiprotocol Label Switching protocol as we know, combines the performance and capabilities of Layer 2 (data link layer) switching with the proven scalability of Layer 3 (network layer) routing.MPLS provides solution to address a multitude of problems faced in the networks like speed, scalability, quality of service (QoS) management, and traffic engineering. Service providers are realizing larger revenues by the implementation of service models based on the flexibility and value adds provided by MPLS solutions. MPLS also provides an elegant solution to satisfy the bandwidth management and service requirements for next-generation IP–based backbone networks.

The MPLS architecture is remarkable for its flexibility:

• Data can be transferred over any combination of Layer 2 technologies
• Support is offered for all Layer 3 protocols
• Scaling is possible well beyond anything offered in today's networks

Today in this blog, I will explain how labels are generated, shared and used in MPLS. While writing this blog I assume that the reader knows basic MPLS terminology and has some idea about how MPLS works. If you are one of those readers who don’t know about MPLS and have just started learning MPLS and excited about learning more about it, please go through first five section of Multiprotocol Label switching overview once. And for understanding basic MPLS terms, see MPLS FAQ.

MPLS Label Format:


  • MPLS uses a 32-bit label field that contains the following information:
  • 20-bit label (a number)
  • 3-bit experimental field (usually used to carry IP precedence value)
  • 1-bit bottom-of-stack indicator (indicates whether this is the last label before the IP header. I.e. VPN or TE or FRR)
  • 8-bit TTL (equal to the TTL in IP header)

Now, because of the limitation of space that we have here, I am skipping basic MPLS configuration and those who are interested in basic configuration can download the attachments available with this blog containing whole configuration.

For explaining label exchange process, I have used following diagram:


For explanation I have picked ip address of fa 0/1 interface at R5. Now, we will start form R5 and examine FIB (Forward information base) and LFIB (Label forwarding information base) for network towards R1.

On R5:

R5 - control plane.jpg

You can see that the local binding is “implicit-null” which is expected as the route is locally connected. Network has a remote binding as well however; it will not be used for obvious reasons.

On R4:

R4 - control plane.jpg

On this router, the local binding is 23 and the router has received three remote bindings one each from R2, R3 and R5.

On R3:

R3 - control plane.jpg

Again, we have one local binding and two remote bindings, one each from R4 and R2

To check which one of these will really be used for forwarding, we should check LFIB

R3 - LFIB.jpg

Same process you can follow on R2, to check which label will be used:

Check LIB first:

R2 - control plane.jpg

Then the LFIB:

R2 - LFIB.jpg

I hope that this blog will help you understand the label exchange and utilization process in more detail and with ease. It would be great if you can leave your comments on this one as that will help me understand what you guys are looking forward to on MPLS or MPLS VPN.

Thanks for your time!

Community Member

Nice Article

Nice explanation!


Adding one more link for good explanation


Shivlu Jain

Community Member


   I am a new for MPLS and I am interested to learn MPLS from Top to Bottom. Can you help me on this.

Can you tell me which book is good for me to understand the MPLS in briefly.

I have few question on this. I heard many times like MPLS VPN Layer2 and MPLS VPN Layer3. What is the difference between then. I confused about this.

Can any one help on this to understand the MPLS fully.




Hello Prashhant ,

Hope you are doing well

Let’s first discussed what MPLS VPN stand for?

If you split MPLS VPN, Then MPLS stand for Multi-protocol label switching means it can switch multiple protocol on the basis of labels then it can be IPv4, IPv6, PPP, FR, HDLC etc. MPLS runs between Service Provider edge routers and inside their cloud. Now let’s understand VPN terminology, VPN stands for Virtual private network .Why VPN word used with MPLS? reason is customers are connected their sites like branch/HO(head offices) through service provider network but still there is transparency for customers ,e.g Customers-A doesn’t know about routing information of Customer-B even both are going through same service provider so it like  their private network .

Let’s discussed about L3 VPN:


In above topology if your CE1 router is running L3 routing i.e. you want to point default route towards PE1 then you need 2 subnets between CE1 and PE1, PE2 and CE2. Here we make direct connectivity with edge device of service provider, and this we have to do at both the end. Next we have to share our local routes with Service provider, which eventually transmitted to the other end of your VPN (i.e. your other site). So here service provider knows about our local routes. This way both the site has each other’s routes, making it L3 connectivity (As we have L3 routes)

L2 VPN: Now Assume CE1 have IPv4 address and CE2 and due to some reason you don’t want to change your Devices IP address or don’t want to share your routing table with Service provider then SP will use L2VPN using different technology like L2tp (L2 transport protocol) and ATOM(Any transport over MPLS).So in short connectivity in L2 VPN looks like both the site are on same L2 network together.


Thanks and Regards,

Ashish Shirkar

Technical Community Manager-NI