9.2 Label Distribution Protocol (LDP)
Key Takeaways
LDP discovery uses UDP 646; sessions and label mappings use TCP 646.
Basic IPv4 discovery uses 224.0.0.2; targeted discovery uses a selected unicast peer.
For ordinary IPv4 transport-address comparison, the higher address takes the active TCP role.
Liberal retention can keep alternate bindings without making them active forwarding choices.
Targeted LDP signals Layer 2 pseudowire labels; VPRN VPN labels in this model are advertised by MP-BGP.
LDP supplies label bindings
The Label Distribution Protocol (LDP) exchanges mappings between forwarding classes and labels. In the basic IP/MPLS transport model, it follows usable routing information rather than computing a separate traffic-engineered path. The current NRS I outline names LDP explicitly, so distinguish its discovery, session, binding, and forwarding states.
An IGP can provide IP reachability to a remote PE's system address. That does not prove a usable label-switched path exists. LDP also needs the relevant discovery/session state, advertised binding, and forwarding selection.
A Forwarding Equivalence Class (FEC) identifies the traffic represented by a binding. Prefix eligibility and advertisement depend on configuration and implementation. Do not assume LDP automatically advertises a label for every route in every routing table. Provider transport commonly uses system /32 destinations.
Discovery uses UDP
For basic IPv4 link discovery, LDP sends Hellos using UDP port 646 to 224.0.0.2, the local-link all-routers multicast group. Routers must have the relevant interface configuration and be able to receive each other's discovery traffic.
A Hello identifies the LDP speaker and transport information. The LDP Identifier combines an LSR identifier with a label-space identifier; it is not simply the TCP source port.
Targeted discovery instead sends Hellos to a specific unicast address. It supports relationships between routers that are not directly adjacent. Pseudowire signaling between remote PEs is a key service example. Targeted Hellos do not mean that all intermediate P routers become pseudowire-signaling peers.
| Function | Transport | Typical scope |
|---|---|---|
| Link Hello | UDP 646, local multicast | Directly connected LDP neighbors |
| Targeted Hello | UDP 646, unicast | A selected reachable peer |
| LDP session and mappings | TCP 646 | The discovered peer relationship |
Configured discovery intervals and hold times should be inspected on the actual routers. A Hello timer and a TCP-session keepalive timer are different mechanisms; do not diagnose one using an assumed value from the other.
Sessions use TCP
After discovery, LDP establishes a TCP port 646 connection for session negotiation and reliable message exchange. For the ordinary IPv4 transport-address comparison, the peer with the numerically higher transport address takes the active connection role.
For example, with transport addresses 10.10.10.1 and 10.10.10.2, the latter initiates toward the former's TCP 646 listener. Both routers still need bidirectional reachability. A received link Hello can coexist with failure to establish TCP if the system/transport addresses are not reachable.
Initialization exchanges session parameters. Keepalives maintain the session, and Label Mapping messages carry bindings. Receiving discovery Hellos is therefore an earlier checkpoint than having an operational session, and an operational session is earlier than proving a particular service forwards successfully.
Distribution and retention
Downstream Unsolicited distribution means a downstream router can advertise an eligible binding without first receiving a request for that specific binding. Downstream on Demand advertises in response to a request. These terms describe how bindings are distributed, not whether customer packets travel downstream or upstream.
Liberal retention keeps received bindings even when the advertising peer is not the currently selected forwarding next hop. Conservative retention keeps only the relevant bindings under its rules. Retaining alternate bindings can reduce the additional signaling needed when routing changes, but does not guarantee instantaneous or lossless recovery.
The ordinary SR OS transport model uses downstream unsolicited distribution, liberal retention, and per-platform label space. Ordered control means a router advertises the relevant binding when it is an egress for the FEC or has the required downstream binding. Consult the selected release for extensions and configured exceptions.
Per-platform label space means a label is interpreted in the applicable platform label context rather than assigning the same numeric value an unrelated meaning on each interface. It does not mean that label 100 has a common meaning on every router in the network.
Select a forwarding binding
Suppose R1 can reach PE2's system /32 through R2, and R1 has received a binding from R2 for that FEC. R1 can select the relevant outgoing label toward R2 and program forwarding. A binding received from R3 may be retained without being used.
If the IGP changes the active next hop to R3, R1 needs a valid binding and usable forwarding through R3. Liberal retention may already have supplied the binding. Routing convergence, label programming, and capacity still affect traffic recovery.
This explains a common troubleshooting distinction: a label in the Label Information Base is not necessarily the active forwarding label. Inspect both the routing next hop and selected binding.
Separate transport from service labels
Link LDP can establish transport toward a remote PE. Targeted LDP can signal a Layer 2 pseudowire's service labels between PEs. MP-BGP supplies the VPN route and label information for the VPRN model taught here.
A targeted-LDP pseudowire label is not the same object as a transport prefix label. If the outer LSP works but the VC parameters or service MTU disagree, customer Ethernet traffic can still fail. Conversely, a pseudowire's control session can exist while its required transport tunnel is unusable.
For basic diagnosis, inspect show router ldp session, relevant discovery state, label bindings, and the route to the far endpoint. Then inspect the service's SDP binding and SAP. Check protocol/port filtering, selected transport addresses, MTU, and the return path before restarting all protocols.
Primary references
LDP specification and Nokia SR OS documentation, checked October 20, 2026. Timers and eligible-prefix policies must be verified for the lab release.
During the establishment of an LDP session between two adjacent routers, which protocol and port are used for the transport connection, and which router initiates it?
UDP port 646, initiated by the router with the lower transport IP address
UDP port 646, initiated by the router with the higher transport IP address
TCP port 646, initiated by the router with the higher transport IP address
TCP port 646, initiated by the router with the lower transport IP address
What advantage can liberal label retention provide after the IGP selects a new next hop?
The alternate peer’s binding may already be available without additional label-request signaling
It discards every alternate binding immediately
It reserves bandwidth on all links
It guarantees zero packet loss and instantaneous recovery
Which discovery supports an LDP relationship between non-adjacent PEs for Layer 2 pseudowire signaling?
Only multicast link Hellos
ARP flooding to all router interfaces
RSVP PATH messages using TCP 646
Targeted Hellos to the selected unicast peer, followed by an LDP session
Sections you finish are checked off in the contents.