MPLS Packet Journey: The Three Label Operations at Each Hop
This walkthrough follows a packet from CE1 (192.168.11.0/24) to CE2 (192.168.12.0/24) across an ISP's MPLS infrastructure. The CE routers are MPLS-unaware and forward packets using standard routing protocols between CE and PE routers. For a foundational understanding of how MPLS differs from traditional routing, see this MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide).
1. Label Push at PE1 (Ingress LSR)
- PE1 receives the unlabeled IP packet from CE1
- It performs a destination IP lookup in its LFIB (Label Forwarding Information Base)
- LFIB shows: local label = 101 (not pushed), outgoing label = 201
- PE1 pushes label 201 onto the packet (only the remote label, not its own)
- This label was learned via LDP from P1
- The packet exits via the interface pointing toward P1's underlay IP
Note on Label Ranges:
- Labels 0-15 are reserved (see RFC 3032)
- Most vendors start dynamic assignment at label 16
- For easier troubleshooting, administrators can assign unique ranges per router (e.g., PE1: 100-199, P1: 200-299, P2: 300-399)
2. Label Swap at P1 (Transit LSR)
- P1 receives the labeled packet and inspects the top label (201)
- LFIB lookup for destination prefix reveals:
- Outgoing label = 301
- Exit interface toward P2
- Next-hop underlay IP = P2
- P1 performs a swap: removes label 201 and pushes label 301 in its place
- This is the core MPLS switching operation at each transit LSR
To better understand how labels are initially distributed between neighbors, check out LDP in MPLS: Label Distribution Protocol Simply Explained.
3. Label Pop at P2 (Penultimate Hop Popping - PHP)
- P2 receives the packet with label 301
- LFIB shows: outgoing label = "Pop label" (explicit PHP instruction)
- P2 pops the label entirely (removes the MPLS header)
- The unlabeled IP packet is forwarded to PE2 using standard routing
Why PHP Matters:
- Reduces the processing load on the egress PE router (PE2)
- PE2 only needs to perform a simple IP routing lookup, not an LFIB lookup
- This optimization is configured by the egress LSR (PE2) advertising an implicit null label (label 3) to its upstream neighbor
Practical Takeaways for MPLS Implementation
- Label stacking enables multiple services: When MPLS is combined with Layer 3 VPNs, multiple labels can be pushed (e.g., outer label for transport, inner label for VPN identification)
- All operations (push/swap/pop) are based on information exchanged via LDP (Label Distribution Protocol) between neighboring LSRs
- Labels are locally significant and only meaningful between directly connected peers
- The packet's original IP header is never inspected after the first LSR, enabling fast forwarding through the MPLS core
For a foundational understanding of MPLS router roles and how these operations fit into the bigger picture, review MPLS Labels, Device Roles & LDP Protocol Explained Simply.
Key Mnemonic:
- Push = add a new label at ingress
- Swap = replace the incoming label with the outgoing label at each transit LSR
- Pop = remove the label at the penultimate hop (PHP) or egress LSR
For configuration details on setting label ranges and advanced label stacks (e.g., for Layer 3 MPLS VPNs), watch the follow-up videos in this series on telecom.Tech.
If you're new to networking concepts, you might find the CCNA Day 1: How Switches Work vs Hubs & Hands-On Packet Tracer Lab helpful for understanding the switching fundamentals underlying MPLS operations.
For those interested in broader tech terms, we also have a guide on 20 Key AI Terms Every Engineer Must Know Explained Simply.
Hello! This is Lazarus at telecom.Tech, where telecom and networking technologies... are simply explained! Today we'll be simply explaining the pushing, swapping, and popping of MPLS labels. As always, don't forget to subscribe, enable notifications, and like this video if
you like this video! And if you have questions or feedback, please write them in the comments below! I'm always happy to read them and to respond. Last time, we took a closer look at how LDP operates within the framework of MPLS. In this video, we'll take a look at the mechanisms involved
in adding switching and removing LDP labels. In MPLS terminology, this is called pushing, swapping, and popping labels. Now it's important to understand the fundamentals of this process now because in later videos we'll be talking about how MPLS interacts with other features such as
Layer 3 VPNs. In these cases you can have label stacks where you can push multiple labels onto a packet to provide traffic segmentation based on customer networks. We'll talk more about that in a future video, but to understand these concepts, we'll first need to know how pushing, swapping,
and popping labels takes place. Here we have two customer devices, CE1 and CE2, and we have an MPLS infrastructure that's being used by the ISP to interconnect these two sites. In our scenario, some host on the 192.168.11.0/24 network is sending data to the 192.168.12.0/24 network.
Remember the CE routers know nothing about MPLS, so they're going to send their data based on the routing protocol that's being run between the CE and PE routers here. So the packet arrives at PE1. PE1 looks at the destination IP address and does a lookup in its LFIB. It sees that the local label
is 101 and the outgoing label of the next hop node which is P1 is 201. Now at this pointm I'd like to say a few words about the actual label values. The label is a 20-bit field within the MPLS header. Label values 0 to 15 are reserved for special purposes and cannot be assigned to specific
prefixes. If you're interested in finding out more about those reserved labels take a look at a link to the related RFC in the description below. So by default, in most vendor implementations, LDP labels for MPLS are assigned starting with a value of 16. This is certainly the case for
Cisco devices while other vendors may choose a different implementation. Since labels are locally significant, it doesn't really matter what actual values are used. So if you leave all configurations at their default you will most likely see that the same label is being used by
multiple routers along the path. Now because we humans need some way to differentiate between the actions taken by each node in the path, it's always a good idea to change this default behavior such that we can more easily determine which labels are assigned by which nodes. For example,
you can make PE1 here use a range of labels from 100 to 199, make P1 here use a range of labels from 200 to 299, and P2 to use a range of 300 to 399, and so on, and you can do that for all their label assignments. That way you can know which node generated which label. For now, let's say
that we've already done this for our topology. In a later video, when we get into configurations, we'll show how this is actually implemented. For now, let's take a look at what the PE1 node does with this packet. As it sends the packet out, it will push a label onto it. Remember,
pushing means adding a label. Specifically, label 201 is pushed. You can see that value in the outgoing label column of the LFIB in PE1. How did PE1 know to push that label? Because P1 shared with PE1 that its label for that particular network is 201. We can also see the exit interface
as well as the next hop IP of P1 within the LFIB. Remember that the next hop IP is the IP addressing that's used in the underlay network that supports the MPLS infrastructure. Now if we look inside the MPLS header, we'll see that label 201 has been added or pushed into the appropriate field. Now
you'll note that PE1 here has a local label for the 192.168.11.0/24 network that local label is actually never pushed onto the packet. In this specific scenario, this is because the PE1 router is the first MPLS router that is encountered along the path so that label is never pushed. Only the
remote label, that is, the label advertised by P1, is pushed in order to forward the packet appropriately. However as we will see later on, this label will be used when MPLS is employed with Layer 3 VPNs, but at this point, I digress. Let's go on to what we're looking at in this video. So
that was label pushing. Now P1 will take a look at its own LFIB and we'll find the destination prefix, and we'll see that the defined outgoing label is 301. We also see the exit interface and the next hop IP of P2 of the underlay network, which is actually our next hop node. This label
and the additional information was learned via LDP, so P1 will perform label swapping at this point. It will remove its own label of 201 which is how the packet arrived and, it will swap it with the remote label, or outgoing label for this particular destination which is 301,
and it will send it to P2, which is the next hop node. Now once the packet reaches the P2 router, it will look up the destination in the LFIB and it will see an outgoing label of "Pop label." This is the penultimate hop popping process that we talked about in the previous video. The last P router in
the path, which in this case is P2, will pop the label, or in other words, remove the label before it is sent to the final PE router which is PE2. As you can see, the MPLS header here is removed completely during the popping process and thus the data arrives at PE2 with no label. That
means that PE2 here will simply use traditional routing to get that packet to the destination, which is behind find this C2 router here. So that covers the fundamentals of label pushing, swapping, and popping, all fundamental operations found within MPLS. I hope you found this video
useful, and if you have, please click that thumbs up button! If you have any questions feel free to leave a comment, and please subscribe to get updates to newly published videos. I'm Lazarus at telecom.Tech, I hope this has been helpful for you and I'd like to thank you for watching!
The three MPLS label operations are Push, Swap, and Pop. Push adds a new label at the ingress LSR (like PE1), Swap replaces the incoming label with a new outgoing label at each transit LSR (like P1), and Pop removes the label at the penultimate hop (PHP) or egress LSR (like P2) to reduce processing load.
PE1 only pushes the outgoing label (201) learned via LDP from its downstream neighbor (P1). PE1's own local label (101) is not pushed because it is only meaningful for incoming packets, not outgoing ones. This ensures the packet has the correct label for the next hop, not the ingress router's label.
PHP occurs when the penultimate router (P2) pops the MPLS label and forwards the unlabeled IP packet to the egress router (PE2). This optimization reduces PE2's processing load by eliminating the need for an LFIB lookup, allowing it to perform a simple IP routing lookup instead. It's configured via an implicit null label (label 3) advertised by PE2.
Label stacking adds multiple labels to a packet, with an outer label for transport through the MPLS core and inner labels for specific services like VPN identification. This is commonly used in Layer 3 MPLS VPNs to separate traffic flows and enable multi-service support on the same infrastructure.
Labels 0-15 are reserved for special purposes per RFC 3032, while dynamic assignment starts at label 16. Administering unique ranges per router (e.g., PE1: 100-199, P1: 200-299) simplifies troubleshooting by making it easy to identify which router assigned a label based on its value.
LDP (Label Distribution Protocol) exchanges label-to-prefix bindings between neighboring LSRs, populating each router's LFIB. This allows PE1 to learn P1's label for a destination, P1 to learn P2's label, and P2 to learn PE2's implicit null, enabling the push, swap, and pop operations at each hop.
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
LDP in MPLS: Label Distribution Protocol Simply Explained
Learn how Label Distribution Protocol (LDP) works in MPLS networks. This comprehensive guide explains label exchange, LIB and LFIB constructs, and penultimate label popping from first principles.
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 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