MPLS Network Tutorial: Labels, Frames, and Architecture
Advertisement
MPLS stands for Multi-Protocol Label Switching. It employs a label switching mechanism and a protocol-independent transport, directing data between nodes using labels instead of IP addresses. This avoids the need for long IP addresses and complex routing tables. The IETF manages standard specifications for MPLS.
MPLS frames are compatible with various data link layer frames such as ATM, Frame Relay, T1/E1, and SONET.
Why MPLS?
Switching is used to connect two circuits for information exchange and can be broadly classified into circuit switching and packet switching.
- Circuit Switching: Connection-oriented routing with a dedicated path throughout the transmission.
- Packet Switching: Connectionless routing, where messages are divided into packets, addressed, numbered, and sent individually. Packets may follow different routes to the destination, where they are reordered.
While packet switching offers some advantages over circuit switching, it also has drawbacks which MPLS aims to address.
Label switching, as used in MPLS, overcomes these packet switching limitations with the following characteristics:
- Converts connectionless routing to connection-oriented routing.
- Attaches labels to data packets based on class and service type, similar to circuit switching priorities.
- Uses appropriate labels for routing across intermediate routers.
MPLS Network Architecture and Operation
Figure 1: MPLS network architecture
The architecture of MPLS typically consists of Customer Edge (CE), Label Edge Router (LER), and Label Switching Router (LSR). The data path between routers is known as the Label Switched Path (LSP). Let’s define some key terminologies:
-
CE (Customer Edge): Structures customer messages into IP packets and sends them to the MPLS domain’s entry node. Upon receiving packets from the MPLS domain, it removes the IP address and sends the packets to its network layer.
-
LER (Label Edge Router): Functions as the gateway to the MPLS domain and sits at its edge.
- Ingress LER: Receives IP packets from the CE and assigns an appropriate label, then sends the labeled packet towards the next hop through the LSP. This label assignment is known as label binding.
- Egress LER: Receives labeled IP packets from the previous router, removes the label, and re-routes the packet to the destination CE.
-
LSR (Label Switching Router): Used as a transit switch within the MPLS cloud and performs MPLS forwarding. It receives packets with labels, analyzes them, and routes them according to the labels in the Label Information Base (LIB) table. The LIB database is present in both LERs and LSRs, containing incoming and outgoing label mappings. When routing packets, the LSR removes the incoming label and assigns a new label, enhancing security against intruders. This process is known as label swapping.
-
LSP (Label Switched Path): A dedicated path within the MPLS domain, established before data transmission based on the Forwarding Equivalence Class (FEC). There are two types of LSPs:
- Static LSPs: Configured manually on each LSR without a signaling protocol. The operator configures the ingress LER, egress LER, and transit LSRs, manually specifying labels for each hop.
- Signaled LSPs: Configured only at the ingress LER. Packets assigned to a signaled LSP follow a pre-established path from the LSP’s ingress LER to its egress LER counterpart.
-
FEC (Forwarding Equivalence Class): The MPLS protocol groups packets with similar characteristics into a common class. Packets within the same FEC are handled similarly on the MPLS network.
-
LFIB (Label Forwarding Information Base): Functions similarly to the FIB (Forwarding Information Base) in IP networks. When an LSR receives a labeled packet, it searches the LFIB database for forwarding information, such as the label operation type, outgoing label value, and next hop.
MPLS Label Format | MPLS Frame Format
Figure 2: Generic MPLS label format or MPLS frame format
An MPLS label is inserted between the Layer 2 header and Layer 3 header of a packet. It is four bytes in size and consists of the following fields:
- Label: 20-bit label value.
- TC (Traffic Class): 3 bits, defines the class of service and is used for QoS.
- S (Stack): 1 bit. A label stack can comprise multiple labels. The label nearest to the Layer 2 header is the “top label,” while the label nearest to the Layer 3 header is the “bottom label.” The S field is set to 1 for the bottom label and 0 for all other stack entries.
- TTL (Time to Live): 8 bits, used for routing loop prevention.
List of MPLS Service Providers
Here are some MPLS network service providers:
- Cisco
- Windstream Communications
- Interoute Communications Limited
- MegaPath
- Sprint
- Integra
- Level 3 Communications
- EarthLink
- BT and TATA Docomo (MPLS IP VPN service in India)
The choice of MPLS over other networking technologies depends on specific organizational requirements, budget, and existing network infrastructure. As technology advances, options like Software Defined Wide Area Networks (SD-WAN) are also gaining traction.