Multiprotocol Label Switching (MPLS) is a high-performance network technology that improves forwarding efficiency by using labels instead of relying solely on traditional IP routing. Labels simplify packet processing by allowing routers to forward packets based on fixed paths (Label-Switched Paths, or LSPs), bypassing the need for IP header lookups at every hop.
MPLS operates by appending labels to packets and using these labels for forwarding decisions. This label is placed between the Layer 2 (e.g., Ethernet) and Layer 3 (IP) headers, making it highly efficient for routing and switching.
Labels:
How MPLS Works:
Label-Switched Paths (LSPs):
MPLS relies on label distribution protocols to establish LSPs and manage labels. The two main protocols are LDP and RSVP-TE.
What is LDP?
Key Features:
How LDP Works:
Configuration Example:
set protocols ldp interface ge-0/0/1
set protocols ldp transport-address 192.168.1.1
ge-0/0/1 and sets a transport address.What is RSVP-TE?
Key Features:
How RSVP-TE Works:
Configuration Example:
set protocols mpls interface ge-0/0/2
set protocols rsvp interface ge-0/0/2 bandwidth 100m
ge-0/0/2 and reserves 100 Mbps for the LSP.MPLS is versatile and supports various applications that enhance network performance and scalability.
What is Traffic Engineering?
Benefits:
Example:
MPLS enables highly scalable and flexible VPN solutions.
L3VPN (Layer 3 VPN):
L2VPN (Layer 2 VPN):
To set up a basic MPLS network:
Step 1: Enable MPLS on Interfaces
set protocols mpls interface ge-0/0/1
set protocols mpls interface ge-0/0/2
Step 2: Enable LDP
set protocols ldp interface ge-0/0/1
set protocols ldp interface ge-0/0/2
Step 3: Verify Configuration
show mpls lsp
show ldp neighbor
Label-Switched Paths (LSPs) are the foundation of MPLS, providing the pre-established routes that packets follow. LSPs can be categorized based on their signaling protocols and setup mechanisms.
What Are Static LSPs?
Use Cases:
Configuration Example:
set protocols mpls static-lsp lsp1 ingress 192.168.1.2
set protocols mpls static-lsp lsp1 egress 192.168.2.2
set protocols mpls static-lsp lsp1 next-hop 10.0.0.2
What Are Dynamic LSPs?
Advantages:
MPLS issues can arise from configuration errors, protocol mismatches, or hardware failures. Below are common troubleshooting steps and commands.
Check the Status of LSPs:
show mpls lsp
Inspect Label Assignments:
show mpls label-table
Check LDP Neighbors:
show ldp neighbor
Check RSVP-TE Signaling:
show rsvp session
show rsvp interface
Ping an MPLS Destination:
ping mpls lsp lsp-name
Trace MPLS Traffic:
traceroute mpls lsp lsp-name
LDP Session Fails:
RSVP LSPs Not Established:
Packets Not Forwarded via MPLS:
Use loopback interfaces as LDP or RSVP-TE transport addresses for stability.
set interfaces lo0 unit 0 family inet address 10.0.0.1/32
set protocols ldp transport-address 10.0.0.1
Configure multiple LSPs for failover and load balancing.
Example with RSVP-TE:
set protocols rsvp interface ge-0/0/1 backup-lsp backup-path
show mpls lsp and SNMP-based monitoring.Use access control lists (ACLs) to restrict label distribution and signaling traffic.
set firewall family inet filter MPLS-SEC term 1 from protocol tcp
set firewall family inet filter MPLS-SEC term 1 from destination-port [ 646 15006 ]
set firewall family inet filter MPLS-SEC term 1 then accept
set protocols mpls interface ge-0/0/1
set protocols ldp interface ge-0/0/1
set protocols ldp transport-address 10.0.0.1
set protocols rsvp interface ge-0/0/2 bandwidth 100m
show mpls lsp
show ldp neighbor
show rsvp session
Multiprotocol Label Switching (MPLS) is a performance-optimized forwarding technology that uses labels instead of IP lookups for routing decisions. It operates between Layer 2 and Layer 3 and is widely used in service provider and enterprise core networks.
Multiprotocol means that MPLS can transport various types of network protocols, including IPv4, IPv6, Ethernet, and even Frame Relay or ATM payloads.
MPLS supports a label stack, meaning multiple labels can be applied to a single packet. This is especially common in L3VPN or traffic engineering scenarios.
The top label determines the next hop (used for forwarding).
The bottom label may identify the VPN or service context.
Example: In an MPLS L3VPN, a packet might carry two labels:
Outer label: used for transport across the MPLS core (for PE-to-PE forwarding).
Inner label: identifies the specific VPN or customer.
Label stacking enables hierarchical routing and allows MPLS to scale to support complex multi-tenant networks.
MPLS relies on protocols like LDP and RSVP-TE to distribute label information and set up Label-Switched Paths (LSPs).
It’s important to distinguish between:
Control Plane:
Handles LSP establishment, label exchange, and signaling.
Protocols like LDP and RSVP-TE operate in the control plane.
Data Plane:
Performs actual packet forwarding based on the label lookup (LFIB).
MPLS routers (LSRs) forward packets without inspecting the IP header.
Example: LDP builds LSPs in the control plane by exchanging label bindings, while the router uses these labels to forward packets in the data plane.
| Topic | Key Enhancement |
|---|---|
| Multiprotocol Nature | MPLS can carry multiple network layer protocols like IPv4, IPv6, and Ethernet. |
| Label Stack | MPLS supports label stacking, enabling complex services like L3VPN and traffic engineering. |
| Control vs. Data Plane | Clear separation: Control plane builds paths (LDP/RSVP), Data plane forwards packets using labels. |
What is the purpose of MPLS labels?
MPLS labels allow routers to forward packets based on labels instead of IP lookups.
In MPLS networks, routers attach a short numeric label to packets as they enter the MPLS domain. Instead of performing complex IP routing table lookups at every hop, routers forward packets based on these labels using simple label switching operations. This improves forwarding efficiency and enables advanced features such as traffic engineering and VPN services. The label is inserted between the Layer-2 header and the IP header, forming what is known as the MPLS shim header.
Demand Score: 91
Exam Relevance Score: 95
What is the difference between LDP and RSVP in MPLS?
LDP distributes labels automatically, while RSVP supports traffic engineering.
Label Distribution Protocol (LDP) automatically assigns labels based on the IGP routing table. It is simple and widely used for basic MPLS networks. Resource Reservation Protocol with Traffic Engineering (RSVP-TE) allows administrators to explicitly control paths through the network and reserve bandwidth. RSVP-TE is commonly used when traffic engineering or guaranteed bandwidth is required.
Demand Score: 88
Exam Relevance Score: 94
What is a Label Switched Path (LSP)?
An LSP is the path that packets follow through an MPLS network.
A Label Switched Path is established between an ingress router and an egress router within the MPLS domain. Each router along the path assigns and swaps labels according to its forwarding table. The path may be determined automatically by the IGP (in LDP networks) or explicitly configured using RSVP-TE. LSPs allow predictable forwarding and enable traffic engineering features.
Demand Score: 85
Exam Relevance Score: 93
What is the difference between label push, swap, and pop in MPLS?
Push adds a label, swap replaces a label, and pop removes a label.
These three operations describe how MPLS forwarding works at different points in the network. The ingress router usually performs a push operation by attaching one or more labels to a packet entering the MPLS domain. Transit routers typically perform swap operations by replacing the current top label with a new one that is meaningful for the next hop. The egress or penultimate router may perform a pop operation, removing the top label before the packet exits the MPLS network. Understanding these terms is important because they describe the actual forwarding behavior of routers in an MPLS path. Many learners memorize the terms without understanding their sequence. The easier way to remember them is entry equals push, middle equals swap, exit equals pop. That mental model is highly useful in troubleshooting and exam questions.
Demand Score: 84
Exam Relevance Score: 92
What is penultimate hop popping (PHP) in MPLS?
PHP is when the router before the egress removes the top label so the egress router does less MPLS processing.
Penultimate hop popping occurs when the second-to-last router on an LSP removes the outer label before sending the packet to the egress router. This means the egress router can process the packet more efficiently because it receives either an unlabeled IP packet or a packet with one fewer label to inspect. PHP is commonly used in MPLS networks to reduce work on the egress router and simplify forwarding behavior. For exam purposes, the key idea is not just that a label is removed early, but why it is removed: to optimize forwarding at the final hop. A frequent mistake is assuming the egress router always removes the label itself. In many cases, the penultimate router does that job instead.
Demand Score: 79
Exam Relevance Score: 90
Why might an MPLS LSP fail to come up?
Because the underlying IGP, label distribution, or interface configuration is incomplete or inconsistent.
An MPLS LSP depends on several layers working correctly. First, basic IP reachability in the core must exist, usually through OSPF or IS-IS. Second, MPLS must be enabled on the correct interfaces. Third, the label distribution mechanism such as LDP or RSVP must establish neighbor relationships and exchange labels successfully. If any of these pieces are missing, the LSP may not form. For example, an IGP adjacency issue can prevent loopback reachability, which in turn prevents label bindings from being useful. Similarly, if MPLS is not enabled on a transit interface, labeled traffic may fail even though IP routing appears correct. The exam often tests this layered dependency: MPLS problems are frequently not purely MPLS problems, but IGP or interface problems underneath.
Demand Score: 87
Exam Relevance Score: 94