Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

LDP

Direct answer

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.

When to use this

Use it when LDP neighbours do not form or labels are missing for a prefix.

First 30 seconds

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.

Operational verification

hello discovery → TCP session to transport address → label bindings exchanged

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE
Key commandshow mpls ldp neighbor
Scope / prerequisiteUse it when LDP neighbours do not form or labels are missing for a prefix.
Show · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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.
Command lookup Jump straight to Cisco syntax
Key points
  • 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.
Key checks
  • show mpls ldp neighbor — session state Oper
  • show mpls ldp discovery — hellos on interfaces
  • show 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)

CategoryMessages
DiscoveryHello
SessionInitialization, KeepAlive
AdvertisementAddress, Address Withdraw, Label Mapping, Label Request, Label Abort Request, Label Withdraw, Label Release
NotificationAdvisory and error signals

Modes (RFC 5036)

ModeOptions
DistributionDownstream Unsolicited, or Downstream on Demand
RetentionLiberal (keep all mappings; faster reconvergence) or Conservative
ControlIndependent, 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

SymptomCheck
No neighbourmpls ip on both sides, Hellos received, ACLs
Discovery but no sessionRoute to the peer's transport address (usually its loopback)
Session but no labels for a prefixPrefix in the IGP, label filtering
LDP and IGP out of stepEnable LDP-IGP synchronisation

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 3031

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%
Confirmation

Confirm action

Continue?