MPLS Fundamentals · Chapter 02 of 04

LDP: How Labels Are Distributed

LDP is the workhorse protocol that binds labels to IGP prefixes: routers discover each other with hellos to 224.0.0.2 on UDP 646, build TCP sessions on port 646, and advertise a label mapping for every prefix in their routing table. Cisco defaults — liberal retention, unsolicited advertisement, independent control — mean every router labels everything, and the IGP decides which bindings are used.

Updated 31 August 2026 · RST Forum faculty

In this guideShow

MPLS forwarding needs every router along a path to agree: 'when I send prefix X toward you, what label do you want on it?'. The Label Distribution Protocol (RFC 5036) answers exactly that, and nothing more — it invents no topology and chooses no paths. LDP walks behind the IGP: the IGP picks next hops, and LDP supplies the labels that make those same hops label-switchable. This obedience is LDP's virtue and its limitation; where the path must differ from the IGP's choice, RSVP-TE or segment routing take over.

Neighbourship: two channels

LDP discovery and session are separate mechanisms. Discovery: hellos multicast to 224.0.0.2, UDP port 646, per link (targeted unicast hellos exist for non-adjacent sessions, used by pseudowires and LDP-over-TE). Session: the two routers compare transport addresses, the higher one initiates a TCP connection to port 646, and label advertisement flows over that reliable channel. Each router identifies itself with an LDP ID — router-id:label-space, e.g. 10.255.1.1:0. The classic failure is discovery succeeding and TCP failing: the transport address is the LDP router-id, usually a loopback, and if the IGP does not carry a route to that exact /32, the session never establishes. Half of all LDP tickets end there.

R1# show mpls ldp neighbor
Peer LDP Ident: 10.255.1.2:0; Local LDP Ident 10.255.1.1:0
TCP connection: 10.255.1.2.646 - 10.255.1.1.28114
State: Oper; Msgs sent/rcvd: 214/209; Downstream
Up time: 02:41:07

The three default behaviours

  • Downstream unsolicited — routers advertise label mappings to all peers without being asked, for every prefix in their table (filterable — and in scaled designs, filtered to loopbacks only, since only /32 loopback FECs matter for VPN transport).
  • Liberal retention — mappings from peers that are not the current IGP next hop are kept, not discarded; when the IGP reconverges, the label for the new next hop is already in hand and forwarding recovers without waiting for LDP.
  • Independent control — each router allocates and advertises its labels immediately, without waiting for the downstream router's label first; the LSP heals in parallel rather than sequentially.

From bindings to forwarding

The result of all this advertisement is the Label Information Base: for each prefix, the local label this router allocated plus every peer's advertised label. The router then combines LIB with routing table: the binding from the current IGP next hop becomes the active swap entry in the forwarding table (LFIB). Everything else waits in liberal-retention reserve. The special values appear here too: a router advertises implicit-null (label 3) for its directly connected and loopback prefixes, instructing its neighbour to pop rather than swap — penultimate hop popping, examined properly in the next chapter.

R1(config)# mpls ldp router-id loopback0 force
R1(config)# interface gi0/0
R1(config-if)# mpls ip
R1# show mpls ldp bindings 10.255.1.4 32
lib entry: 10.255.1.4/32, rev 14
local binding: label: 24004
remote binding: lsr: 10.255.1.2:0, label: 24009
remote binding: lsr: 10.255.1.3:0, label: 24011

One operational essential closes the chapter: LDP-IGP synchronisation. After a link comes up, the IGP may converge onto it before LDP has a session and labels there — and labelled traffic (meaning: all VPN traffic) blackholes onto the unlabelled link. mpls ldp sync under the IGP holds the link's metric at maximum until LDP is ready, closing the gap. It is the kind of two-word fix that distinguishes a lab config from a production one.

Free chapters, real racks, CCIE faculty — that's the whole model.

Browse coursesEnroll