MPLS · LDP · RSVP-TE
RFC 3031 · RFC 5036 · RFC 3209
Label Switching · Label Distribution · Traffic Engineering · VPN · Fast Reroute
🏷️ MPLS Basics
🔗 LDP
🛣️ RSVP-TE
🔐 MPLS VPN
⚡ Fast Reroute
MPLS — Multiprotocol Label Switching · RFC 3031
CE1 10.1.0.1 PE1 Ingress LER IP lookup push label P1 Transit LSR label swap P2 PHP Node pop label PE2 Egress LER IP forward CE2 10.2.0.1 IP → click Next Step PHP: Penultimate Hop Popping
Label Stack:
[ empty ]
NodeRoleActionIncomingOutgoing
→ Next Step
MPLS Header — 32 bits
Label
20 bits
TC
3 b
S
1
TTL
8 bits
Label: 0–1048575 (20 bit). TC: Traffic Class (ex-EXP), QoS. S: Bottom-of-Stack bit (1=last label). TTL: hop limit, decremented at each LSR.

Reserved labels: 0=IPv4 Explicit NULL, 2=IPv6 Explicit NULL, 3=Implicit NULL (PHP), 13=Alert Label.
MPLS Forwarding
MPLS replaces the IP lookup with a simple label swap. The ingress PE pushes a label, transit P routers swap it, and PHP pops it before egress. Click Next Step.
LFIB vs FIB vs RIB
RIB (Routing Information Base) — the route table populated by protocols (OSPF/BGP).
FIB (Forwarding Information Base) — the compiled forwarding table, held in hardware.
LFIB (Label Forwarding Info Base) — the label table: {incoming label → action + outgoing label + interface}. P routers use only the LFIB — no IP lookup at all.

LSP (Label Switched Path) — a unidirectional path through the MPLS network, defined by a sequence of labels.
Step
Click Next Step to walk the packet through the MPLS network step by step.
0 / 7
LDP — Label Distribution Protocol · RFC 5036
R1 1.1.1.1 R2 2.2.2.2 R3 3.3.3.3 R4 4.4.4.4 Hello 224.0.0.2:646 Hello 224.0.0.2:646 TCP:646 + Init LDP ID, transport addr, max PDU Init + Keepalive Label Mapping FEC=10.4.0.0/24 Label=300 Label Mapping FEC=10.4.0.0/24 Label=200 Label Mapping FEC=10.4.0.0/24 Label=100 LFIB: R1: 10.4.0.0/24 → push 100, out R2 R2: in=100 → swap 200, out R3 R3: in=200 → swap 300, out R4 R4: in=300 → pop (PHP=3), deliver
LDP MessageTransportPurpose
HelloUDP 646, 224.0.0.2Neighbor discovery, Link Hello every 5 s
InitializationTCP 646Session parameters: LDP version, keepalive
KeepaliveTCP 646Keeps the session alive, default 45 s
Label MappingTCP 646Advertises a FEC→Label binding to a neighbor
Label WithdrawTCP 646Withdraws a label (route gone)
Label ReleaseTCP 646Releases a label (no longer needed)
NotificationTCP 646Errors and status
LDP Session
LDP establishes a TCP session between LSRs to exchange labels. Click Next Step.
Liberal vs Conservative Label Retention
Liberal retention (Cisco default): keep every Label Mapping received, even from a neighbor that is not the next hop. Fast convergence on a topology change.

Conservative retention: keep only the mapping from the current next hop. Less memory, slower convergence.

Downstream Unsolicited (DU, default): the LSR advertises labels without being asked. Downstream on Demand (DoD): only on request.
LDP Step
Click Next Step.
0 / 7
RSVP-TE — Resource Reservation Protocol · Traffic Engineering · RFC 3209
Ingress 1.1.1.1 R1 upper path R2 lower path R3 upper path R4 lower path Egress 5.5.5.5 100 Mbps 100 Mbps PATH: bw=10Mbps, ERO=[R1,R3,Egress] RESV: label=200/100, bw reserved ✓ → click Next Step
RSVP-TE MessageDirectionPurpose
PATHIngress → EgressPath setup: ERO, bandwidth, priority, preemption
RESVEgress → IngressResource reservation + label assignment
PATH_ERRIntermediate → IngressSetup error (no resources)
RESV_ERRIntermediate → EgressReservation error
PATH_TEARIngress → EgressLSP removal (tunnel teardown)
RESV_TEAREgress → IngressResource release
RESV_CONFEgress → IngressReservation confirmation
RSVP-TE
RSVP-TE builds a Traffic Engineering LSP with an explicit route (ERO) and guaranteed bandwidth. Click Next Step.
RSVP-TE vs LDP — when to use which
LDP: automatically follows the IGP route. Simple to configure. No traffic engineering. No bandwidth guarantees.

RSVP-TE: explicit ERO — you can route the LSP over any path, steering around congestion. Reserves bandwidth. Supports Fast Reroute (50 ms protection). Harder to operate.

SR-MPLS (Segment Routing): the modern alternative — no state on transit nodes, the path is encoded in the label stack at the ingress.
RSVP-TE Step
Click Next Step to walk through RSVP PATH→RESV and TE-LSP setup.
0 / 7
MPLS L3VPN — RFC 4364 · VRF · RD · RT · MP-BGP
CE1-A 10.1.1.1/24 CE1-B 10.2.1.1/24 PE1 VRF: cust-A RD:100:1 RT:100:1 VRF: cust-B RD:100:2 RT:100:2 P (Core) label swap only no VRF, no BGP VPN PE2 VRF: cust-A RD:200:1 RT:100:1 VRF: cust-B RD:200:2 RT:100:2 CE2-A 10.1.2.1/24 CE2-B 10.2.2.1/24 iBGP MP-BGP VPNv4 cust-A → click a step [ outer: transport label ] [ inner: VPN label ] [ IP ]
ConceptDefinitionExample
VRFVirtual Routing & Forwarding — a separate routing table for each VPNip vrf cust-A
RDRoute Distinguisher — makes a VPN prefix unique in BGP (64 bits + IPv4 = VPNv4)100:1 → 100:1:10.1.0.0/24
RTRoute Target — community for import/export policy between VRFsimport 100:1, export 100:1
VPNv4RD + IPv4 prefix — the BGP address-family for VPN routesMP-BGP AFI=1, SAFI=128
VPN LabelInner MPLS label — identifies the VRF/interface on the egress PEinner label=500
Transport LabelOuter MPLS label — the LSP label for delivery to the egress PEouter label=200
MPLS L3VPN
Two virtual networks — cust-A (orange) and cust-B (pink) — are fully isolated inside one MPLS network. Click a step for a step-by-step walkthrough.
Route Distinguisher vs Route Target
RD — technical: makes two identical prefixes (10.1.0.0/24) unique in BGP by prepending 100:1. This lets two customers use the same addresses.

RT — policy: which routes to import into a VRF. Hub-and-spoke: the hub imports from every spoke, spokes import only from the hub. Extranet: VRF A imports the RT of VRF B.
0 / 6
MPLS Fast Reroute — RFC 4090 · Local Protection · 50ms switchover
Ingress PLR R1 PLR R2 Merge Point Egress Bypass pre-signaled LSP Protection Type Switchover: ~50ms → click Next Step
FRR TypeProtectsBypass LSPSwitchover
Link ProtectionA single linkPLR → Merge Point<50ms
Node ProtectionA single nodePLR → node past the protected one<50ms
Path ProtectionThe whole LSPFull alternate LSP~200ms
1:1 ProtectionThe whole pathHot standby<50ms
PLR, MP, Backup LSP
PLR (Point of Local Repair) — the node that detects the failure (via BFD or IGP) and switches traffic over.
MP (Merge Point) — the node where the bypass tunnel rejoins the primary LSP.
Bypass LSP — a pre-established RSVP-TE tunnel around the protected segment. Signaled before the failure.
Fast Reroute
RSVP-TE FRR recovers in 50 ms — faster than the IGP can converge. Click Next Step.
BFD — Bidirectional Forwarding Detection
BFD (RFC 5880) — a fast failure-detection protocol. Runs independently of the routing protocol. Intervals: 3×3.3ms=10ms. On failure it triggers FRR immediately, without waiting for the IGP hello timeout (40 s).

Without BFD: failure detection time = IGP dead interval (40 s in OSPF). With BFD: 10-50 ms. BFD + FRR = sub-50ms protection.
Segment Routing FRR (TI-LFA)
TI-LFA (Topology Independent LFA) — modern FRR without RSVP. The PLR computes the backup path and encodes it in an SR label stack (segment list). No need to pre-signal a bypass LSP. Any topology — 100% coverage.
FRR Step
Click Next Step to simulate a link failure and the FRR switchover.
0 / 6