This video explains how MPLS routers exchange label information using LDP and populate internal data structures (LIB and LFIB) for efficient label switching.
Prerequisites for MPLS
Before MPLS can operate, two requirements must be met:
1. Underlay Routing Protocol
- All MPLS core routers must run an IGP like OSPF or IS-IS. For more on how this foundational routing works, see CCNA Routing Fundamentals: Connected and Local Routes Explained.
- This creates the control plane underlay allowing routers to discover each other
- Important: This routing is NOT for customer traffic - it's only for MPLS control plane communication
2. LDP Adjacencies
- MPLS is enabled on a per-interface basis
- LDP automatically forms adjacencies only between directly connected MPLS routers
- Once established, labels begin to be exchanged between neighbors
Internal Router Constructs
The video compares traditional IP routing constructs with MPLS-specific data structures:
Traditional IP Routing
| Construct | Purpose | |-----------|---------| | RIB (Routing Information Base) | The routing table populated by routing protocols using administrative distance and metrics | | FIB (Forwarding Information Base) | Hardware-based subset of RIB containing only best routes for actual packet forwarding |
MPLS Additional Constructs
| Construct | Purpose | |-----------|---------| | LIB (Label Information Base) | Assigns a locally significant label to each prefix found in the RIB | | LFIB (Label Forwarding Information Base) | The counterpart to FIB - examined when a labeled packet arrives, often implemented in specialized hardware for ultra-efficient switching |
How Label Exchange Works
Locally Significant Labels
- Each MPLS router generates its own labels for each prefix
- These labels have meaning only for that specific router
- Routers must tell their neighbors what label they use for each prefix. For a broader overview of MPLS concepts, see MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide).
Example: Label Switching Process
For destination network 192.168.1.0/24:
PE Router (Router A):
- Local label: 27
- Remote label (from P1): 29
- Action: swaps label 27 → 29 before forwarding
P1 Router:
- Local label: 29
- Remote label (from P2): 31
- Action: swaps label 29 → 31
P2 Router (Penultimate):
- Local label: 31
- Outgoing label: "Pop Label"
- Action: Removes the label entirely before forwarding
Penultimate Label Popping (PHP)
- Penultimate means "second to last"
- The second-to-last P router in the path pops (removes) the MPLS label
- The packet arrives at the PE router with no label
- PE routers don't have labels for directly connected customer networks. For a deeper take on the routers involved, check out MPLS Labels, Device Roles & LDP Protocol Explained Simply.
- Traditional routing takes place between PE and CE routers. Understanding the IP transport layer is key, see IP, TCP, and UDP Explained: Networking Fundamentals for A+ Certification.
- This avoids unnecessary label operations at the final router
Key Takeaways
- MPLS requires an underlying IGP for control plane communication
- Labels are locally significant and exchanged via LDP
- The LFIB contains local label, outgoing label (from next hop), outgoing interface, and next-hop IP
- Penultimate label popping simplifies the final hop to the customer network
- Customer-facing interfaces use traditional routing, not MPLS label switching
Hello! This is Lazarus at telecom.Tech, where telecom and networking technologies... are simply explained! Today we'll be simply explaining Label Distribution Protocol for MPLS. This video series takes a look at MPLS from first principles. We start from scratch and build up to
more complex and detailed deployment scenarios, so whether you're new to MPLS or you just want to brush up on your understanding of the technology, this series is helpful for you! You can be notified of every new video that's published by subscribing and enabling notifications,
and if you find this video useful, please do click that thumbs up button! In previous videos, we introduced MPLS as a technology that is used to efficiently direct data between nodes, and we examined a simplistic traversal of a packet across an MPLS infrastructure. In this video,
we'll be taking a more detailed look at how MPLS routers exchange information about labels, and how that information is used to populate various internal constructs in an MPLS router that make MPLS possible. First of all, when you have an MPLS core network such as this one here,
you must have an underlying routing protocol that allows all of these devices to communicate with each other. So typically you'll have something like OSPF or IS-IS running so that these nodes here are able to find each other and communicate with each other. Now mind you, the purpose of this
underlying routing is not to get to the customer networks! It's only for the purpose of allowing these routers to find each other and to create the underlay network that will allow MPLS to operate. Now this is kind of counterintuitive because you will typically want to use MPLS
and label switching instead of routing, so why do we need routing? Remember MPLS label switching is responsible for transmitting customer traffic. This routing underlay here that we're talking about is here to allow the control plane to function. Now secondly, once you've established
that underlay routing, when you have two MPLS routers and you enable MPLS on these interfaces here, LDP will automatically attempt to make an LDP adjacency. MPLS is enabled on a per-interface basis, and we'll see that in practice when we configure MPLS routers in a future video. LDP
adjacencies take place only between directly connected MPLS routers. Once an adjacency like this is established, labels begin to be exchanged. But where are these labels stored and what is their significance and how are they related to the IP prefixes of our customers that we want to
relay over the infrastructure? To answer this, let's first take a look at the constructs used by normal IP routing that we all have come to know and love. When normal routing takes place, we have various entities within the router that enable it. We have the routing protocol such as EIGRP, OSPF,
BGP, or IS-IS for example.These protocols will run their algorithms and will discover the best paths within this infrastructure. Those best paths will be placed within the routing information base or the RIB. Now this is just another name for the routing table. Using various rules including
parameters such as administrative distance and routing protocol metrics, the RIB is populated. Now from the routing table, another construct is populated which is called the forwarding information base or the FIB. It's essentially a subset of the router's RIB that is typically
implemented in hardware for efficient forwarding and contains only the best routes selected for packet forwarding. Now when packets arrive at this router here it's the FIB that's used to determine the next hop to send the packet along its way. Now when MPLS is enabled and LDP begins
to exchange labels, we have some new constructs that are created within each LDP router. The LDP protocol is used to locally generate a label for each prefix that is found within the RIB. This creates the label information base or the LIB, within which the prefixes in the RIB are
assigned labels. The labels that are generated are only locally significant. This means that their actual values have meaning only for this particular router. The information in the list is then used to create the label forwarding information base or the LFIB. Now this is the
counterpart to the FIB for routing. Essentially when a packet arrives at an MPLS router, it is the LFIB that is examined to determine the next hop and send the packet along its way. Now the LFIB is often employed in hardware that is specifically designed for enabling ultra-efficient
label switching. Now since labels are locally significant, MPLS routers must know what label is being used for a particular prefix by its neighbors. That way when it forwards it to the next router in the path, it will replace its own locally significant label value with the value
that the neighboring router says it uses for that particular prefix. So for a destination network of 192.168.1.0/24, which exists on this customer network here, this PE router via LDP assigns a local label of 27 and this assignment is recorded in the LFIB. But this P router here has assigned
a locally significant label of 29 for this same prefix and through LDP, the P router informs the PE router of this information. So from the point of view of this PE router here, the local label is 27 and the remote label of the next hop node is 29. Now looking at the LFIB of this router here
using this command on a Cisco router, we see the local label as 27 and the outgoing label as 29. So when this router sends a packet for the prefix 192.168.1.0/24 to this router it will swap its own label of 27 with the label of the P router which is 29 before it sends it out. And in the LFIB you
can also see that we have the outgoing interface as well as the IP address of the next hop. So the label switching process at this router has all the information it needs to send the packet to the next node in the path. Now the process continues. When the packet gets to P1 you can see that the
local label is 29 and the remote label of the next hop rer is 31 so it swaps the labels and forwards the packet with the new label to P2 which is the next hop router. Now what we see in the LFIB for P2 is interesting. We see the local label here is 31 but for the outgoing label column which is
essentially the advertised label from the network PE router here, we see "Pop Label." This simply means that before sending the packet, it will simply remove the label and send it to the peer with no label at all! This is called "penultimate label popping." The word "penultimate" simply
means "second to last." By definition, the last P router you encounter in the path is always the second to last router that's encountered along that path. So this penultimate router will pop the label or remove it before sending it to the PE router which is the ultimate or the final router
in the path. Now we look at the LFIB of this PE router here, and we'll see that we don't find the 192.168.1.0/24 network in the LFIB at all! Why? Because PE routers don't have a label assigned to the networks of the customers to which they are directly connected. This is because PE routers
and CE routers will have a routing protocol running between them, so routing here takes place using conventional routing protocols and it is for this reason that the penultimate label popping takes place. So once the packet reaches the PE, it is simple routing that will direct it
to the CE and to the final destination network. So hopefully going through this process, you can see how LDP works, how labels are exchanged, how the LFIB is populated, and how local and remote labels are used to allow MPLS to operate. Well I hope you found this video useful and if you
have please click that thumbs up button! If you have any questions or feedback please feel free to leave a comment and, please subscribe to get updates of newly published videos! I'm Lazarus at telecom.Tech, I hope this video has been helpful for you, and I'd like to thank you for watching!
MPLS requires an underlay routing protocol (like OSPF or IS-IS) for core routers to discover each other and exchange control-plane information, and LDP adjacencies must be established on directly connected MPLS-enabled interfaces. The IGP ensures routers can communicate for label distribution, while LDP enables automatic label exchange between neighbors.
The LIB (Label Information Base) assigns a locally significant label to every prefix in the RIB, essentially acting as a label mapping table. The LFIB (Label Forwarding Information Base) is used for actual packet forwarding—when a labeled packet arrives, the router checks the LFIB to determine the outgoing label swap, pop, or push operation, often in specialized hardware for speed.
Each MPLS router generates its own labels for prefixes, meaning a label like '27' has meaning only on that specific router. LDP enables neighbors to share their local label mappings—for example, Router A tells its neighbor it uses label 27 for prefix 192.168.1.0/24, so the neighbor knows to send packets with that label when forwarding to Router A.
A PE router receives a packet for prefix 192.168.1.0/24 and pushes its local label (e.g., 27). The next hop P1 swaps this label to its own (29), then P2 swaps to 31. The penultimate router pops the label before forwarding, so the egress PE receives an unlabeled packet and uses traditional IP routing to reach the customer edge.
PHP occurs on the second-to-last (penultimate) router in the MPLS path, which removes the label before forwarding to the egress PE. This avoids unnecessary label processing at the final router because PE routers do not have labels for directly connected customer networks—they rely on IP routing for the last hop to the CE.
Customer-facing interfaces (PE-CE links) use traditional IP routing, not MPLS label switching. MPLS labels are only applied and swapped within the core network between core and provider edge routers, while the last hop to customer networks uses standard IP forwarding based on the FIB.
The LFIB is optimized for label-based forwarding, often implemented in hardware (e.g., ASICs) to perform label swap/pop/push operations at line rate. Unlike IP routing, which requires longest-prefix match lookups, LFIB simply matches the incoming label to a fixed-size entry, enabling ultra-efficient switching of labeled packets.
Keep this summary
Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.
Save to LunaNotesOr summarise for another video.
32K+ people have turned 65K+ videos into notes
“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.
Related summaries
MPLS Labels, Device Roles & LDP Protocol Explained Simply
This video from telecom.Tech breaks down MPLS labels, the roles of CE, PE, and P routers, and how the Label Distribution Protocol (LDP) auto-populates forwarding tables. A clear, beginner-friendly overview of MPLS core network operations and packet switching mechanics.
MPLS Label Operations: Pushing, Swapping, and Popping Explained
Learn the fundamentals of MPLS label operations including pushing, swapping, and popping. This video breaks down how LDP labels are added, switched, and removed as packets traverse an MPLS network, with a practical topology example showing label stack management for Layer 3 VPNs.
MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide)
MPLS is a high-performance network protocol used in ISP core networks to efficiently direct data between nodes using labels instead of IP lookups. It sits between Layer 2 and Layer 3, encapsulates multiple protocols, and is ideal for interconnecting customer sites securely. This video provides a simple introduction to MPLS, comparing it to traditional IP routing and explaining its key benefits.
Basic MPLS Configuration on Cisco IOS: Step-by-Step Guide
Learn how to configure MPLS on Cisco IOS routers in a typical ISP network. This video walks through the full process: eBGP peerings with customers, OSPF underlay, iBGP full mesh among PEs, and finally enabling MPLS with LDP, followed by verification using LFIB and PHP.
How BGP Is Used in the MPLS Core: Edge Routing Explained
Learn how BGP operates only on the perimeter of an MPLS network, enabling PE routers to share customer routes while core P routers stay label-switching only. This video breaks down the CE/PE/P router roles, IBGP full-mesh on edges, and why MPLS beats IP routing for scalability.
Most viewed summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.
Found this summary useful?
Take it with you. One click puts it in your own LunaNotes library.
Save to LunaNotes