What is MPLS and how is it different from IP Routing?
Introduction to MPLS
MPLS i.e. Multi Protocol Label Switching (MPLS). It is a technique that is used for the routing of network packets. It is called a Multiprotocol as it supports multiple protocols like Internet Protocol (IP), Asynchronous Transport Mode (ATM) and Frame Relay protocols. Moreover, in MPLS technique the network packet forwarding is done based on the label present on the packet, that’s why it is called Label Switching.
MPLS : The “Shim” Protocol
As we know that there are 5 layers of TCP/IP Model. The MPLS layer lies between the layer 2 i.e. the Ethernet layer and the layer 3 i.e. Network layer of the TCP/IP model. So, in other words, it shims(fill up the space) between two layers and hence also known as the “shim” protocol.
MPLS Header
The MPLS Header consists of 32 bits. It consists of –
- Label: It consists of 20 bits, so the label can take values from 0 to 2^20–1, or 1,048,575. But the first 16 label values(0 to 15) are exempted from normal use as they have a special meaning.
- Experimental(Exp): It consists of 3 bits. These are used for Quality of Service.
- Bottom of Stack(BoS): There can be more than one MPLS labels for a network packet. These labels are stacked one over another. Bottom of Stack field is of 1 bit and it ensures which MPLS label is at the bottom of stack. The bit value is 1 or high only when that particular label is at the bottom of the stack otherwise its value remains 0.
- Time to Live(TTL): It consists of last 8 bits. Its function is similar to the TTL present in the IP header. Its value decreases by 1 at each hop. So the TTL ensures that the packet does not stuck in the network by discarding the packet once its value becomes zero.
MPLS NETWORK – Label Switched Path (LSP)
The MPLS Network consists of LSR i.e. Label Switch Routers. These are named so as they are capable of understanding the MPLS labels. There are 3 types of LSR –
- Ingress LSR: The Ingress LSR receive unlabeled IP packet and PUSH the label on it. Ingress LSR are present at the beginning of the network.
- Egress LSR: Egress LSR POP the label from the incoming packet and forward it as an IP packet. Egress LSR are present at the end of the network.
- Intermediate LSR: Intermediate LSR are present in between Ingress and Egress routers, that is why they are called intermediate routers. These routers receive the labeled packet, SWAP the label of the packet and forward it to the next hop. Thus carrying out MPLS forwarding of the packet.
This type of path is also known as PUSH – SWAP- POP Label Switched Path. Thus a network packet follows a fixed path known as the Label Switched Path or LSP in MPLS forwarding
MPLS Forwarding & how is it different from IP Routing
So after understanding the basics of MPLS Network, we can sum up the process of MPLS forwarding easily.
In MPLS forwarding, the Ingress router present at the beginning of the MPLS network pushes a label on the incoming network packet. This label specifies a particular path that the network packet has to follow i.e the Label Switched Path. Each LSR contains Label Forwarding Information Base(LFIB)which base guides the LSR to swap the label with its corresponding outgoing label. This allows the packet to transmit through the network. The Egress router present at the end of the LSP, pops the label of the packet and it is then moved forward as normal IP packet.
In contrast to MPLS forwarding, in IP routing each network packet contains a source IP address and a destination IP address and is passed through several routers in between through hop-by-hop mechanism. Each router contains the routing table that provides information to the next hop till it finally reaches the destination.
So, MPLS forwarding is done on the basis of labels given to the packets while in IP forwarding it is done on the basis of the IP address.
The detailed comparison between the two can be studied through the below given comparison table. (Credit:ipwithease.com)
Comparison Table : MPLS vs IP Routing
PARAMETERS | MPLS | IP ROUTING |
Switching/Routing principle | Switching traffic based on labels advertised by LDP | Routing based on the destination address for entries in the routing table. |
Switching/Routing path | Establishes LSP (dedicated path) before data can flow. | No dedicated path is established, packet is routed based on IP addresses. |
Tables usage | Builds LFIB (Label Forwarding Information Base) table using LDP protocol. | Stores IP routing table. |
Layer of functioning | Labels inserted between layer 2 and Layer 3 (hence layer 2.5) | Performed at Layer 3 |
Overlapping IP address | MPLS can allow communication across overlapping IP addresses of multiple customers | Does not allow communication across overlapping address of different customers |
Related terms | LSP, LDP/TDP, VRF, LFIB, Push, Swap and Pop. | Route Lookup, IP protocol |
Traffic Latency | Lower latency than traditional IP routing | Incurs higher latency than MPLS |
Topology and services | With MPLS, providers can create (with use of different labels and label stacks) different topologies & services (MPLS-TE, MPLS VPNs). | Single topology can be created per IP routing domain. |
Traffic Engineering | Scalable and proficient in service | Partially possible but not scalable solution |
Separate Routing table | In MPLS network , each customer has separate routing network | Traditional IP routing can only have 1 Routing table for all customers |
Scalability | Medium | High |
Target scope | Service provider domain, Large & Multitenant Data Centers. | Home, Office, Service PTP/Underlay links, Data centers etc. |
Traffic type | Allows non-IP traffic forwarding in addition to IP traffic | Allows forwarding of IP traffic |
CREDIT:https://ipwithease.com |
If you want to learn more about MPLS, then check our e-book on MPLS Interview Questions and Answers in easy to understand PDF Format explained with relevant Diagrams (where required) for better ease of understanding.
Tag:comparison, routing