1. Overview
Label distribution protocol (LDP) is the most commonly used protocol in the MPLS network. It generates and distributes labels and thus helps in MPLS packet switching and forwarding. By using LDP, label switching routers in an MPLS network are able to exchange label mapping information to create label-switched paths (LSPs) for switching data packets.
1.1. Peer Discovery
LDP sends UDP multicast hello packets to discover its nieghbors and establishes neighbor adjacency with other directly connected label switch routers (LSRs). The hello message are periodically sent on LDP-enabled interfaces.
1.2. Session Establishment
After peer discovery, “initialization messages” are sent each other. In these messages, the session Parameters are sent. The LDP sessions are maintained by periodic keeipalive message.
After the LDP neighbors are discovered, TCP session is established and the LDP FSM is triggered and LDP session becomes operational. LSRs start exchanging label mapping information with each other.
1.3. Label Generation
LDP generates label bindings for the IP addresses of the LDP-enabled loopback interfaces, and then advertises them to all neighbors.
1.4. Label Management Modes
1.4.1. Label Advertisement Mode
LDP supports the Downstream Unsolicited feature in RBFS, where label bindings are advertised to all upstream neighbors. By defualt, label advertisement operates in the Downstream Unsolicited mode.
1.4.2. Label Distribution Control Mode
LDP supports the Ordered Label Distribution Control where an LSR will initiate the transmission of the label mapping only for the prefix for which it has a label mapping from the next-hop of the prefix or for which it is an egress.
1.4.3. Label Retention Mode
LDP supports the Liberal Label Retention Mode where all the label mapping advertisements for all routes received from all the LDP neighbors are retained.
1.5. Supported LDP Standards
RFC Number | Description |
---|---|
RFC 5036 |
LDP Specification The following modes are supported by RBFS for the features listed in RFC 5036:
|
RFC 5283 |
LDP Extension for Inter-Area Label Switched Paths (LSPs) |
RFC 5443 |
LDP IGP Synchronization |
1.6. Supported LDP Features
The following LDP features are supported in this release of RBFS:
-
Support for the following label management modes.
-
Downstream unsolicited mode in label advertisement
-
Ordered mode in label distribution control
-
Liberal mode in label retention
-
-
Loop Detection
-
Inter-Area Support
-
Tracking IGP Metric
-
IGP LDP Synchronization
1.7. Supported Platforms
Not all features are necessarily supported on each hardware platform. Refer to the Platform Guide for the features and the sub-features that are or are not supported by each platform.
2. Configuration Hierarchy
The diagram below illustrates the LDP configuration hierarchy.
2.1. Configuration Syntax and Commands
The following sections describe the LDP configuration syntax and commands.
2.1.1. LDP Instance Configuration
At this configuration hierarchy you configure LDP protocol parameters which are generic to the LDP instance.
Syntax:
set instance <instance-name> protocol ldp <attribute> <value>
Attribute | Description |
---|---|
<instance-name> |
Name of the instance. |
interface <name> |
Name of the logical interface. |
router-id <router-id> |
Router identifier in IPv4 format. |
source-address <source-address> |
Use the specified IP address as the transport address for the LDP session. |
igp-synchronization <…> |
LDP IGP synchronization configuration. This option is supported only on interfaces running Intermediate System-to-System (IS-IS) processes. Refer to section 2.1.4, “LDP IGP Synchronization” for LDP-IGP synchronization configuration details. |
loop-detection <…> |
The LDP loop detection feature enables LDP to detect loops during an LSP establishment. Refer to section 2.1.2, “LDP Loop Detection Configuration” for the loop detection configuration details. |
timer <…> |
Specifies the Hello hold time, Hello interval, Keepalive hold time, and Keepalive interval. Refer to section 2.1.3, “LDP Timer Configuration” for the LDP timer configuration details. |
Example: LDP Instance Configuration
The following example shows some LDP instance configuration attributes. The further LDP configurations like timers and loop-detection are shown in the examples in the subsequent sections.
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp { "rtbrick-config:ldp": { "router-id": "192.168.0.1", "interface": [ { "name": "ifl-0/0/0/1" }, { "name": "ifl-0/0/0/100" }, { "name": "ifl-0/0/0/101" }, { "name": "ifl-0/0/1/102" }, { "name": "ifl-0/0/2/1" }, { "name": "ifl-0/0/3/1" }, { "name": "lo-0/0/0/1" }, { "name": "lo-0/0/0/2" }, { "name": "lo-0/0/0/3" }, { "name": "lo-0/0/0/4" }, { "name": "lo-0/0/0/5" } ] } } supervisor@rtbrick>SPINE01: cfg>
2.1.2. LDP Loop Detection Configuration
The LDP loop detection feature enables LDP to detect loops during an LSP establishment.
Syntax:
set instance <instance-name> protocol ldp loop-detection <attribute> <value>
Attribute | Description |
---|---|
hop-count <hop-count> |
Specifies the hop count limit for loop detection. Range: 0-255. Default: 32. |
status <enable|disable> |
Enables or disables loop detection. By default, this option is disabled. When this option is enabled, both hop-count and path vector are enabled. |
vector-length <vector-length> |
Specifies the path vector length limit for loop detection. Range: 0-255. Default: 32. |
Example 1: LDP Loop Detection Configuration
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp loop-detection { "rtbrick-config:loop-detection": { "enable": "true", "hop-count": 64, "vector-length": 64 } } supervisor@rtbrick>SPINE01: cfg>
2.1.3. LDP Timer Configuration
Specify the hello timer and hold-down timer for LDP adjacency. Similarly, specify the keepalive and keepalive timeout settings for the LDP session.
Syntax:
set instance <instance-name> protocol ldp timer <attribute> <value>
Attribute | Description |
---|---|
hello hold-time <hold-time> |
Specifies the hello hold-time interval in seconds before declaring a neighbor to be down. Range: 0-65535. Default: 15. |
hello interval <interval> |
Specifies the hello messages interval in seconds. Range: 0-65535. Default: 5. |
session keepalive-interval <keepalive-interval> |
Specifies the session keepalive messages interval in seconds. Range: 1-65535. Default: 10. |
session keepalive-timeout <keepalive-timeout> |
Specifies the session keepalive timeout in seconds before declaring a session to be down. Range: 1-65535. Default: 30. |
Example 1: LDP Timer Configuration
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp timer { "rtbrick-config:timer": { "hello": { "interval": 10, "hold-time": 20 }, "session": { "keepalive-interval": 3000, "keepalive-timeout": 5000 } } } supervisor@rtbrick>SPINE01: cfg>
2.1.4. LDP IGP Synchronization
Synchronization between LDP and the underlying interior gateway protocol (IGP) ensures that the LDP path is fully established before the IGP path is used for forwarding traffic. LDP IGP synchronization is supported only on interfaces running Intermediate System-to-System (IS-IS) processes.
Syntax:
set instance <instance-name> protocol ldp igp-synchronization <attribute> <value>
Attribute | Description |
---|---|
hold-timer <hold-timer> |
Specifies the hold-timer in seconds to limit how long the IGP session must wait before declaring the LDP synchronization. Range: 0-60. Default: 10. |
Example 1: LDP IGP Synchronization Configuration
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp igp-synchronization { "rtbrick-config:igp-synchronization": { hold-timer": 60, } } supervisor@rtbrick>SPINE01: cfg>
3. LDP Operational Commands
3.1. LDP Show Commands
The LDP show commands provide detailed information about the LDP protocol operations.
3.1.1. LDP Summary
Syntax:
show ldp summary <options>
Option | Description |
---|---|
- |
Without any option, the commands 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: 192.168.0.1:0, Version: 1 FEC resolution: Best match Protocol preference: 9 LSR ID: 192.168.0.1 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: 5, 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 supervisor@rtbrick>SPINE01: op>
3.1.2. 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 LDP Neighbor
supervisor@rtbrick>SPINE01: op> show ldp neighbor Instance: default Interface LDP ID Transport IP Up Since Expires ifl-0/0/0/1 192.168.0.2:0 192.168.0.2 Thu Feb 09 12:17:15 in 11s ifl-0/0/2/1 192.168.0.3:0 192.168.0.3 Thu Feb 09 12:17:31 in 12s ifl-0/0/0/100 192.168.0.2:0 192.168.0.2 Thu Feb 09 12:17:15 in 11s ifl-0/0/0/101 192.168.0.2:0 192.168.0.2 Thu Feb 09 12:17:15 in 11s ifl-0/0/1/102 192.168.0.2:0 192.168.0.2 Thu Feb 09 12:17:15 in 11s supervisor@rtbrick>SPINE01: op>
Example 2: Detailed View of LDP Neighbor
supervisor@rtbrick>SPINE01: op> show ldp neighbor detail Instance: default LDP-Identifier: 192.168.0.2:0, Interface: ifl-0/0/0/1 Negotiated holdtime: 15, Expiry time: 14s 522483us Local link address: 12.0.0.1, Peer link address: 12.0.0.2 Local transport address: 192.168.0.1, Peer transport address: 192.168.0.2 Local holdtime: 15, Peer holdtime: 15, Up since: Thu Feb 09 12:17:15 Last transition time: Thu Feb 09 12:41:55 GMT +0000 2023 <...>
3.1.3. 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 LDP Session
supervisor@rtbrick>SPINE01: op> show ldp session Instance: default LDP ID Peer IP State Up/Down FECRcvd FECSent 192.168.0.2:0 192.168.0.2 Operational 0d:00h:29m:44s 15 15 192.168.0.3:0 192.168.0.3 Operational 0d:00h:29m:29s 15 15 supervisor@rtbrick>SPINE01: op>
Example 2: Detailed View of LDP Session
supervisor@rtbrick>SPINE01: op> show ldp session detail Instance: default LDP Identifier: 192.168.0.2:0, Peer IP: 192.168.0.2, Local IP: 192.168.0.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 <...>
3.1.4. 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 AFI value is 'ipv4'. |
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 LDP Address
supervisor@rtbrick>SPINE01: op> show ldp address Instance: default, LDP Identifier: 192.168.0.2:0, AFI: ipv4 12.0.0.2 23.0.0.2 24.0.0.2 26.0.0.2 192.168.0.2 12.0.1.2 23.0.1.2 192.168.1.2 12.0.2.2 23.0.2.2 192.168.2.2 12.0.3.2 23.0.3.2 192.168.3.2 192.168.4.2 <...>
3.1.5. 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 value is 'ipv4'. |
prefix <ip> |
Displays the LDP label binding information for the specified prefix. Supported prefix value is 'ipv4'. |
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 LDP Binding
supervisor@rtbrick>SPINE01: op> show ldp binding Instance: default, AFI: ipv4 Prefix In Label Out Label LDP ID Status 192.168.0.1/32 - label:3 - Best label:20066 - 192.168.0.3:0 Non-best label:20065 - 192.168.0.2:0 Non-best 192.168.1.1/32 - label:3 - Best label:20066 - 192.168.0.3:0 Non-best label:20065 - 192.168.0.2:0 Non-best 192.168.2.1/32 - label:3 - Best label:20066 - 192.168.0.3:0 Non-best label:20065 - 192.168.0.2:0 Non-best 192.168.3.1/32 - label:3 - Best label:20066 - 192.168.0.3:0 Non-best label:20065 - 192.168.0.2:0 Non-best 192.168.4.1/32 - label:3 - Best label:20066 - 192.168.0.3:0 Non-best label:20065 - 192.168.0.2:0 Non-best 192.168.0.2/32 label:3 label:20065 192.168.0.2:0 Best label:20065 - 192.168.0.3:0 Non-best 192.168.1.2/32 label:3 label:20065 192.168.0.2:0 Best label:20065 - 192.168.0.3:0 Non-best 192.168.2.2/32 label:3 label:20065 192.168.0.2:0 Best label:20065 - 192.168.0.3:0 Non-best <...>
Example 2: Summary view of LDP Binding for the specified prefix
supervisor@rtbrick>SPINE01: op> show ldp binding prefix 192.168.0.2/32 Instance: default, AFI: ipv4 Prefix In Label Out Label LDP ID Status 192.168.0.2/32 label:3 label:20065 192.168.0.2:0 Best label:20065 - 192.168.0.3:0 Non-best supervisor@rtbrick>SPINE01: op>
3.1.6. 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 are 'ipv4' 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> 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. |
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 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 192.168.0.1/32 3 - - - - 192.168.0.2/32 20065 - 12.0.0.2 ifl-0/0/0/1 1000000 192.168.0.3/32 20067 20067 12.0.0.2 ifl-0/0/0/1 2000001 192.168.1.1/32 3 - - - - 192.168.1.2/32 20065 - 12.0.0.2 ifl-0/0/0/1 1000000 192.168.1.3/32 20067 20067 12.0.0.2 ifl-0/0/0/1 2000001 192.168.2.1/32 3 - - - - 192.168.2.2/32 20065 - 12.0.0.2 ifl-0/0/0/1 1000000 192.168.2.3/32 20067 20067 12.0.0.2 ifl-0/0/0/1 2000001 192.168.3.1/32 3 - - - - 192.168.3.2/32 20065 - 12.0.0.2 ifl-0/0/0/1 1000000 192.168.3.3/32 20067 20067 12.0.0.2 ifl-0/0/0/1 2000001 192.168.4.1/32 3 - - - - 192.168.4.2/32 20065 - 12.0.0.2 ifl-0/0/0/1 1000000 192.168.4.3/32 20067 20067 12.0.0.2 ifl-0/0/0/1 2000001 <...>
3.1.7. LDP Statistics
Syntax:
show ldp statistics <options>
Option | Description |
---|---|
- |
Without any option, the commands 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: LDP statistics information
supervisor@rtbrick>SPINE01: op> show ldp statistics Instance: default, LDP ID: 192.168.0.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: 192.168.0.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>
3.1.8. 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 the TCP connections. |
detail instance <instance-name> |
Detailed list view of the 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 192.168.0.1 192.168.0.2 646 64718 Established default 192.168.0.1 192.168.0.3 646 64718 Established supervisor@rtbrick>SPINE01: op>
3.2. LDP Clear Commands
Clear commands allow to reset operational states.
3.2.1. Clear LDP Session
Syntax:
clear ldp session <options>
Option | Description |
---|---|
all |
Clears all the LDP sessions. |
instance <instance-name> all |
Clears all the LDP sessions for the specified instance. |
instance <instance-name> peer ldp-id <ldp-id> |
Clears the LDP session for the specified instance and peer LDP identifier. |
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>
3.2.2. 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>
©Copyright 2023 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrick’s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.