MPLS Fundamentals: From Tag Switching to the Label Stack

MPLS fundamentals cover: from Cisco tag switching to the service provider backbone

Ask engineers why MPLS exists and many will say "because label lookups are faster than IP lookups". That answer is about 25 years out of date, and it hides the things you actually need to understand to run an MPLS network: why the label sits where it sits, why the egress router advertises a label that never appears on the wire, why your customer's traceroute shows (or hides) your core, and why the label stack, not the label, is the real invention. These are the MPLS fundamentals, and this first part of our 26-part MPLS & EVPN Deep Dive covers them from the original RFCs, with real labeled frames captured in March 2000 that we decode byte by byte.

We go from the ATM problem that started it (tag switching, 1996-1997) to the 32-bit label stack entry, the vocabulary (LSR, edge LSR/LER, FEC, LSP, FTN, ILM, NHLFE, LFIB), the three label operations, penultimate hop popping, explicit null and TTL handling, and end with why MPLS is still in every service provider backbone in 2026.

TL;DR
  • MPLS began as Cisco Tag Switching (RFC 2105, 1997): a way to put IP routing on ATM switches, whose cores were then much faster than routers[3][6][7]. The IETF standard is RFC 3031 (architecture) and RFC 3032 (label encoding), both January 2001[1][2].
  • A label stack entry is 4 bytes: 20-bit label, 3-bit TC (ex-EXP), 1-bit S (bottom of stack), 8-bit TTL. Ethertype 0x8847. Labels 0-15 are reserved[2][15].
  • The ingress classifies the packet into a FEC once and pushes; transit LSRs swap; the label is popped at the egress or, by default, one hop earlier (PHP, triggered by label 3, implicit null)[1][2].
  • Our decode of real frames from March 2000 shows label 29 with S=1 and TTL 255, IP precedence copied into the TC bits, a two-label stack (18 over 16) and the pre-standard TDP on port 711[22][23].
  • MPLS lasted because of services (L3VPN, TE, FRR, L2VPN, EVPN, Segment Routing), not speed. Bruce Davie, a co-author of the tag switching RFC, says the speed argument "turned out to have little practical impact"[5].

Why MPLS was invented: ATM cores, slow routers and the n-squared problem

In the mid-1990s the large US ISPs had a capacity problem. Ivan Pepelnjak, whose MPLS/VPN book came out in 2001, puts numbers on it[7]: the Cisco AGS+ backplane carried 533 Mbit/s, the Cisco 7500 launched in 1995 had a 1.067 Gbit/s CyBus (2.1 Gbit/s on the dual-bus models), while Cisco's own entry-level LightStream 1010 ATM switch, launched the same year, had 5 Gbit/s[6]. The fastest way to build a big backbone was therefore ATM switches in the core and routers at the edge.

That design had an operational cost. ATM switches did not run IP routing, so the routers were connected by a mesh of permanent virtual circuits (PVCs) and ran their IGP over that mesh. With n routers you need n(n-1)/2 circuits, and every router has n-1 IGP neighbours over the cloud. Pepelnjak calls it "a spaghetti-mess nightmare"[6]. Figure 1 shows the difference.

Diagram comparing a 1990s IP over ATM overlay with a full mesh of virtual circuits and an integrated MPLS core where every node runs the IGP
Figure 1. Left: the 1990s overlay, routers fully meshed over ATM virtual circuits. Right: tag switching/MPLS, where the core switches run the IGP themselves and forward on labels. Sources: ipSpace.net, RFC 2105, B. Davie.

Several vendors attacked the problem at the same time: Ipsilon with IP Switching (its Flow Management Protocol was published as RFC 1953 in May 1996)[4], IBM with ARIS, Toshiba with the Cell Switch Router, and Cisco with Tag Switching[7]. Cisco's design was published as RFC 2105, Cisco Systems' Tag Switching Architecture Overview, in February 1997 by Yakov Rekhter, Bruce Davie, Dave Katz, Eric Rosen and George Swallow. Its own motivation statement is about performance and scale: "The simplicity of the tag switching forwarding paradigm (label swapping) enables improved forwarding performance, while maintaining competitive price/performance"[3]. Section 5 of the same RFC explains why it maps naturally to ATM: "since ATM forwarding is also based on label swapping, tag switching technology can readily be applied to ATM switches"[3].

FORE Systems ForeRunnerLE 25 ATM switch, the kind of ATM hardware that tag switching and MPLS were designed to reuse
A FORE Systems ForeRunnerLE 25 ATM switch. ATM switches forwarded fixed 53-byte cells by swapping VPI/VCI labels, which is the model tag switching borrowed. Photo: Barcex, Wikimedia Commons, CC BY-SA 3.0.

Who invented it?

Bruce Davie, one of the RFC 2105 authors, gives the most direct account. He credits Yakov Rekhter, "who wrote the original ideas for Tag Switching in a 2-page memo that was circulated internally at Cisco", and notes that a 1995 SIGCOMM paper by Chandranmenon and Varghese on threaded indices had the same core idea of a fixed-length identifier standing in for a variable-length prefix. Davie also credits Eric Rosen with seeing "that a label stack could readily be generalized to an arbitrary depth", which he calls "one of the truly powerful additions to the MPLS architecture"[5]. Remember that last point: almost everything MPLS does today is built on the stack.

Cisco took Tag Switching to the IETF, and the MPLS working group was formed in 1997 to produce one standard out of the competing proposals. Pepelnjak's summary of what happened is blunt: the working group "replaced Tag Distribution Protocol (TDP) with completely different (but mostly functionally equivalent) Label Distribution Protocol, while the data-plane packet format remained unchanged"[7]. That is why the captures we decode below, recorded with TDP in March 2000, already carry exactly the label format that RFC 3032 standardised ten months later. TDP had its own registered port: IANA still lists cisco-tdp on TCP and UDP port 711, with Bruce Davie as the assignee[16]. LDP later got port 646.

MPLS history timeline from threaded indices and tag switching in 1995-1997 through RFC 3031 and RFC 3032 in 2001 to Segment Routing and MPLS Network Actions
Figure 2. MPLS history from 1995 to 2026 with the primary sources for each step. The IETF MPLS working group is still active in 2026, working on MPLS Network Actions and on-path telemetry.

The speed myth, and what actually made MPLS take off

There is a long-running argument about whether MPLS was "about speed". Both sides are partly right, and the primary sources let you separate them. In 1997 the stated goal was forwarding performance (RFC 2105 says so in its first paragraph)[3], and in 2026 Pepelnjak still argues that "the initial use case was improved forwarding performance (in particular, using ATM switches in IP network)"[6]. But by the time vendors built label-only hardware, the advantage was gone. Davie: "We even went as far as designing a router line card that could forward labeled packets only, to test this out. The line card was negligibly cheaper than a full-blown IP forwarding card, and no faster, because by this point fast IP lookups, while not trivial, were largely a solved problem"[5].

What made MPLS spread, according to Davie, was enterprise VPNs: "What ultimately made MPLS take off - and it did, in an under-the-radar sort of way - was enterprise VPNs", the BGP/MPLS VPNs of RFC 2547, a problem brought to the team by AT&T, which was struggling to keep up with its Frame Relay VPN business[5][8]. RFC 2547 was published in March 1999 by Eric Rosen and Yakov Rekhter, and its standards-track successor RFC 4364 in February 2006[8]. The traffic engineering requirements followed in September 1999 (RFC 2702) and RSVP-TE in December 2001 (RFC 3209)[10]. So the honest version is: MPLS was designed for speed on ATM, and it survived for services.

The ATM heritage still shapes the protocols. Pepelnjak points out that most of the TDP/LDP complexity comes from hardware that "could not do IP lookups", could not pre-allocate labels for every prefix and could not merge two streams[6]. The label distribution modes in Figure 5 (downstream on demand, conservative retention, ordered control) exist largely for cell-mode ATM LSRs, which RFC 3035 covers separately[1][9]. Cell-mode MPLS is gone; the modes remain in the standards and in some vendor knobs.

MPLS fundamentals: the 32-bit label stack entry

RFC 3032 defines the encoding. A labeled packet carries a label stack, a sequence of 4-byte label stack entries placed after the link-layer header (after any 802.1Q tag) and before the network-layer header[2]. Each entry has four fields:

FieldBitsPurpose
Label20The actual label value, 0 to 1,048,575. Values 0-15 are special-purpose; ordinary labels start at 16.
TC (Traffic Class)3Called "Experimental Use" (EXP) in RFC 3032; RFC 5462 (February 2009) renamed it, because it had been used for QoS since RFC 3270[11].
S (Bottom of Stack)11 on the last entry of the stack, 0 on all others.
TTL8Time to live, decremented at every hop, with the same loop-protection purpose as the IP TTL.

On Ethernet, RFC 3032 assigns ethertype 0x8847 to "MPLS unicast" and 0x8848 to "MPLS multicast"[2]. There is no field that says which protocol is under the stack: the receiving router knows it from the bottom label's binding (or from the first nibble of the payload, which is a common hardware shortcut). That is the "multiprotocol" in MPLS: the same stack can carry IPv4, IPv6, Ethernet frames or another label.

MPLS label stack entry format: 20-bit label, 3-bit traffic class, bottom of stack bit and 8-bit TTL decoded from real bytes 00 01 d1 ff
Figure 3. The label stack entry with the real bytes 00 01 d1 ff from frame 8 of mpls-basic.cap: label 29, TC 0, S 1, TTL 255. Decoded by Network freak with scapy.

Decoding the real bytes

Here is the start of frame 8 of the Wireshark sample capture mpls-basic.cap[22], a labeled ICMP echo. The first 14 bytes are the Ethernet header; the ethertype is 88 47:

00 30 96 e6 fc 39  00 30 96 05 28 38  88 47     dst MAC, src MAC, ethertype 0x8847
00 01 d1 ff                                     label stack entry (one label)
45 00 00 64 00 0a 00 00 ff 01 a5 6a             IPv4 header: ver 4, IHL 5, len 100, TTL 255, proto 1 (ICMP)
0a 01 02 01  0a 22 00 01                        10.1.2.1 -> 10.34.0.1

Take 00 01 d1 ff as one 32-bit number, 0x0001D1FF. The top 20 bits are 0x0001D = 29, the label. The next three bits are 000, TC = 0. Then bit 8 is 1, so S = 1: this is the bottom (and only) label, and an IPv4 header follows, which is exactly what we see (45). The last byte 0xFF is the TTL, 255. Scapy's MPLS layer gives the same result:

#8 len=118 00:30:96:05:28:38>00:30:96:e6:fc:39 type=0x8847
   stack: label=29 tc=0 s=1 ttl=255
   inner IP 10.1.2.1>10.34.0.1 ttl=255 tos=0x00 proto=1 icmp type=8

A two-label stack looks like this (frame 8 of mpls-twolevel.cap, described on the Wireshark page as "An IP packet with two-level tagging")[22]:

88 47 | 00 01 20 ff | 00 01 01 ff | 45 00 00 64 ...
        label 18      label 16      IPv4
        TC 0, S 0     TC 0, S 1
        TTL 255       TTL 255

The outer label (18) has S = 0, which tells the router "more labels follow"; the inner one (16) has S = 1. The next router only looks at the top entry. That is the whole trick that later makes VPNs possible: the outer label gets the packet to the right egress router, and the inner label tells that egress what to do with it (which VRF, which pseudowire, which EVPN instance). Note that 16 is the lowest non-reserved label, which fits a small 2000-era test setup.

The Traffic Class bits in real traffic

The same captures show how routers filled the 3-bit field. In mpls-basic.cap, 11 labeled frames from 10.1.2.1 to 10.34.0.1 carry an IPv4 ToS byte of 0xC0 (IP precedence 6) and their label entry is 00 01 dd ff: TC = 6. In mpls-exp.cap ten frames carry ToS 0xB0 (precedence 5) and TC = 5. Frames with ToS 0x00 have TC 0[23]. In other words, the ingress copied the three IP precedence bits into the label, the default behaviour that RFC 3270 later formalised as one of the ways to map DiffServ onto MPLS (the "E-LSP", where the EXP/TC bits select the per-hop behaviour)[11]. Part 13 of this series goes deep into MPLS QoS.

Special-purpose labels 0-15

RFC 3032 reserved labels 0 to 15 and defined the first four[2]. The IANA registry, last updated on 30 June 2026, now has nine assignments in that range[15]:

Table of special-purpose MPLS label values 0 to 15 from the IANA registry: explicit null, router alert, implicit null, entropy label indicator, GAL and extension label
Figure 4. Special-purpose MPLS labels 0-15 as listed by IANA on 30 June 2026. Label 15 (XL) opens a second, extended range of special-purpose labels defined in RFC 7274.

Three details matter in practice. First, RFC 3032 originally said labels 0 and 2 are "only legal at the bottom of the label stack"; RFC 4182 (September 2005) removed that restriction so explicit null can appear anywhere in the stack[2][13]. Second, label 3 "never actually appears in the encapsulation": it exists only in the control plane[2]. Third, because 16 values ran out, RFC 7274 (June 2014) turned label 15 into an extension label: when you see 15, the next entry is an extended special-purpose label, with values such as 16 (Metadata Label Indicator) already assigned[14][15]. The newest base-range entry, label 4, is "MPLS Network Actions" (RFC 9994 in the IANA registry)[15], the work item that keeps the IETF MPLS working group busy in 2026[21].

The MPLS vocabulary: LSR, LER, FEC, LSP and the forwarding tables

RFC 3031 is the architecture document and it defines the words you will see in every vendor manual[1]:

  • LSR (Label Switching Router): "A router which supports MPLS". In a service provider network the P (provider) routers are pure LSRs.
  • MPLS edge node: an MPLS node that connects to a non-MPLS node; in its role as entry point it is the ingress, as exit point the egress. Vendors and books call it an LER (Label Edge Router) or edge LSR; in a VPN network it is the PE router. "LER" is common usage, not an RFC 3031 term.
  • FEC (Forwarding Equivalence Class): a group of packets that are forwarded the same way, for example "everything towards 10.9.0.0/16" or "everything towards PE2's loopback". The ingress assigns each packet to a FEC exactly once; after that, nobody in the core looks at the IP header.
  • LSP (Label Switched Path): the sequence of LSRs a packet of one FEC follows, from the LSP ingress to the LSP egress. An LSP is unidirectional: the return traffic uses a different LSP.
  • NHLFE (Next Hop Label Forwarding Entry): what to do with a packet: the next hop, and the stack operation (replace the top label, pop, or replace and push more).
  • ILM (Incoming Label Map): maps an incoming label to one or more NHLFEs. This is what vendors call the LFIB (Label Forwarding Information Base).
  • FTN (FEC-to-NHLFE map): maps a FEC to NHLFEs. Used at the ingress for unlabeled packets. On Cisco IOS this is the labeled part of the CEF table.
  • LIB (Label Information Base): the vendor term for all label bindings a router has learned and allocated, before best-path selection picks the ones installed in the LFIB.

The key design idea is the split between control plane and data plane. The control plane (the IGP plus a label distribution protocol such as LDP, RSVP-TE or BGP, or the IGP itself with Segment Routing) decides the path and which label means what. The data plane only does exact-match lookups on the top label. Each label is local: label 24 on PE1's outgoing link means "PE2's loopback" only because P1 told PE1 so; on another link the same FEC has a different label.

Push, swap and pop

There are three operations, and every MPLS feature is a combination of them[1]:

  1. Push (impose): the ingress LER looks up the destination in its FTN/CEF, finds the FEC and its outgoing label, and pushes it. A PE router in an L3VPN pushes two labels: the VPN label, then the transport label on top.
  2. Swap: a transit LSR looks up the incoming top label in its LFIB and replaces it with the outgoing label learned from its downstream neighbour, decrementing the TTL.
  3. Pop (dispose): remove the top label. If the S bit was 1, what remains is the original packet.
MPLS label switched path: ingress LER push, LSR swap, penultimate hop popping with implicit null label 3 and one IP lookup on the egress
Figure 5. One LSP from PE1 to PE2. Labels are advertised upstream (red, control plane); packets flow downstream (data plane). PE2 advertised implicit null, so P2 pops the label. Label values are illustrative.

Penultimate hop popping (PHP) and why it exists

Look at PE2 in Figure 5. If the packet arrived with a label, PE2 would do two lookups: one in the LFIB to learn "this label is mine, pop it", and then an IP lookup on the inner packet. RFC 3031 section 3.16 describes exactly that: without PHP "this would require the egress to do TWO lookups, either two label lookups or a label lookup followed by an address lookup." With PHP, the penultimate router already knows from its own lookup that the next hop is the egress, so "the penultimate node then pops the stack" and the egress does a single lookup[1]. Pepelnjak summarises the design goal as using implicit null "whenever an IP lookup would have to be performed anyway to prevent two lookups"[17].

The egress asks for PHP by advertising the implicit null label, 3, for its own connected and loopback FECs. RFC 3032 describes it as a label "that an LSR may assign and distribute, but which never actually appears in the encapsulation. When an LSR would otherwise replace the label at the top of the stack with a new label, but the new label is 'Implicit NULL', the LSR will pop the stack instead"[2]. On Juniper, label 3 is the default the egress advertises[18]. In show mpls forwarding-table on Cisco you see it as the outgoing label Pop Label (or Pop tag on old IOS), and in Junos as Pop.

In an L3VPN, PHP only removes the transport label; the VPN label is still there, so the egress PE still does one label lookup (VPN label to VRF) plus one IP lookup in the VRF. That is expected.

Explicit null and ultimate hop popping

PHP has a side effect: on the last link the packet is plain IP, so the TC bits are gone. If the egress must queue or police on the MPLS TC value (for example because the customer's DSCP must not be trusted), you configure explicit null. The egress then advertises label 0 (IPv4) or 2 (IPv6), the penultimate router swaps to 0 instead of popping, and the egress pops it itself. Juniper's documentation explains it in exactly these terms: "By enabling ultimate-hop popping, label 0 (IPv4 Explicit Null Label) is advertised. Ultimate-hop popping ensures that any packets traversing an MPLS network include a label", with the warning that "Juniper Networks routers queue packets based on the incoming label. Routers from other vendors might queue packets differently"[18].

! Configuration examples (syntax from vendor documentation; not run in our lab)
! Junos: advertise explicit null for LDP/RSVP egress FECs
set protocols mpls explicit-null

! Cisco IOS / IOS XE: LDP advertises explicit null instead of implicit null
mpls ldp explicit-null

! Cisco IOS XR
mpls ldp
 address-family ipv4
  label
   local
    advertise
     explicit-null

One more detail from Juniper: when a single explicit-null label is popped, the classifier may already have lost the EXP bits unless you tell the box to classify on them (explicit-null-cos on newer PTX releases)[18]. Check how your platform classifies before you rely on explicit null for QoS.

TTL handling: uniform and pipe models

When an IP packet is first labeled, RFC 3032 says "the TTL field of the label stack entry MUST BE set to the value of the IP TTL field"; each LSR then decrements the top label's TTL, and when the TTL hits 0 the packet is dropped (an LSR may first generate an ICMP time-exceeded message)[2]. At the egress the label TTL is copied back to the IP header. The core is then visible in traceroute: this is the uniform model. RFC 3443 (January 2003) adds the pipe and short pipe models, in which "a MPLS network acts like a circuit ... such that only the LSP ingress and egress points are visible to nodes that are outside the tunnel"[12].

Our captures are consistent with the uniform model: a ping generated by the router 10.1.2.1 itself carries TTL 255 in both the label and the IP header, and a packet forwarded from 10.31.0.1 carries 254 in both, i.e. the ingress decremented the IP TTL as a normal router hop and copied it into the label[23].

On Cisco, the default is to propagate the TTL. The Cisco support article on MPLS traceroute explains the knob: with no mpls ip propagate-ttl "the ingress edge LSR uses the value of 255 as the TTL value in the label when imposing it. The egress edge LSR does not copy the label TTL value into the IP header when popping the label", so the provider core disappears from customer traceroutes, and "it is important to disable TTL propagation in both the ingress and egress edge LSRs"[19]. Junos uses no-propagate-ttl under protocols mpls for the same purpose. Part 13 covers LSP ping and LSP traceroute, which work regardless of this setting.

How labels are distributed (preview of the next parts)

The data plane needs every router to agree on what each label means. RFC 3031 does not mandate one protocol; it defines the choices any label distribution method must make[1]:

MPLS label distribution modes: downstream unsolicited vs on demand, liberal vs conservative retention, independent vs ordered control, per-platform vs per-interface label space
Figure 6. The four independent choices of RFC 3031 label distribution. Downstream on demand, conservative retention and ordered control were largely driven by ATM LSRs.

In today's frame-mode networks, LDP typically runs downstream unsolicited with liberal retention: every LSR advertises a label for each IGP prefix to every neighbour and keeps all of them, so when the IGP next hop changes the new label is already there. RSVP-TE works on demand: the ingress sends a Path message with a label request and labels come back hop by hop in Resv messages[9][10]. BGP can carry labels too (labeled unicast and VPNs). We give LDP two full parts (3 and 4) and RSVP-TE one (5).

Real capture walk-through: a tag switching network in March 2000

We downloaded three captures from the Wireshark SampleCaptures page (mpls-basic.cap, mpls-exp.cap, mpls-twolevel.cap), read every frame with scapy 2.8.0 and counted what we found[22][23]. The pcap timestamps are 3 March 2000, ten months before RFC 3031 and 3032 were published. Figure 7 lists the observations.

Table of real MPLS frames from Wireshark sample captures: label 29, traffic class copied from IP precedence, a two-level label stack and TDP on port 711
Figure 7. Seven facts from three real MPLS captures. All values are from our scapy decode; the captures are hosted by the Wireshark project.

The control plane in these files is not LDP. The routers send UDP hellos from port 711 to port 711, addressed to 255.255.255.255 with IP TTL 1, and build a TCP session on port 711 - the IANA cisco-tdp port[16][23]. A hello looks like this:

UDP 711 -> 711, 10.1.2.1 -> 255.255.255.255, payload 20 bytes
00 01 | 00 10 | 0a 01 00 01 00 00 | 01 0c | 0f 03 00 04 0a 01 00 01
ver 1   len 16  ID 10.1.0.1:0         (*)     TLV 0x0F03, len 4, value 10.1.0.1

The first ten bytes have the same layout as the LDP PDU header that RFC 5036 still uses today: a 2-byte version (1), a 2-byte PDU length and a 6-byte identifier made of a 4-byte router ID and a 2-byte label space ID[9]. The 2-byte field marked (*) increases with every hello in the capture; we do not have a TDP specification to name it, so we leave it unlabeled. The trailing type-length-value carries the router's address 10.1.0.1, which looks like the transport address the neighbour should connect to. Modern LDP sends its hellos to 224.0.0.2 on UDP port 646 instead[9]. It is a nice illustration of Pepelnjak's point that LDP was "completely different (but mostly functionally equivalent)" while the packet format stayed the same[7].

Two more observations. The ICMP echo replies in all three captures return as plain IP, without a label: either the return path was not label-switched or the capture point was the last hop of a PHP LSP. We cannot tell which from the files alone, and we do not guess. And the source MAC addresses (00:30:96:...) are identical across the three files, so they are probably the same pair of routers recorded at different times that day.

Rear of a campus network core rack with Cisco 7500 series routers, the router generation of the tag switching era
The back of a campus network core rack with Cisco 7500 series routers (description by the photographer). The 7500, launched in 1995, was Cisco's high-end router when tag switching was designed. Photo: Patrick Finnegan, Wikimedia Commons, CC BY 2.0.

Why MPLS survives: services, not speed

If label lookups are no faster, why does every large SP backbone still run MPLS? Because the label stack decouples where the packet goes (transport label) from what it is (service label), and lets the core stay simple:

Why MPLS survives: L3VPN, traffic engineering, L2VPN pseudowires, fast reroute, BGP-free core and Segment Routing all reuse the MPLS label stack
Figure 8. Six reasons MPLS is still in SP backbones. All of them reuse the label stack; none depends on faster lookups.
  • L3VPN (RFC 2547/4364): thousands of customer VRFs over one shared core, with overlapping addresses, because the P routers only see the transport label[8]. Part 7.
  • BGP-free core: P routers run only the IGP and label distribution. Internet and VPN routes live on the PEs; the core switches on labels to the PE loopbacks.
  • Traffic engineering (RFC 2702, RFC 3209): explicit paths and bandwidth reservation that the IGP shortest path cannot express[10]. Part 5.
  • Fast reroute: pre-computed local repair paths (RSVP-TE FRR, LFA, TI-LFA). Part 6.
  • L2VPN and EVPN: Ethernet frames carried as the payload under a service label (pseudowires, VPLS, EVPN-MPLS). Parts 10, 11 and 15-23.
  • Segment Routing (RFC 8402, July 2018): the same MPLS data plane and label stack, but labels (segments) are advertised by the IGP, so LDP and RSVP-TE can go away[20]. Part 26 and our IS-IS series.

There is also a newer reason: hashing. Core routers load-balance on fields they can see; with a deep stack they may not see the IP header. RFC 6790 (November 2012) added the entropy label, signalled by the Entropy Label Indicator (label 7), so the ingress can put a flow hash into the stack itself[14]. We will meet it again in the forwarding part.

Common mistakes and troubleshooting tips

  • "Pop Label" in the LFIB is not an error. It is PHP doing its job for a FEC whose egress is the next hop. The problem case is No Label / Untagged on a FEC that should be labeled: the downstream neighbour has not advertised a binding (no LDP session, filtered, or IGP and LDP disagree).
  • Forgetting the 4 bytes per label. Each label adds 4 bytes. An L3VPN packet with transport + VPN label is 8 bytes bigger; add a TI-LFA repair label or an entropy label pair and it grows further. Core links need an MPLS MTU larger than the customer's IP MTU, or large packets are dropped silently.
  • Expecting QoS on the last hop with PHP. With implicit null the TC bits are gone on the PE-facing link. Use explicit null if the egress must classify on TC, and check how your egress hardware classifies a popped explicit-null packet[18].
  • TTL propagation on only one side. Cisco warns to disable propagation on both ingress and egress; otherwise the IP TTL can be higher when the packet leaves the MPLS domain than when it entered[19].
  • Using reserved labels in static configs. Static LSPs and segment routing blocks must use values of 16 and above; labels 0-15 are special-purpose[2][15].
  • Thinking an LSP is bidirectional. Each direction is a separate LSP with its own labels; a forward path that works says nothing about the return path. Test both directions (Part 13: LSP ping/traceroute).

Useful first commands on any box: show mpls forwarding-table (Cisco IOS/IOS XR) or show route table mpls.0 (Junos) for the LFIB, show mpls ldp bindings / show ldp database for the LIB, and show cef / show route forwarding-table for the FTN side. We will walk through real outputs in the LDP parts.

FAQ

What are MPLS fundamentals in one sentence?

An ingress router classifies a packet into a Forwarding Equivalence Class (FEC) once, pushes a 32-bit label, every core router forwards on that label alone (swap), and the label is removed (pop) at or just before the egress, so the core never has to look at the IP header (RFC 3031).

Who invented MPLS?

MPLS grew out of Cisco's Tag Switching (RFC 2105, February 1997). Bruce Davie credits Yakov Rekhter's internal two-page memo as the origin and Eric Rosen with generalising the label stack to any depth. The IETF MPLS working group, formed in 1997, merged ideas from tag switching, IBM's ARIS, Ipsilon's IP switching and Toshiba's CSR and published the core RFCs 3031 and 3032 in January 2001.

Is MPLS faster than IP routing?

Not on modern hardware. It was one of the original goals in the ATM era, but Davie writes that a label-only line card built to test the idea was 'negligibly cheaper' and 'no faster' than a full IP card. MPLS survives because of VPNs, traffic engineering, fast reroute and the BGP-free core, not lookup speed.

How big is an MPLS label?

Each label stack entry is 4 bytes: a 20-bit label value, a 3-bit Traffic Class field (called EXP before RFC 5462), a 1-bit bottom-of-stack flag S and an 8-bit TTL. Labels 0 to 15 are reserved for special purposes, so ordinary labels start at 16.

What is the difference between implicit null and explicit null?

Implicit null (label 3) is only advertised, never sent: it asks the upstream router to pop the label (penultimate hop popping). Explicit null (label 0 for IPv4, 2 for IPv6) is really sent on the last link, so the egress still receives the Traffic Class bits and pops the label itself.

What is the MPLS ethertype?

0x8847 for MPLS unicast and 0x8848 for MPLS multicast on Ethernet (RFC 3032). Our sample captures show 88 47 right before the first label.

Does Segment Routing replace MPLS?

SR-MPLS (RFC 8402) keeps the MPLS data plane and label stack and replaces LDP and RSVP-TE as the way labels are distributed; SRv6 replaces the label with IPv6 addresses. Later parts of this series cover both.

Part 1 of 26 — MPLS & EVPN Deep Dive
Series hub: MPLS and EVPN Deep Dive: The Complete Guide in 26 Parts (2026)
Previous: —
Next: MPLS Forwarding Deep Dive: Label Stack, LFIB, Push/Swap/Pop, PHP and Explicit Null (coming soon)

References

[1] E. Rosen, A. Viswanathan, R. Callon, "RFC 3031: Multiprotocol Label Switching Architecture," January 2001.
[2] E. Rosen et al., "RFC 3032: MPLS Label Stack Encoding," January 2001.
[3] Y. Rekhter, B. Davie, D. Katz, E. Rosen, G. Swallow, "RFC 2105: Cisco Systems' Tag Switching Architecture Overview," February 1997.
[4] P. Newman et al., "RFC 1953: Ipsilon Flow Management Protocol Specification for IPv4," May 1996.
[5] B. Davie, "Was MPLS Necessary?," Systems Approach, 14 February 2022.
[6] I. Pepelnjak, "On MPLS Forwarding Performance Myths," ipSpace.net, 5 February 2026; and "On MPLS Paths, Tunnels and Interfaces," January 2026.
[7] I. Pepelnjak, "Campfire: the true story of MPLS," ipSpace.net, January 2011.
[8] E. Rosen, Y. Rekhter, "RFC 2547: BGP/MPLS VPNs," March 1999; "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)," February 2006.
[9] RFC 3036: LDP Specification (January 2001), obsoleted by RFC 5036 (October 2007); RFC 3035: MPLS using LDP and ATM VC Switching (January 2001).
[10] RFC 2702: Requirements for Traffic Engineering Over MPLS (September 1999); RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels (December 2001).
[11] RFC 3270: MPLS Support of Differentiated Services (May 2002); RFC 5462: "EXP" Field Renamed to "Traffic Class" Field (February 2009).
[12] P. Agarwal, B. Akyol, "RFC 3443: Time To Live (TTL) Processing in MPLS Networks," January 2003.
[13] E. Rosen, "RFC 4182: Removing a Restriction on the use of MPLS Explicit NULL," September 2005.
[14] RFC 6790: The Use of Entropy Labels in MPLS Forwarding (November 2012); RFC 7274: Allocating and Retiring Special-Purpose MPLS Labels (June 2014).
[15] IANA, "Special-Purpose Multiprotocol Label Switching (MPLS) Label Values," last updated 2026-06-30.
[16] IANA, "Service Name and Transport Protocol Port Number Registry": cisco-tdp, port 711 TCP/UDP.
[17] I. Pepelnjak, "Penultimate Hop Popping (PHP) demystified," ipSpace.net, July 2011.
[18] Juniper Networks, "Junos OS MPLS Applications User Guide" (published 2026-08-23), section "Configuring MPLS to Pop the Label on the Ultimate-Hop Router"; "Apply MPLS EXP Classifiers for Explicit-Null Labels".
[19] Cisco, "The Traceroute Command in MPLS," document 26585.
[20] C. Filsfils et al., "RFC 8402: Segment Routing Architecture," July 2018.
[21] IETF Datatracker, "Multiprotocol Label Switching (mpls) working group" (charter and 2026 history).
[22] Wireshark Wiki, "SampleCaptures": mpls-basic.cap, mpls-exp.cap, mpls-twolevel.cap.
[23] Network freak decode of [22] with scapy 2.8.0 (contrib.mpls), 25 November 2026: every frame read, label stacks, TC/ToS and TTL pairs and TDP payloads counted.
Figures 1-8: Network freak, drawn from the sources above and our own decode. Photos: Wikimedia Commons, credited in the captions.

Comments

Popular posts from this blog

BGP Neighbor States

Reason legend in show ip ospf statistics