ErrorException Message: WP_Translation_Controller::load_file(): Argument #2 ($textdomain) must be of type string, null given, called in /home3/theunprc/public_html/wp-includes/l10n.php on line 838
https://theunprecedentedcult.in/wp-content/plugins/dmca-badge/libraries/sidecar/classes/Multiprotocol Label Switching (MPLS): Quick Reference Guide

What is MPLS?

Multiprotocol Label Switching or MPLS, though old, is still one of the most popular forwarding technologies used today. It helps in forwarding the data packets much faster across the network as opposed to the native IP routing. 

Multiprotocol comes from the fact that this technology can work with different types of protocols like IPv4, IPv6, Ethernet, ATM, etc.

What was the idea behind introducing Multiprotocol Label Switching?

The MPLS addressed the issue of high forwarding time using native IP lookup. The process included analyzing/looking up the IP packets, getting the destination IP, matching it against the entries in the routing table, getting the next-hop address, and finally forwarding the packet to the next hop. This process was repeated at every node/router which increased the overall time for the packet to reach the destination. This was also a CPU-intensive process that hampered the functioning of network nodes.

Let us try to look at the issues that were there before MPLS briefly.

  1. Destination IP and routing table lookup at every node/router increased the time for the packet to reach its destination.
  2. When the idea of prefixes or CIDR (Classless Inter-Domain Routing) came into the picture, it required the nodes/routers to look up the specific prefixes for the next-hop. This added complexity to the existing native IP lookup method as prefix matching was not an easy task.

How does Multiprotocol Label Switching work?

Multiprotocol Label Switching removed the issue of processing the IP packet at every routing node. It thus helped in reducing the network node’s load and the transfer time of the packet across the network.

MPLS uses the concept of labels for forwarding. In this case, the processing of the IP packets at every node is not required. The lookup only happens at the ingress node for destination IP, and post that all the forwarding is done based on the labels till the time the packet is inside an MPLS network.

An MPLS label (or MPLS Header as later explained) can be seen as a separate block that can be attached to the native IP packet/data frame. In very simple terms:

  • A specific label is attached at the source/ingress node based on the destination IP. The MPLS header lies between L2 & L3 headers.
  • At every node in between the source and the destination node, the source label (it is the outgoing label for the previous node and source/incoming label for the current node) is checked in the forwarding table.
  • The label value is swapped with the new outgoing label and is forwarded to the next-hop. The replaced label is now the outgoing label for the current node and the source label for the next-hop router.
  • The process continues till inside the MPLS network.
Multiprotocol Label Switching flow

Image 1 – MPLS Flow & Terms

Working of MPLS

The above image shows the Multiprotocol Label Switching in action in a very simplified way. Let us understand the concept and the flow through the points below:

  • The cloud shown in Image 1 is the MPLS network. The MPLS network consists of various nodes (switches, routers, etc.) and connects different locations of various enterprise customers (This is just an example of an MPLS installation. There could be different topology and different network installations as per different customer needs.)
  • The IP Packet/Data Frame (called frame if L2 header is added) from a Source location enters the Router A.

Ingress Router

  • Router A here in MPLS terms can also be termed as Ingress Router or Label Edge Router (LER).
  • The native IP lookup is performed at Router A and the destination IP is fetched.
  • The destination IP is looked up against the routing table of Router A. The labels and other details for the packet flow are rendered.

MPLS Labels Explained

  • An MPLS header with label value “20” is added between L2 & L3 headers. MPLS is considered to be Layer 2.5 technology as it acts between Layer 2 & Layer 3 of the OSI Model. The IP packet with MPLS label is also termed as Multiprotocol Label Switching (MPLS) packet.
  • If we look at the routing table of Router A in the Image 1, it says that a packet destined for Destination D needs to be attached with a label 20 and is to be exited from B Intf (the interface on Router A, also tagged as (1) in the image)
  • The MPLS packet with MPLS label value “20” then travels to the Router B, which in MPLS terms and as per the network topology depicted here, can be termed as Label Switch Router or LSR.
  • Router B or LSR Router B looks up the incoming label in its routing table, replaces/swaps it with the outgoing label based on the routing table, and sends it forward to the next-hop via C Intf, (also tagged as (2) in the image). Here, label 20 is swapped with 40.

Egress Router

  • The MPLS packet then reaches Router C or Egress Router (also termed as Label Edge Router like Ingress router). The routing table is checked and the router now sees that the Label 40 is to be removed from the packet (as per the “Pop” term for the outgoing label in the routing table).
  • The MPLS header with label 40 is removed and the native IP packet/data frame stripped off the MPLS header is forwarded to the destination node through D Intf (also tagged as (3) in the image).

Terms in Multiprotocol Label Switching

Forwarding Equivalence Class (FEC)

You will always find FEC being used wherever we talk about Multiprotocol Label Switching. The term is confusing for many people and even for me considering I never had to deal with it as part of my MPLS project. FEC is a conceptual term in routing. FEC can be regarded as a set of packets or flow of packets that are treated in the same way while forwarding from one node to another. In the native IP routing, the FEC revolved around the idea of packets forwarded to the same next-hop, via the same outgoing interface, and with the same queuing mechanism. The FEC was determined at every router in native IP routing. In MPLS, FEC is determined only once at the ingress router, and then packets are forwarded based of MPLS labels.

Routing Tables in Multiprotocol Label Switching

In the case of Multiprotocol Label Switching, various Routing tables come into the picture. The idea is to attach the routing information with the MPLS label information that can be used by router/nodes to forward the packet(s) in the MPLS network. These tables are RIB, FIB, and LFIB (we will not discuss them here as they are not within the purview of this post.)

You can check out more information on RIB and FIB in our Cisco Express Forwarding (CEF), Routing Information Base (RIB), and Forwarding Information Base (FIB) post.

For information on LIB and LFIB, check out our Label Forwarding Information Base (LFIB) & Label Information Base (LIB) in MPLS post.

Ingress Router

Quite simple to decipher. As stated and seen in the previous section, the Ingress Router is a networking node that receives the IP packet/data frame, performs a destination IP lookup, determines FEC, attaches the relevant label, and forwards it to the LSR.

Label Switch Router (LSR)

Label switch router is a networking node inside the Multiprotocol Label Switching network that receives an MPLS packet, checks the routing tables, replaces/swaps the label, and sends it to the next LSR.

Egress Router

As stated and seen in the previous section, the Egress Router is a networking node that receives the MPLS packet, removes the label (or MPLS header), and forwards the native IP packet to the destination.

Label Edge Router (LER)

The ingress and egress networking nodes are also called Label Edge Routers. The term is easy to relate to. Both ingress and egress routers are found at the edge of the MPLS network. The ingress node accepts the IP packet/data frame and attaches the MPLS header. The Egress node removes the MPLS header and sends the native IP packet to the destination.

Label-Switched Path (LSP)

A very popular term in the Multiprotocol Label Switching and also the networking domain, LSP is the path traversed by a certain packet in the MPLS network from source to destination nodes. The LSPs are based on MPLS and routing protocols like OSPF, IS-IS, etc. They are used in L3 VPN, Traffic Engineering, Fault tolerance, and other technologies.

MPLS Label Distribution Protocol (LDP)

Another popular term in the Multiprotocol Label Switching (MPLS) world is LDP. LDP is a protocol that generates, distributes, and takes care of various labels in the MPLS network. Check out our article on the Label Distribution Protocol for more information.

Penultimate Hop Popping (PHP)

This concept is a bit different from what we have seen until now in the article. Penultimate hop popping or PHP is the term used where the networking node just before the Egress Router pops/removes the MPLS label. So, the egress router receives a label stripped IP packet/frame.

The primary motive of this process is to remove the dependency of label pop from the Egress or Label Edge Router so that it can focus on just forwarding the packet to the concerned destination.

A Quick look at Multiprotocol Label Switching Header

MPLS label is often confused by many with MPLS Header. They are not the same. MPLS header is a broader term that contains the MPLS Label value. The following image depicts the MPLS Header.

Multiprotocol Label Switching header

Image 2 – MPLS Header

  • MPLS Header is a 32-bit long header that lies between L2 & L3 headers of the data packet.
  • 20 bits for MPLS Label Integer Value. This is the actual MPLS label value (e.g. values 20 & 40 which are depicted in the 1st image), and is swapped with other label values.
  • 3-bits for Quality of Service (QoS), also called Traffic Class (TC). This is used to prioritize the different types of packets (voice, video, etc.). QoS is a separate topic in itself and plays an important role in prioritizing customer traffic.
  • 1-bit for Bottom of Stack. Represents that there is no more label after this label. This is more useful where we have a stack of labels.
  • 8-bits for Time to Live (TTL). Used for restricting the label to a specific number of hops just as in the IP packet. Once the MPLS header is removed, the TTL value is copied to the IP packet.

Benefits of Multiprotocol Label Switching

Quality of Service (QoS)

  • As stated above, MPLS is flexible and a QoS value can be assigned to an MPLS packet that will help in prioritizing customer traffic like video, voice, etc. This feature gives an advantage that the IP packet does not have to be processed to check the priority traffic. It can be fetched using the MPLS header and no extra lookup is required.

The base for multiple technologies

  • MPLS, today, is the basis of many technologies like L3 VPN, L2 VPN, VPLS, etc. These technologies provide different types of connectivity and services to customers. End devices of the customers can be connected to the edge of the existing MPLS network, configured for a new E2E service, and that is it.

Flexibility to the customers 

  • MPLS and various technologies around it provide ease to the customers to select, prioritize, and configure/not configure their traffic. The MPLS network is laid and generally taken care of by a Communication Service Provider (CSP). The CSP may or may not take care of the network configuration in order to deliver a service to the customer. If a customer wants to take care of the configuration at its end (and not allow CSP to manipulate their data), it can be done on their Customer Edge Devices while the data can be safely transferred across the CSP’s MPLS network. Tata, Reliance, AT&T, Verizon, etc. are all CSPs.

Service Level Agreement (SLA) & Scalability

  • SLA is an important factor for CSPs. The CSPs have an SLA agreement with the customers to identify the service uptime, latency, etc. that will have to be provided by the CSP to the customers. This keeps the quality of traffic in check with the best performance and services provided to the customer. MPLS networks are known to fulfill customer SLA’s. Also, the MPLS network is highly scalable and can be augmented for different types of services, esp. VPN.

Security

  • MPLS network, though expensive, is highly secured. The data transfer in the MPLS VPN network is completely hidden and thus is free from any attacks.

Bandwidth Utilization

  • As multiple services can operate as part of an MPLS network, there is a better utilization of interface and device bandwidth. If MPLS would have supported only a single service, most of the time, the bandwidth would have been under-utilized.

Summary & Important Points about Multiprotocol Label Switching

Let us summarize the discussion so far and take a look at some important points relating to Multiprotocol Label Switching.

Basics

  1. MPLS is a routing technology and not a protocol.
  2. MPLS is extensively used in Enterprise Private Networks.
  3. MPLS supports different L3 protocols like IPv4, IPv6, etc., and L2 Protocols like Ethernet, ATM, etc. This is why it is termed as Multi-Protocol.
  4. MPLS exists at layer 2.5 when referenced with the OSI model.
  5. MPLS network uses labels to forward the packets from one node to the next. This is better than the default IP lookup and forwarding technique which is CPU intensive and has to be performed at each node between source and destination nodes.

MPLS Labels

  1. An MPLS label is part of an MPLS header. MPLS header is of 32 bits and consists of MPLS label, QoS value, TTL value, and Bottom of Stack single bit value.
  2. The MPLS header is attached at the Ingress MPLS node and is removed at the Egress MPLS node. In case the Penultimate Hop Popping (PHP) is implemented, the label is popped at the second last node (or node just before the egress node). This helps in reducing the load on the egress node which can then focus on just forwarding the packet to the destination.
  3. MPLS labels are swapped between the LSR nodes until the destination LER where the MPLS header is popped. MPLS Push, Swap, & Pop are the three mechanisms/operations for handling MPLS labels. Following is the definition of these operations: 
    • Push – adds the label. Multiple push can happen before a pop is performed (This happens in various MPLS technologies which are not within the purview of this post)
    • Pop – removes the label
    • Swap – exchange the label value with another label value

LDP & LSP

  1. MPLS labels are generated and distributed using the Label distribution protocol (LDP).  In other words, LDP is crucial for MPLS. LDP though is not the only protocol for label generation and distribution. For example, RSVP is another protocol that is used for label distribution but is actively used in MPLS Traffic Engineering (not within the purview of this post).
  2. MPLS together with internal routing protocols (OSPF, IS-IS, etc.) calculates and provides the best path for traffic to reach from a source to a destination.
  3.  A path from a source to a destination within an MPLS network is called an LSP (Label-Switched Path.)
  4.  MPLS path or LSP depends on routing tables i.e. RIB, FIB, and LFIB.
  5.  Using MPLS, customer traffic can be prioritized and differentiated. For example, video traffic can be given priority over normal voice traffic.)
  6.  MPLS is the base for many technologies like L3 VPN, L2 VPN, VPLS, etc. that are extensively used today (not within the purview of this post).
  7.  MPLS delivers high performance and provides good security.

The scope of the post is kept very specific so that it is easier for the readers to grasp the basic concepts.

Good Reads & References

  1. Multiprotocol label Switching – Wikipedia

Images are subject to Copyright @The Unprecedented Cult

CURATED & WRITTEN BY

AYUSH PANDYA
(AUTHOR – THE UNPRECEDENTED CULT)

Ayush Pandya

Author. Blogger. Poet. Lyricist.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments