mplsEXEC

show mpls ldp neighbor

Displays the status of Label Distribution Protocol (LDP) neighbors and their session information.

Overview

The 'show mpls ldp neighbor' command is a fundamental troubleshooting and verification tool for MPLS LDP on Cisco IOS-XR. LDP (Label Distribution Protocol) is used to distribute label bindings between routers in an MPLS network, enabling label switching. This command displays the status of LDP sessions with directly connected neighbors. It shows whether the TCP-based session is established, the negotiated parameters, and the discovered interfaces. On IOS-XR, LDP is configured under the 'mpls ldp' configuration mode, and this command is essential for verifying that LDP adjacencies are up before MPLS forwarding can occur. It is used during initial MPLS deployment, after configuration changes, and when troubleshooting MPLS-related issues such as missing labels or traffic not being label-switched. The command can be used with optional parameters to filter by VRF, interface, or to show detailed information including label bindings. Understanding the output helps network engineers quickly assess the health of LDP sessions and identify issues like mismatched timers, unreachable peers, or interface problems. In troubleshooting workflows, this command is often the first step after checking interface status and IGP reachability.

Syntax·EXEC
show mpls ldp neighbor [vrf vrf-name] [interface type interface-path-id] [detail] [brief]

When to Use This Command

  • Verify LDP neighbor adjacencies after configuring MPLS on interfaces.
  • Troubleshoot LDP session flapping or missing label bindings.
  • Check the state of LDP sessions during MPLS L3VPN or TE deployment.
  • Monitor LDP neighbor details for capacity planning and network health.

Parameters

ParameterSyntaxDescription
vrf vrf-namevrf vrf-nameDisplays LDP neighbors for a specific VRF. Useful in MPLS L3VPN environments where LDP runs per VRF.
interface type interface-path-idinterface type interface-path-idFilters neighbors discovered on a specific interface. Helps isolate issues on a particular link.
detaildetailProvides extended information including label bindings, capabilities, and graceful restart parameters.
briefbriefDisplays a concise summary of LDP neighbors without detailed per-neighbor information.

Command Examples

Basic LDP neighbor summary

show mpls ldp neighbor
Peer LDP Identifier: 10.0.0.1:0
  TCP connection: 10.0.0.1:646 - 10.0.0.2:1025
  Session state: Operational
  Session role: Active
  Session uptime: 2d04h
  Local label range: 16000-23999
  Remote label range: 16000-23999
  Keepalive interval: 15 sec
  Hello interval: 5 sec
  Peer hold time: 45 sec
  Label advertisement mode: Downstream Unsolicited
  Discovery sources:
    IPv4: GigabitEthernet0/0/0/0
    IPv6: GigabitEthernet0/0/0/0
  Addresses bound to peer:
    10.0.0.1
    192.168.1.1

Shows one LDP neighbor with session operational. Key fields: Peer LDP Identifier (router-id:label-space), TCP connection details, session state (Operational is healthy), uptime, label ranges, timers, discovery source interface, and peer addresses.

Detailed LDP neighbor information

show mpls ldp neighbor 10.0.0.1 detail
Peer LDP Identifier: 10.0.0.1:0
  TCP connection: 10.0.0.1:646 - 10.0.0.2:1025
  Session state: Operational
  Session role: Active
  Session uptime: 2d04h
  Local label range: 16000-23999
  Remote label range: 16000-23999
  Keepalive interval: 15 sec
  Hello interval: 5 sec
  Peer hold time: 45 sec
  Label advertisement mode: Downstream Unsolicited
  Discovery sources:
    IPv4: GigabitEthernet0/0/0/0
    IPv6: GigabitEthernet0/0/0/0
  Addresses bound to peer:
    10.0.0.1
    192.168.1.1
  Label bindings:
    Prefix          In-Label    Out-Label   Next Hop
    10.0.0.0/8      16000       16001       10.0.0.1
    192.168.0.0/16  16002       16003       10.0.0.1
  Capabilities:
    Typed Wildcard FEC: Supported
    Dynamic Capability: Supported
  Graceful Restart: Enabled
    Reconnect time: 120 sec
    Recovery time: 120 sec

Detail view adds label bindings (prefixes with in/out labels and next hop), capabilities (Typed Wildcard FEC, Dynamic Capability), and Graceful Restart parameters. Healthy output shows Operational state and label bindings.

Understanding the Output

The output of 'show mpls ldp neighbor' provides a snapshot of LDP session status. The first line shows the Peer LDP Identifier, which is the router ID and label space (usually :0). The TCP connection line indicates the source and destination IPs and ports (LDP uses TCP port 646). Session state should be 'Operational' for a healthy session; other states like 'Initialized', 'OpenSent', or 'Non Existent' indicate problems. Session role can be 'Active' (initiator) or 'Passive'. Uptime shows how long the session has been up. Local and remote label ranges indicate the label space used. Timers (keepalive, hello, hold time) should match between peers. Discovery sources list the interfaces where LDP hellos are received. Addresses bound to peer are the IP addresses of the neighbor. In detail output, label bindings show the FEC prefix, incoming label (local), outgoing label (to neighbor), and next hop. Capabilities and Graceful Restart parameters are also displayed. Healthy values: Operational state, consistent label ranges, matching timers, and populated label bindings. Problem indicators: state not Operational, mismatched timers, missing label bindings, or stale sessions.

Configuration Scenarios

Basic LDP Neighbor Verification

After configuring MPLS LDP on two directly connected routers (R1 and R2) in a single area OSPF network.

Topology

R1 --- Gig0/0/0/0 --- R2 10.0.0.1/30 10.0.0.2/30

Steps

  1. 1.Configure MPLS LDP on both routers with router-id and interface enable.
  2. 2.Verify OSPF adjacency is full.
  3. 3.Use 'show mpls ldp neighbor' on R1 to see R2 as neighbor.
Configuration
! On R1
mpls ldp
 router-id 10.0.0.1
 interface GigabitEthernet0/0/0/0
!
! On R2
mpls ldp
 router-id 10.0.0.2
 interface GigabitEthernet0/0/0/0
!

Verify: R1# show mpls ldp neighbor Peer LDP Identifier: 10.0.0.2:0 TCP connection: 10.0.0.2:646 - 10.0.0.1:1025 Session state: Operational ...

Watch out: Ensure the router-id is reachable via IGP; otherwise LDP session will not form.

Troubleshooting LDP Session Down

LDP neighbor is not showing up; possible causes include ACL blocking TCP 646, mismatched hello timers, or IGP issue.

Topology

R1 --- Gig0/0/0/0 --- R2 10.0.0.1/30 10.0.0.2/30

Steps

  1. 1.Check interface status and IGP adjacency.
  2. 2.Verify LDP configuration on both ends.
  3. 3.Use 'show mpls ldp neighbor' to see if any neighbor appears.
  4. 4.If no neighbor, check 'show mpls ldp discovery' to see if hellos are received.
Configuration
! Ensure no ACL blocks TCP 646
! On both routers
mpls ldp
 interface GigabitEthernet0/0/0/0
!

Verify: R1# show mpls ldp neighbor % No LDP neighbors found R1# show mpls ldp discovery Local LDP Identifier: 10.0.0.1:0 Discovery Sources: Interfaces: GigabitEthernet0/0/0/0: hello interval 5 sec, hold time 15 sec No hello received from any neighbor

Watch out: If hellos are not received, check interface state, IP connectivity, and that LDP is enabled on the interface.

Troubleshooting with This Command

When troubleshooting LDP neighbor issues on Cisco IOS-XR, start with 'show mpls ldp neighbor' to see if any sessions exist. If no neighbors appear, verify that LDP is enabled on the interfaces using 'show mpls ldp interface'. Check that the interface is up/up and has an IP address. Ensure IGP (OSPF or ISIS) is running and the router IDs are reachable. Use 'show mpls ldp discovery' to confirm hellos are being sent and received. If hellos are received but no session, check for ACLs blocking TCP port 646, or mismatched LDP parameters (hello hold time, keepalive interval). On IOS-XR, LDP uses the router-id as the transport address; ensure that the router-id is reachable via the interface. If the session state is 'Initialized' or 'OpenSent', it indicates the TCP connection is up but LDP negotiation is incomplete; check for mismatched label ranges or capabilities. Use 'show mpls ldp parameters' to see local settings. If the session is flapping, check for interface flaps or routing changes. For detailed troubleshooting, enable LDP debugging with 'debug mpls ldp all' (use with caution in production). Also verify that MPLS is enabled globally and on interfaces with 'mpls ip' command. In VRF environments, ensure LDP is configured under the VRF. Finally, check for any error messages in logs with 'show logging'. The 'show mpls ldp neighbor detail' command provides label bindings; if bindings are missing, check that the FEC prefixes are in the routing table and that LDP is advertising them.

CCNA Exam Tips

1.

Remember that LDP uses TCP port 646 and UDP port 646 for hellos.

2.

The 'Operational' state is the goal; know the other states (Initialized, OpenSent, OpenRecv, Non Existent) and their meanings.

3.

Label advertisement mode is typically 'Downstream Unsolicited' (DU) on IOS-XR; be aware of 'Downstream on Demand' (DoD) for comparison.

Common Mistakes

Confusing LDP neighbor state with OSPF neighbor state; LDP uses TCP and has different state machine.

Assuming 'show mpls ldp neighbor' shows label bindings without the 'detail' keyword.

Overlooking that LDP sessions require reachability via IGP; if IGP is down, LDP will not form.

Platform Notes

On Cisco IOS-XR, the 'show mpls ldp neighbor' command is similar to IOS but with some differences. IOS-XR uses a modular architecture and the output may include additional fields like 'Session role' and 'Label advertisement mode'. The 'detail' option on IOS-XR shows label bindings, capabilities, and graceful restart parameters. On classic IOS, the equivalent command is 'show mpls ldp neighbor' but the output format differs slightly; IOS uses 'show mpls ldp neighbor detail' for detailed info. On IOS-XR, the command supports VRF filtering with 'vrf vrf-name', which is not available on all IOS versions. The 'brief' option is unique to IOS-XR. In terms of configuration, IOS-XR uses 'mpls ldp' under global config, while IOS uses 'mpls ldp router-id' and 'mpls ldp neighbor' under interface. For Juniper Junos, the equivalent is 'show ldp session' and 'show ldp neighbor'. For Nokia (Alcatel-Lucent) SR OS, the command is 'show router ldp session'. Understanding these differences helps when working in multi-vendor environments.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions