Multi-Protocol Label Switching (MPLS) Explained with Examples

By | 6th September 2017

What is Multi-Protocol Label Switching (MPLS)?

Multiprotocol Label Switching (MPLS) is a type of network data traffic technique which carries data from one network device to the next using short path labels instead of long and complex network router lookups in a routing table.

Ok…simply said; MPLS is best summarized as a middleman protocol between Layer 2 and Layers 3 in the OSI model. Some tech pundits call it “Layer 2.5 networking protocol”.

In the traditional OSI model, Layer 2 covers protocols like Ethernet and which can traffic IP packets over LANs or point-to-point WANs only.
Then; Layer 3 takes care of the Internet-wide addressing and routing using IP protocols…

Now..MPLS sits between these traditional layers (2&3), providing additional features for the transport of data across the network. It simply uses a packet-forwarding technology known as labels in order to make data forwarding decisions.


In a traditional IP network, each network router performs an IP lookup on the routed data or packet, the router determines a next-hop-based on its routing table, and forwards the packet to the next-hop. Every router does the same on the same data or packet each making its own independent routing decisions until the final destination is reached.

In an MPLS enabled network, MPLS does “label switching”; which means the first router or network device does a routing lookup, but instead of finding a next-hop, it finds the final destination router.

MPLS configured router applies a “label” on the data, other routers use the label to route the traffic without needing to perform any additional IP lookups. At the final destination router, the label is removed and the packet is delivered via normal IP routing.

What is a label? What is the structure of the label?

A label is a short, four-byte, fixed-length, locally-significant identifier which is used in order to identify a Forwarding Equivalence Class (FEC).
The label which is put on a particular packet represents the FEC to which that packet is assigned.

To actually make MPLS work, you need preset paths which are called label-switched paths (LSPs). An LSP is required for any MPLS forwarding to occur.
An LSP is essentially a unidirectional tunnel of MPLS information exchange among routers in an MPLS network.
MPLS router operates on preset paths for various source to destination.
To accomplish real efficiencies over typical IP routing, every router on the LSP must be able to switch the packet forward.

What is important here is that every router along the LSP from router 1 to router 6 must have the same view of the LSP.

MPLS Router Roles/Positions

Label switch router/ (LSR) or transit router:
This the router(s) in an MPLS network that performs routing based only on the labeling and swapping of packets.
The LSR router is normally located in the middle of an MPLS network. It is responsible for switching the labels used to route packets.

When an LSR receives a packet, it examines and indexes the label included in the packet header so as to determine the next hop on the label-switched path (LSP) and a corresponding label for the packet from its lookup table.
The old label is then removed from the header and replaced with the new label before the packet is routed forward.

Label edge router
A label edge router (LER, also known as edge LSR or “ingress node”) is a router that operates at the edge of an MPLS network and acts as the entry and exit points for the network.These edge router places an MPLS label on an incoming packet and sends it forward into the MPLS domain.
The same job is performed upon receiving a labeled packet which is destined to exit the MPLS domain, the LER removes the label and forwards the IP packet using normal IP address.

Provider router
In an MPLS based virtual private network (VPN) environment, LERs that functions as ingress and/or egress routers to the VPN are often called PE (Provider Edge) routers. Devices that function only as transit routers are similarly called P (Provider) routers.
The job of a P router is significantly easier than that of a PE router, so they can be less complex and may be more dependable because of this.

Label Distribution Protocol
Labels are distributed between LERs and LSRs using the Label Distribution Protocol (LDP).
LSRs in an MPLS network regularly exchange label and reachability information with each other using standardized procedures in order to build a complete picture of the network they can then use to forward packets.
CE is the “Customer Edge”, the customer device or router a PE router talks to.