LDP Operational Commands
LDP Show Commands
The LDP show commands provide detailed information about the LDP protocol operations.
LDP Summary
Syntax:
show ldp summary <options>
Option | Description |
---|---|
- |
Without any option, the command displays the LDP summary information for all instances. |
instance <instance-name> |
Displays LDP summary information about the specified instance. |
Example: LDP summary for the default instance
supervisor@rtbrick>SPINE01: op> show ldp summary Instance: default General information: LDP identifier: 198.51.100.2:0, Version: 1 FEC resolution: Best match Protocol preference: 9 LSR ID: 198.51.100.2 IPv4 Status: True IPv6 Status: True Modes: Advertisement mode: Downstream Unsolicited Advertisement control mode: Ordered Label retention mode: Liberal Capabilities: IPv6 address family: - , Graceful restart: False Loop detection: False Hop count: -, Vector length: - Timers: Adjacency: Hello: 5s, Holdtime: 15s Targeted adjacency: Hello: 15s, Holdtime: 45s Session: Keepalive: 10s, Holdtime: 30s Statistics: Adjacency: Link adjacency: 2, Targeted adjacency: 0 Session: Session in non-existent: 0, Session in initialized: 0 Session in opensent: 0, Session in openconfirm: 0 Session in operational: 2 Instance: green General information: LDP identifier: 192.0.2.2:0, Version: 1 FEC resolution: Best match Protocol preference: 9 LSR ID: 192.0.2.2 IPv4 Status: True IPv6 Status: True Modes: Advertisement mode: Downstream Unsolicited Advertisement control mode: Ordered Label retention mode: Liberal Capabilities: IPv6 address family: - , Graceful restart: False Loop detection: False Hop count: -, Vector length: - Timers: Adjacency: Hello: 5s, Holdtime: 15s Targeted adjacency: Hello: 15s, Holdtime: 45s Session: Keepalive: 10s, Holdtime: 30s <...>
To access the Operational State API that corresponds to this CLI, click
here.
LDP Neighbor
Syntax:
show ldp neighbor <options>
Option | Description |
---|---|
- |
Without any option, this command displays information about LDP neighbors. |
detail |
Detailed information about the LDP neighbors. |
instance <instance-name> |
Displays LDP neighbor information about the specified instance. |
instance <instance-name> detail |
Displays detailed LDP neighbor information about the specified instance. |
instance <instance-name> ldp-id <ldp-id> |
Displays LDP neighbor information about the specified LDP identifier and instance. |
interface <name> |
Displays LDP neighbor information about the specified interface. |
interface <name> detail |
Displays detailed LDP neighbor information about the specified interface. |
ldp-id <ldp-id> |
Displays LDP neighbor information about the specified LDP identifier. |
Example 1: Summary view of all the LDP neighbors
supervisor@rtbrick>SPINE01: op> show ldp neighbor Instance: default Interface LDP ID Transport IP Up Since Expires ifl-0/0/0/1 198.51.100.2:0 198.51.100.2 Thu Feb 09 12:17:15 in 11s ifl-0/0/2/1 198.51.100.3:0 198.51.100.3 Thu Feb 09 12:17:31 in 12s ifl-0/0/0/100 198.51.100.2:0 198.51.100.2 Thu Feb 09 12:17:15 in 11s ifl-0/0/0/101 198.51.100.2:0 198.51.100.2 Thu Feb 09 12:17:15 in 11s ifl-0/0/1/102 198.51.100.2:0 198.51.100.2 Thu Feb 09 12:17:15 in 11s supervisor@rtbrick>SPINE01: op>
Example 2: Detailed view of all the LDP neighbors
supervisor@rtbrick>SPINE01: op> show ldp neighbor detail Instance: default LDP-Identifier: 198.51.100.1:0, Peer: 198.51.100.1, Type: Targeted Negotiated holdtime: 45000, Expiry time: 31s 880316us Local link address: 198.51.100.2, Peer link address: 198.51.100.1 Local transport address: 198.51.100.2, Peer transport address: 198.51.100.1 Local holdtime: 45, Peer holdtime: 45, Up since: Tue Mar 04 05:59:47 Local transport preference : ipv6, Peer transport preference : ipv6 Last transition time: Tue Mar 04 07:05:47 GMT +0000 2025 Instance: default LDP-Identifier: 198.51.100.5:0, Peer: 198.51.100.5, Type: Targeted Negotiated holdtime: 45000, Expiry time: 40s 850139us Local link address: 198.51.100.2, Peer link address: 198.51.100.5 Local transport address: 198.51.100.2, Peer transport address: 198.51.100.5 Local holdtime: 45, Peer holdtime: 45, Up since: Tue Mar 04 06:00:11 Local transport preference : ipv6, Peer transport preference : ipv6 Last transition time: Tue Mar 04 07:05:56 GMT +0000 2025 Instance: default LDP-Identifier: 198.51.100.1:0, Peer: 2001:DB8::1, Type: Targeted Negotiated holdtime: 45000, Expiry time: 31s 880318us Local link address: 2001:DB8::2, Peer link address: 2001:DB8::1 Local transport address: 2001:DB8::2, Peer transport address: 2001:DB8::1 Local holdtime: 45, Peer holdtime: 45, Up since: Tue Mar 04 05:59:47 Local transport preference : ipv6, Peer transport preference : ipv6 Last transition time: Tue Mar 04 07:05:47 GMT +0000 2025 <...>
Example 3: Summary view of all the targeted LDP neighbors
supervisor@rtbrick>SPINE01: op> show ldp neighbor Instance: default Interface/Peer LDP ID Transport IP Up Since Expires 198.51.100.1 198.51.100.1:0 198.51.100.1 Tue Mar 04 05:59:47 in 38s 198.51.100.5 198.51.100.5:0 198.51.100.5 Tue Mar 04 06:00:11 in 32s 2001:DB8::1 198.51.100.1:0 2001:DB8::1 Tue Mar 04 05:59:47 in 38s 2001:DB8::5 198.51.100.5:0 2001:DB8::5 Tue Mar 04 05:59:56 in 32s Instance: green Interface/Peer LDP ID Transport IP Up Since Expires 192.0.2.1 192.0.2.1:0 192.0.2.1 Tue Mar 04 05:59:47 in 38s 192.0.2.5 192.0.2.5:0 192.0.2.5 Tue Mar 04 06:00:11 in 32s supervisor@rtbrick>SPINE01: op>
Example 4: Detailed view of a targeted LDP neighbor
supervisor@rtbrick>SPINE01: op> show ldp neighbor ldp-id 198.51.100.1:0 Instance: default LDP-Identifier: 198.51.100.1:0, Peer: 198.51.100.10, Type: Targeted Negotiated holdtime: 45000, Expiry time: 35s 775898us Local link address: 198.51.100.2, Peer link address: 198.51.100.1 Local transport address: 198.51.100.2, Peer transport address: 198.51.100.1 Local holdtime: 45, Peer holdtime: 45, Up since: Tue Mar 04 05:59:47 Local transport preference : ipv6, Peer transport preference : ipv6 Last transition time: Tue Mar 04 07:04:02 GMT +0000 2025 Instance: default LDP-Identifier: 198.51.100.1:0, Peer: 2001:DB8::1, Type: Targeted Negotiated holdtime: 45000, Expiry time: 35s 775923us Local link address: 2001:DB8::2, Peer link address: 2001:DB8::1 Local transport address: 2001:DB8::2, Peer transport address: 2001:DB8::1 Local holdtime: 45, Peer holdtime: 45, Up since: Tue Mar 04 05:59:47 Local transport preference : ipv6, Peer transport preference : ipv6 Last transition time: Tue Mar 04 07:04:02 GMT +0000 2025 supervisor@rtbrick>SPINE01: op>
LDP Interface
Syntax:
show ldp interface <option>
Option | Description |
---|---|
- |
Without any option, this command displays information on all configured LDP interfaces. |
<interface-name> |
Specify the name of the interface. |
detail |
Detailed interface information. |
Example 1: Summary view of the specified LDP interface
supervisor@rtbrick: cfg> show ldp interface ifl-0/0/1/1 Instance: green Interface: ifl-0/0/1/1 Primary IPv4 Address: 192.0.2.102, Primary IPv6 Address: 2001:DB8:12::1 Session Hold: 30, Session Keepalive: 10 Discovery Hello: 5, Discovery Hold: 15 Neighbor count: 1, Transport preference: ipv4 IPv4 enable: True, IPv6 enable: True, Cisco interop: False
Example 2: Summary view of all the LDP interfaces
supervisor@rtbrick: cfg> show ldp interface Instance: default Interface Primary IPv4 Address Primary IPv6 Address ifl-0/0/0/1 198.51.100.100 2001:DB8:1::1 ifl-0/0/0/100 198.51.100.101 2001:DB8:2::1 ifl-0/0/0/101 198.51.100.102 2001:DB8:3::1 ifl-0/0/1/102 198.51.100.103 2001:DB8:4::1 ifl-0/0/2/1 198.51.100.104 2001:DB8:5::1 ifl-0/0/3/1 198.51.100.105 2001:DB8:6::1 lo-0/0/0/1 198.51.100.1 lo-0/0/0/2 198.51.100.2 lo-0/0/0/3 198.51.100.3 lo-0/0/0/4 198.51.100.4 lo-0/0/0/5 198.51.100.5 Instance: green Interface Primary IPv4 Address Primary IPv6 Address ifl-0/0/0/202 192.0.2.100 2001:DB8:11::1 ifl-0/0/1/1 192.0.2.102 2001:DB8:12::1 ifl-0/0/1/200 192.0.2.103 2001:DB8:13::1 ifl-0/0/1/201 192.0.2.104 2001:DB8:14::1 ifl-0/0/2/200 192.0.2.105 2001:DB8:15::1 ifl-0/0/3/200 192.0.2.105 2001:DB8:16::1 lo-0/0/1/1 192.0.2.1 lo-0/0/1/2 192.0.2.2 lo-0/0/1/3 192.0.2.3 lo-0/0/1/4 192.0.2.4 lo-0/0/1/5 192.0.2.5
LDP Session
Syntax:
show ldp session <options>
Option | Description |
---|---|
- |
Without any option, this command displays a summary of LDP session information. |
detail |
Displays detailed information about the LDP sessions. |
instance <instance-name> |
Displays LDP session information about the specified instance. |
instance <instance-name> detail |
Displays detailed LDP session information about the specified instance. |
instance <instance-name> ldp-id <ldp-id> |
Displays LDP session information about the specified LDP identifier and instance. |
ldp-id <ldp-id> |
Displays LDP session information about the specified LDP identifier. |
Example 1: Summary view of the LDP session
supervisor@rtbrick>SPINE01: op> show ldp session Instance: default LDP ID Peer IP State Up/Down FECRcvd FECSent 198.51.100.2:0 198.51.100.2 Operational 0d:00h:29m:44s 15 15 198.51.100.3:0 198.51.100.3 Operational 0d:00h:29m:29s 15 15 supervisor@rtbrick>SPINE01: op>
Example 2: Detailed view of the LDP session
supervisor@rtbrick>SPINE01: op> show ldp session detail Instance: default LDP Identifier: 198.51.100.2:0, Peer IP: 198.51.100.2, Local IP: 198.51.100.1 Type: link, State: Operational, Uptime: 0d:00h:34m:35s Reason: Last transition: Thu Feb 09 12:17:28 GMT +0000 2023, Flap count: 0 Advertisement Mode: Peer: Downstream unsolicited, Local: Downstream unsolicited Negotiated: Downstream unsolicited Timers: Connect retry: 10s Peer keepalive interval: 10s, Local keepalive interval: 10s Peer keepalive timeout: 30s, Local keepalive timeout: 30s Negotiated keepalive interval: 10s Negotiated keepalive timeout: 30s Received messages: Initialization: 1, KeepAlive: 208, Notification: 0 Address: 1, Address Withdraw: 0, Label Mapping: 15 Label Withdraw: 0, Label Release: 0 Sent messages: Initialization: 1, KeepAlive: 208, Notification: 0 Address: 1, Address Withdraw: 0, Label Mapping: 15 Label Withdraw: 0, Label Release: 0 Capability: Typed WildCard FEC: Local Support: True, Peer Support: True, Negotiated: True Total received messages: Initialization: 1, KeepAlive: 92, Notification: 0 Address: 2, Address Withdraw: 0, Label Mapping: 20 Total sent messages: Initialization: 1, KeepAlive: 92, Notification: 0 Address: 2, Address Withdraw: 0, Label Mapping: 20 Label Withdraw: 0, Label Release: 0 <...>
In the case of a T-LDP session, the "Type" will be "Targeted". |
To access the Operational State API that corresponds to this CLI, click
here.
LDP Address
Syntax:
show ldp address <options>
Option | Description |
---|---|
- |
Without any option, this command displays a summary of all the interface addresses received from the LDP sessions. |
instance <instance-name> |
Displays LDP address information about the specified instance. |
instance <instance-name> <afi> |
Displays LDP address of the specified address family (AFI). Supported values: ipv4, ipv6. |
instance <instance-name> ldp-id <ldp-id> |
Displays LDP address information about the specified LDP identifier and instance. |
ldp-id <ldp-id> |
Displays LDP address information about the specified LDP identifier. |
Example: Summary view of all the LDP addresses
supervisor@rtbrick>SPINE01: op> show ldp address Instance: default, LDP Identifier: 198.51.100.2:0, AFI: ipv4 198.51.100.61 198.51.100.102 198.51.100.63 198.51.100.94 198.51.100.2 198.51.100.65 198.51.100.222 198.51.100.21 198.51.100.214 198.51.100.48 <...>
LDP Binding
Syntax:
show ldp binding <options>
Option | Description |
---|---|
- |
Without any option, this command displays a summary of all the LDP label bindings. |
instance <instance-name> |
Displays LDP label binding information about the specified instance. |
instance <instance-name> prefix <ip> |
Displays LDP label binding information about the specified prefix and instance. Supported prefix values: ipv4, ipv6. |
prefix <ip> |
Displays the LDP label binding information for the specified prefix. Supported prefix values: ipv4, ipv6. |
received |
Displays the LDP received label binding information of the LDP sessions. |
received instance <instance-name> |
Displays LDP received label binding information of the specified instance. |
received instance <instance-name> ldp-id <ldp-id> |
Displays LDP received label binding information about the specified LDP identifier and instance. |
received ldp-id <ldp-id> |
Displays LDP received label binding information of the specified LDP identifier. |
sent |
Displays the LDP sent label binding information of the LDP sessions. |
sent instance <instance-name> |
Displays LDP sent label binding information of the specified instance. |
sent instance <instance-name> ldp-id <ldp-id> |
Displays LDP sent label binding information about the specified LDP identifier and instance. |
sent ldp-id <ldp-id> |
Displays LDP sent label binding information of the specified LDP identifier. |
Example 1: Summary view of the LDP binding
supervisor@rtbrick>SPINE01: op> show ldp binding Instance: default, AFI: ipv4 Prefix In Label Out Label LDP ID Status 198.51.100.1/24 - label:3 - Best label:20066 - 198.51.100.3:0 Non-best label:20065 - 198.51.100.2:0 Non-best 198.51.100.11/24 - label:3 - Best label:20066 - 198.51.100.3:0 Non-best label:20065 - 198.51.100.2:0 Non-best 198.51.100.41/24 - label:3 - Best label:20066 - 198.51.100.3:0 Non-best label:20065 - 198.51.100.2:0 Non-best 198.51.100.44/24 - label:3 - Best label:20066 - 198.51.100.3:0 Non-best label:20065 - 198.51.100.2:0 Non-best 198.51.100.47/24 - label:3 - Best label:20066 - 198.51.100.3:0 Non-best label:20065 - 198.51.100.2:0 Non-best 198.51.100.2/24 label:3 label:20065 198.51.100.2:0 Best label:20065 - 198.51.100.3:0 Non-best 198.51.100.21/24 label:3 label:20065 198.51.100.2:0 Best label:20065 - 198.51.100.3:0 Non-best 198.51.100.42/24 label:3 label:20065 198.51.100.2:0 Best label:20065 - 198.51.100.3:0 Non-best <...>
Example 2: Summary view of the LDP binding for the specified prefix
supervisor@rtbrick>SPINE01: op> show ldp binding prefix 198.51.100.2/24 Instance: default, AFI: ipv4 Prefix In Label Out Label LDP ID Status 198.51.100.2/24 label:3 label:20065 198.51.100.2:0 Best label:20065 - 198.51.100.3:0 Non-best supervisor@rtbrick>SPINE01: op>
LDP Route
Syntax:
show ldp route <options>
Option | Description |
---|---|
- |
Without any option, this command displays a summary of LDP route information. |
instance <instance-name> |
Displays LDP route information for the specified instance. |
instance <instance-name> <afi> |
Displays LDP route information for the specified address family and instance. Supported AFI values: ipv4, ipv6, and mpls. |
instance <instance-name> ipv4 prefix <ip> |
Displays LDP route information for the specified address family of IPv4 prefix and instance. |
instance <instance-name> ipv6 prefix <ip> |
Displays LDP route information for the specified address family of IPv6 prefix and instance. |
instance <instance-name> prefix <ip> |
Displays LDP route information for the specified prefix and instance. |
instance <instance-name> label <label> |
Displays LDP route information for the specified MPLS label and instance. |
instance <instance-name> mpls |
Displays LDP route information about MPLS labels. |
instance <instance-name> mpls label <label> |
Displays LDP route information for the specified MPLS label and instance. |
label <label> |
Displays LDP route information for the specified MPLS label. |
ipv4 |
Displays LDP route information about the IPv4 address family. |
ipv4 prefix <ip> |
Displays LDP route IPv4 address family information for the specified prefix. |
ipv6 |
Displays LDP route information about the IPv6 address family. |
ipv6 prefix <ip> |
Displays LDP route IPv6 address family information for the specified prefix. |
mpls |
Displays LDP route information about MPLS labels. |
mpls label <label> |
Displays LDP route information for the specified MPLS label. |
prefix <ip> |
Displays LDP route information for the specified prefix address. |
Example: Summary view of the LDP route
supervisor@rtbrick>SPINE01: op> show ldp route Instance: default, AFI: ipv4, SAFI: labeled-unicast Prefix/Label Advertised label Received label Next Hop Interface Metric 198.51.100.1/24 3 - - - - 198.51.100.2/24 20065 - 198.51.100.61 ifl-0/0/0/1 1000000 198.51.100.3/24 20067 20067 198.51.100.61 ifl-0/0/0/1 2000001 198.51.100.11/24 3 - - - - 198.51.100.21/24 20065 - 198.51.100.61 ifl-0/0/0/1 1000000 198.51.100.31/24 20067 20067 198.51.100.61 ifl-0/0/0/1 2000001 198.51.100.41/24 3 - - - - 198.51.100.42/24 20065 - 198.51.100.61 ifl-0/0/0/1 1000000 198.51.100.43/24 20067 20067 198.51.100.61 ifl-0/0/0/1 2000001 198.51.100.44/24 3 - - - - 198.51.100.45/24 20065 - 198.51.100.61 ifl-0/0/0/1 1000000 198.51.100.46/24 20067 20067 198.51.100.61 ifl-0/0/0/1 2000001 198.51.100.47/24 3 - - - - 198.51.100.48/24 20065 - 198.51.100.61 ifl-0/0/0/1 1000000 198.51.100.49/24 20067 20067 198.51.100.61 ifl-0/0/0/1 2000001 <...>
LDP Statistics
Syntax:
show ldp statistics <options>
Option | Description |
---|---|
- |
Without any option, the command displays the LDP statistics for all instances. |
instance <instance-name> |
Displays LDP statistics information about the specified instance. |
instance <instance-name> ldp-id <ldp-id> |
Displays LDP statistics information about the specified LDP identifier and instance. |
Example: Summary view of the LDP statistics
supervisor@rtbrick>SPINE01: op> show ldp statistics Instance: default, LDP ID: 198.51.100.2:0 Received messages: Initialization: 1, KeepAlive: 558, Notification: 0 Address: 1, Address Withdraw: 0, Label Mapping: 15 Label Withdraw: 0, Label Release: 0 Sent messages: Initialization: 1, KeepAlive: 558, Notification: 0 Address: 1, Address Withdraw: 0, Label Mapping: 15 Label Withdraw: 0, Label Release: 0 Instance: default, LDP ID: 198.51.100.3:0 Received messages: Initialization: 1, KeepAlive: 557, Notification: 0 Address: 1, Address Withdraw: 0, Label Mapping: 15 Label Withdraw: 0, Label Release: 0 Sent messages: Initialization: 1, KeepAlive: 557, Notification: 0 Address: 1, Address Withdraw: 0, Label Mapping: 15 Label Withdraw: 0, Label Release: 0 supervisor@rtbrick>SPINE01: op>
LDP TCP connection
Syntax:
show ldp tcp connection <options>
Option | Description |
---|---|
- |
Without any option, the command displays the TCP connections used by LDP for all instances. |
detail |
Detailed list view of the TCP connections. |
detail instance <instance-name> |
Detailed list view of the TCP connections of the specified instance. |
instance <instance-name> |
TCP connections summary of the specified instance. |
Example: Summary view of the LDP TCP connections
supervisor@rtbrick>SPINE01: op> show ldp tcp connection Instance Local IP Remote IP Local port Remote port State default 198.51.100.1 198.51.100.2 646 64718 Established default 198.51.100.1 198.51.100.3 646 64718 Established supervisor@rtbrick>SPINE01: op>
LDP Clear Commands
Clear commands allow resetting operational states.
Clear LDP Session
Syntax:
clear ldp session <options>
Option | Description |
---|---|
all |
Clears all the LDP sessions. |
all soft-in |
Sends route refresh to all neighbors to receive FEC bindings. |
all soft-out |
Re-advertises all the routes previously sent to the peers. |
instance <instance-name> all |
Clears all the LDP sessions for the specified instance. |
instance <instance> all soft-in |
Sends route refresh to all neighbors to receive FEC bindings for the specified instance. |
instance <instance> all soft-out |
Re-advertises all the routes previously sent to the peers for the specified instance. |
instance <instance-name> peer ldp-id <ldp-id> |
Clears the LDP session for the specified instance and peer LDP identifier. |
instance <instance> peer ldp-id <ldp-id> soft-in |
Sends route refresh to the specific peer to receive FEC bindings for the specified instance and peer ldp-id. |
instance <instance> peer ldp-id <ldp-id> soft-out |
Re-advertises all the routes previously sent to the specific peer for the specified instance and peer ldp-id. |
Example: The example below shows how to clear all the LDP sessions.
supervisor@rtbrick>SPINE01: op> clear ldp session all LDP session cleared with instance default supervisor@rtbrick>SPINE01: op>
To access the Operational State API that corresponds to this CLI, click
here.
Clear LDP Statistics
Syntax:
clear ldp statistics <options>
Option | Description |
---|---|
all |
Clears all the LDP statistics. |
instance <instance-name> all |
Clears all the LDP statistics for the specified instance. |
instance <instance-name> peer ldp-id <ldp-id> |
Clears the LDP statistics for the specified instance and peer LDP identifier. |
Example: The example below shows how to clear all the LDP statistics.
supervisor@rtbrick>SPINE01: op> clear ldp statistics all LDP statistics cleared for instance default supervisor@rtbrick>SPINE01: op>
Clear LDP Neighbor
Syntax:
clear ldp neighbor <options>
Option | Description |
---|---|
all |
Clears all the LDP neighbors. |
instance <instance-name> |
Clears the LDP neighbor for the specified instance. |
Example: The example below shows how to clear all the LDP neighbor.
supervisor@rtbrick>SPINE01: op> clear ldp neighbor all LDP neighbor cleared with instance default supervisor@rtbrick>SPINE01: op>