Label Distribution Protocol (LDP and targeted LDP)

How MPLS routers discover peers and distribute bindings for forwarding equivalence classes.

Discovery and label distribution use separate exchanges

Basic LDP discovery sends link Hellos over UDP port 646 to discover adjacent peers. The peers then use a TCP session on port 646 to exchange label mappings. A binding tells an upstream router which label its downstream peer expects for a FEC.

For a normal prefix LSP, the IGP selects the next hop. A matching label binding from that next hop lets the router install a label forwarding entry. A binding learned from a different peer can exist in the LIB without being used by the LFIB for that path.

Targeted Hellos can cross routed hops

Targeted LDP uses unicast Hellos addressed to a configured or otherwise selected peer. The destination can be more than one IP hop away. The peers still exchange label information over a TCP session after discovery.

A common use is pseudowire signaling between provider edges. The targeted session can exchange pseudowire labels while the transport path across the core has its own labels. The session itself does not select a traffic-engineered path through the core.

Try it in a lab

  1. On a routed MPLS-capable lab, enable LDP along the core and inspect an adjacent LDP peer. Compare the IGP next hop to a remote loopback with the label used for that FEC in the LFIB.
  2. Configure targeted discovery between nonadjacent PEs that can reach one another. Verify that the targeted session comes up while the PEs are still separated by a core router.
  3. Compare a link Hello on a core link with a targeted Hello addressed to the remote PE. Confirm that establishing the targeted session did not change the underlying IGP next hop.

Sources