Use it when LDP neighbours do not form or labels are missing for a prefix.
LDP
The Label Distribution Protocol (LDP) lets MPLS routers exchange label bindings for the prefixes in their IGP routing table, building label-switched paths that follow the IGP.
1. LDP discovers neighbours with UDP 646 hellos, then forms a TCP 646 session.
2. Transport address (usually loopback) must be reachable.
3. Router ID should be a reachable loopback.
4. Session up → bindings exchanged.
5. Use LDP-IGP sync to avoid black holes.
hello discovery → TCP session to transport address → label bindings exchanged
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show mpls ldp neighborShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification and what it shows Verify boundary
Verify the intended peer identity and session, then inspect the exact FEC binding locally and remotely and confirm the corresponding LFIB action. A stable LDP session does not show every prefix is labeled, that labels are programmed into forwarding hardware or that an MPLS VPN/service context is healthy.
Step 2 Commands Verify boundary
mpls ldp router-id Loopback0 force
interface Gi0/1
mpls ip
show mpls ldp neighbor
show mpls ldp discovery
Documented example, not captured output. LDP discovers neighbours with UDP 646 hellos and builds sessions over TCP 646.
Step 3 Observation → implication → next check Narrow the fault
Observation → implication → next check: no discovery adjacency starts at interface/MPLS enablement and hello reachability. Discovery without session moves to router-ID transport/TCP and policy. Session up with missing FEC binding moves to IGP route and label advertisement/acceptance. Binding present with forwarding failure moves to LFIB and next-hop data plane.
Step 4 Common mistakes Narrow the fault
- LDP router ID not reachable (use a loopback with
force). - LDP not enabled on all core interfaces.
- Labels are locally significant and normally change hop by hop
- LERs impose/remove labels; LSRs swap labels
- LDP commonly follows IGP reachability, so router-ID/transport reachability must work first
- LIB/control-plane bindings and LFIB/data-plane actions are separate
- Penultimate-hop popping is normal; MPLS VPN requires additional VRF/MP-BGP state.
show mpls ldp neighbor— session state Opershow mpls ldp discovery— hellos on interfacesshow mpls ldp bindings— label bindings learned
ReferenceWhy it matters1 section · depth on demand
How it works in operation
LDP discovers peers and establishes sessions to exchange label bindings for FECs. Transport reachability to the LDP router ID, discovery adjacency, TCP session and per-prefix bindings are separate states. An established LDP session can coexist with a missing binding for the exact prefix required by the data plane.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
LDP: the Label Distribution Protocol
LDP lets label switching routers agree on what labels mean. RFC 5036 describes how LSRs use it to set up label switched paths by mapping routing information to labels, with each LSP tied to a FEC. Neighbours discover each other with UDP Hellos sent to the all-routers group on the link (or targeted Hellos for non-adjacent peers), and then form a session over TCP; the peer with the higher transport address takes the active role.
LDP identifier (RFC 5036)
Six octets, written <LSR Id>:<label space>: four octets identify the LSR (normally a router ID) and two the label space. 10.255.0.2:0 means router 10.255.0.2 with its platform-wide label space.
Messages (RFC 5036)
| Category | Messages |
|---|---|
| Discovery | Hello |
| Session | Initialization, KeepAlive |
| Advertisement | Address, Address Withdraw, Label Mapping, Label Request, Label Abort Request, Label Withdraw, Label Release |
| Notification | Advisory and error signals |
Modes (RFC 5036)
| Mode | Options |
|---|---|
| Distribution | Downstream Unsolicited, or Downstream on Demand |
| Retention | Liberal (keep all mappings; faster reconvergence) or Conservative |
| Control | Independent, or Ordered (advertise only with a downstream mapping or as egress) |
Cisco IOS defaults to downstream unsolicited, liberal retention and independent control on Ethernet.
PE1(config)# mpls ldp router-id Loopback0 force
PE1(config)# interface GigabitEthernet0/0/1
PE1(config-if)# mpls ip
PE1# show mpls ldp neighbor
Peer LDP Ident: 10.255.0.2:0; Local LDP Ident 10.255.0.1:0
TCP connection: 10.255.0.2.646 - 10.255.0.1.31544
State: Oper; Msgs sent/rcvd: 412/409; Downstream
Up time: 02:14:51
LDP discovery sources:
GigabitEthernet0/0/1, Src IP addr: 10.0.12.2
PE1# show mpls ldp discovery
Troubleshooting
| Symptom | Check |
|---|---|
| No neighbour | mpls ip on both sides, Hellos received, ACLs |
| Discovery but no session | Route to the peer's transport address (usually its loopback) |
| Session but no labels for a prefix | Prefix in the IGP, label filtering |
| LDP and IGP out of step | Enable LDP-IGP synchronisation |
Documented example, not captured output.
Quick reference
LDP is the protocol that distributes labels between MPLS routers. Each router assigns a local label to every prefix in its routing table and tells its neighbours; neighbours then use those labels when sending traffic. LDP follows the IGP — it does not choose paths itself — so the two must be in sync, or traffic can be dropped while one has converged and the other has not.
LDP (Label Distribution Protocol) assigns labels to IGP prefixes and exchanges bindings with neighbours (UDP 646 discovery, TCP 646 sessions).
mpls ldp router-id Loopback0 force
mpls ldp sync ! under OSPF/IS-IS: avoid black holes after link up
show mpls ldp neighbor
show mpls ldp bindings 10.255.0.9 32
show mpls ldp discovery
LDP follows the IGP; if the IGP converges before LDP is up on a link, traffic can be black-holed — LDP-IGP sync raises the IGP cost until LDP is ready.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → MPLS Fundamentals → LDP. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc3031.html · confidence 94%