MPLS Label Switching vs. IP Packet Switching: Key Differences
Advertisement
This page compares MPLS label switching and IP packet switching, highlighting the key differences between them. We’ll also touch upon the benefits of MPLS label switching and provide links to related concepts like circuit switching, packet switching, and message switching.
What is Label Switching (MPLS)?
Label switching uses labels, rather than IP addresses, for switching and routing packets. It operates at Layer 2.5, effectively sitting between Layer 2 (data link layer) and Layer 3 (network layer) of the OSI model.
An MPLS label, used for label switching, is inserted between the Layer 2 header and the Layer 3 header. It is 4 octets (32 bits) in size and consists of the following fields:
MPLS Label = { Label (20 bits) , EXP or TC (3 bits), S (1 bit), TTL (8 bits) }
- Label (20 bits): The actual label used for switching. Values from 0 to 15 are reserved.
- EXP (3 bits): Experimental bits, often used to indicate Quality of Service (QoS) or priority for the label. Also known as Traffic Class (TC).
- S (1 bit): Indicates whether the label is the last one in the stack. A value of 1 indicates it’s the bottom label.
- TTL (8 bits): Time to Live.
Label Stacking
The figure above shows label stacking, where multiple labels can be applied to a single packet. The label closest to the Layer 2 header is known as the “top label,” while the label closer to the Layer 3 header is the “bottom label.”
MPLS Operations: Push, Swap, and Pop
MPLS label switching relies on three basic operations:
- Push: The ingress (entry point) CE (Customer Edge) router assigns a label to the incoming packet.
- Swap: Routers within the Label Switched Path (LSP) swap the incoming label for an outgoing label.
- Pop: The egress (exit point) router removes the label from the packet before forwarding it to its final destination. This happens when the destination has been reached and the label is no longer needed.
MPLS Network Architecture
The figure above depicts a simple MPLS network. It consists of different router types used for switching and routing MPLS packets between end systems (hosts):
- CE Routers (Customer Edge): Located at the edge of the network, connecting to customer networks.
- PE Routers (Provider Edge): Located at the edge of the service provider’s network.
- P Routers (Provider): Core routers within the service provider’s network.
Label Switching Example
The following table illustrates a label switching example between Station A and Station B:
Router | Designation | Incoming Label | Incoming Interface | Destination network | Outgoing interface | Outgoing Label |
---|---|---|---|---|---|---|
R1 | - | - | e0 | 172.16.1 | S1 | 6 |
R2 | 6 | S0 | 172.16.1 | S2 | 11 | |
R3 | 11 | S0 | 172.16.1 | S3 | 7 | |
R4 | 7 | S1 | 172.16.1 | e0 | - |
LERs (Label Edge Routers) and LSRs (Label Switching Routers) maintain tables:
- FEC (Forwarding Equivalence Class) table: {Label In, Destination IP Address, Label Out, Interface}
- LIB (Label Information Base) table: {Label In, Label Out, Interface }
An LSR combines the functionalities of both a switch and a router.
Benefits (Advantages) of MPLS Label Switching
- Protocol Agnostic: MPLS can forward any data across a network, not just IP traffic. It operates based on labels, not destination IP addresses.
- Multi-Protocol Support: It can transport various protocols, including ATM, SONET, and Ethernet.
- Integrated Voice and Data: Voice and data can be transported on the same network infrastructure.
- Efficient Bandwidth Utilization: MPLS can improve bandwidth utilization through traffic engineering.
- Network Resiliency: MPLS supports fast re-route mechanisms for improved network resilience.
IP Packet Switching
Difference Between Label Switching (MPLS) and IP Switching
Feature | MPLS Label Switching | IP Packet Switching |
---|---|---|
Routing Basis | Routes packet based on a 20-bit label. | Routes packet based on a 32-bit IP address. |
Path Establishment | Establishes a dedicated path known as an LSP (Label Switching Path) before data flow. | Doesn’t establish a dedicated path. Data is transmitted as datagrams, routed based on IP addresses. |
Forwarding Table | Each router builds an LFIB (Label Forwarding Information Base) table using a protocol like LDP (Label Distribution Protocol). | Stores an IP routing table. |