LDP Configuration
LDP Configuration Hierarchy
The diagram below illustrates the LDP configuration hierarchy.

Configuration Syntax and Commands
The following sections describe the LDP configuration syntax and commands.
LDP Instance Configuration
At this configuration hierarchy, you configure LDP protocol parameters which are generic to the LDP instance.
Syntax:
Attribute | Description |
---|---|
|
Name of the LDP instance. |
|
Name of the logical interface. |
|
Router identifier in IPv4 format. |
|
Address family identifier (AFI). Supported values: ipv4, or ipv6. Refer to section LDP Address Family Configuration for LDP address family configuration details. |
|
Specifies the connection preference for the TCP session. Supported values: ipv4, or ipv6. By default, IPv6 is used as the preferred TCP connection if an IPv6 source address is configured. Refer to section Dual-stack LDP for more information on the LDP Dual-stack behaviour. |
|
LDP IGP synchronization configuration. This option is supported only on interfaces running Intermediate System-to-System (IS-IS) or OSPFv2 processes. Refer to section LDP IGP Synchronization for LDP-IGP synchronization configuration details. |
|
Use the specified IP addresses (IPv4 or IPv6) as the transport address for the LDP session. For LDP over IPv6, the IPv6 source address is mandatory. Refer to section Dual-stack LDP for more information on the LDP Dual-stack behavior. |
|
The LDP loop detection feature enables LDP to detect loops during an LSP establishment. Refer to section LDP Loop Detection Configuration for the loop detection configuration details. |
|
Specifies the protocol preference of routes learned by T-LDP ('external'), LDP ('internal'), or both. This preference is used to select routes learned from multiple protocols. external: Range: 1 to 255. Default: 190. internal: Range: 1 to 255. Default: 9. |
|
Specifies the Hello hold time, Hello interval, Keepalive hold time, and Keepalive interval. Refer to section LDP Timer Configuration for the LDP timer configuration details. |
|
Specifies an IPv4 or IPv6 LDP session attributes to apply TCP authentication. Refer to section LDP Authentication Configuration. |
|
Specifies the IPv4 or IPv6 address of the targeted LDP neighbor. Refer to section LDP Targeted Neighbor Configuration. |
|
Specifies an IPv4 or IPv6 LDP session attributes to apply import/export policy configurations. Refer to section LDP Import and Export Policy Configuration. |
Example: LDP Instance Configuration
This following configuration example sets the LDP router ID and enables LDP on various interfaces for the default
instance.
set instance default protocol ldp router-id 198.51.100.1 set instance default protocol ldp interface ifl-0/0/0/1 set instance default protocol ldp interface ifl-0/0/0/100 set instance default protocol ldp interface ifl-0/0/0/101 set instance default protocol ldp interface ifl-0/0/1/102 set instance default protocol ldp interface ifl-0/0/2/1 set instance default protocol ldp interface ifl-0/0/3/1 set instance default protocol ldp interface lo-0/0/0/1 set instance default protocol ldp interface lo-0/0/0/2 set instance default protocol ldp interface lo-0/0/0/3 set instance default protocol ldp interface lo-0/0/0/4 set instance default protocol ldp interface lo-0/0/0/5 commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp { "rtbrick-config:ldp": { "router-id": "198.51.100.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" } ] } }
The following configuration example sets the administrative preference values for external and internal LDP routes within the default instance.
set instance default protocol ldp protocol-preference external 150 set instance default protocol ldp protocol-preference internal 8 commit
supervisor@rtbrick>LEAF01: cfg> show config instance default protocol ldp protocol-preference { "rtbrick-config:protocol-preference": { "external": 150, "internal": 8 } }
To access the RESTCONF API that corresponds to this CLI, click
here.
LDP Targeted Neighbor Configuration
The targeted neighbor configuration establishes an LDP neighbor with a remote neighbor that is not directly connected.
Syntax:
Attribute | Description |
---|---|
|
IPv4 address of the remote LDP neighbor. |
|
Neighbhor address to which ldp hello is sent |
|
Targeted hold time, <0-65535>, default 45s |
|
Targeted hello messages interval, <0-65535>, default 15s |
|
Specifies the neighbor type, that is, sender or receiver. |
|
IPv6 address of the remote LDP neighbor. |
|
Neighbhor address to which ldp hello is sent |
|
Targeted hold time, <0-65535>, default 45s |
|
Targeted hello messages interval, <0-65535>, default 15s |
|
Specifies the neighbor type, that is, sender or receiver. |
The following example configurates the targeted LDP neighbors for both IPv4 and IPv6 addresses within the default instance.
set instance default protocol ldp targeted-neighbor ipv4 neighbor-address 198.51.100.1 source-address 198.51.100.2 set instance default protocol ldp targeted-neighbor ipv4 neighbor-address 198.51.100.5 source-address 198.51.100.2 set instance default protocol ldp targeted-neighbor ipv6 neighbor-address 2001:DB8::1 source-address 2001:DB8::2 set instance default protocol ldp targeted-neighbor ipv6 neighbor-address 2001:DB8::5 source-address 2001:DB8::2
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp targeted-neighbor { "rtbrick-config:targeted-neighbor": { "ipv4": [ { "neighbor-address": "198.51.100.1", "source-address": "198.51.100.2" }, { "neighbor-address": "198.51.100.5", "source-address": "198.51.100.2" } ], "ipv6": [ { "neighbor-address": "2001:DB8::1", "source-address": "2001:DB8::2" }, { "neighbor-address": "2001:DB8::5", "source-address": "2001:DB8::2" } ] } }
To access the RESTCONF API that corresponds to this CLI, click
here.
LDP Address Family Configuration
The address-family command allows you to enable the address families that LDP will route and configure settings that are specific to that address family.
Syntax:
Attribute | Description | ||
---|---|---|---|
|
Address family identifier (AFI). Supported AFI values: ipv4, ipv6. |
||
|
Subsequent address family identifier (SAFI). Supported SAFI value: labeled-unicast.
|
||
|
Enable or disable address family. By default, both IPv4 and IPv6 address families are enabled, as LDP supports dual stack. Refer to section Dual-stack LDP for more information on the LDP Dual-stack behavior. |
||
|
Specifies the source from which the routes are to be redistributed. The available options include |
||
|
Specifies the name of the policy map. The redistribute attach point allows routes from other sources to be advertised by LDP. The policy can be applied only to the routes that are redistributed from other sources to LDP. |
Example 1: LDP Address Family Configuration
set instance default protocol ldp address-family ipv6 labeled-unicast status enable commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp address-family { "rtbrick-config:address-family": [ { "afi": "ipv6", "safi": "labeled-unicast", "status": "enable" } ] }
Example 2: LDP Redistribution Configuration
set instance default protocol ldp address-family ipv4 redistribute direct commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp address-family ipv4 redistribute direct { "rtbrick-config:redistribute": [ { "source": "direct" } ] }
Example 3: LDP Policy Configuration
set instance default protocol ldp address-family ipv4 redistribute direct policy filter-link-address commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp address-family ipv4 redistribute { "rtbrick-config:redistribute": [ { "source": "direct", "policy": "filter-link-address" } ] }
To access the RESTCONF API that corresponds to this CLI, click
here.
LDP Loop Detection Configuration
The LDP loop detection feature enables LDP to detect loops during an LSP establishment.
Syntax:
Attribute | Description |
---|---|
|
Specifies the hop count limit for loop detection. Range: 0-255. Default: 32. |
|
Enables or disables loop detection. By default, this option is disabled. When this option is enabled, both hop count and path vector are enabled. |
|
Specifies the path vector length limit for loop detection. Range: 0-255. Default: 32. |
Example 1: LDP Loop Detection Configuration
set instance default protocol ldp loop-detection enable true set instance default protocol ldp loop-detection hop-count 64 set instance default protocol ldp loop-detection vector-length 64 commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp loop-detection { "rtbrick-config:loop-detection": { "enable": "true", "hop-count": 64, "vector-length": 64 } }
To access the RESTCONF API that corresponds to this CLI, click
here.
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:
Attribute | Description |
---|---|
|
Specifies the hello hold-time interval in seconds before declaring a neighbor to be down. Range: 0-65535. Default: 15. |
|
Specifies the hello messages interval in seconds. Range: 0-65535. Default: 5. |
|
Specifies the session keepalive messages interval in seconds. Range: 1-65535. Default: 10. |
|
Specifies the session keepalive timeout in seconds before declaring a session to be down. Range: 1-65535. Default: 30. |
Example 1: LDP Timer Configuration
set instance default protocol ldp timer hello interval 10 set instance default protocol ldp timer hello hold-time 20 set instance default protocol ldp timer session keepalive-interval 3000 set instance default protocol ldp timer session keepalive-timeout 5000 commit
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 } } }
To access the RESTCONF API that corresponds to this CLI, click
here.
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) or OSPFv2 processes.
Syntax:
Attribute | Description |
---|---|
|
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
set instance default protocol ldp igp-synchronization hold-timer 60 commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp igp-synchronization { "rtbrick-config:igp-synchronization": { hold-timer": 60, } }
To access the RESTCONF API that corresponds to this CLI, click
here.
LDP Authentication Configuration
To meet the security requirements of LDP sessions, configure LDP authentication.
Syntax:
Attribute | Description |
---|---|
|
Specifies the transport IP address of the peer. |
|
Authentication Tuple Identifier |
Example 1: LDP Authentication Configuration
set instance default protocol ldp session ipv4 address 198.51.100.2 authentication-id auth_id_1 commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp session ipv4 { "rtbrick-config:ipv4": [ { "address": "198.51.100.2", "authentication-id": "auth_id_1" } ] }
To access the RESTCONF API that corresponds to this CLI, click
here.
TCP Authentication Configuration
In the instance TCP authentication hierarchy, you can optionally enable MD5 or HMAC-SHA-1-96, HMAC-SHA-256-128, or AES-128-CMAC-96 authentication. Authentication is not configured for LDP directly, but for the TCP sessions used by LDP.
Syntax:
Attribute | Description |
---|---|
|
Authentication identifier |
|
Authentication identifier such as MD5 or HMAC-SHA-1-96,HMAC-SHA-256-128 or AES-128-CMAC-96 |
|
Key ID1 of the receiver |
|
Encrypted text of key1 |
|
Plain text of key1 |
|
Key ID2 of the receiver |
|
Encrypted text of key2 |
|
Plain text of key2 |
Example: LDP TCP Authentication Configuration
set instance default tcp authentication auth_id_1 type MD5 set instance default tcp authentication auth_id_1 key1-id 1 set instance default tcp authentication auth_id_1 key1-encrypted-text "$2a6fd7db50a18a9f1f16b5c5b4214fab0" commit
supervisor@rtbrick>SPINE01: cfg> show config instance default tcp authentication auth_id_1 { "rtbrick-config:authentication": [ { "authentication-id": "auth_id_1", "type": "MD5", "key1-id": 1, "key1-encrypted-text": "$2a6fd7db50a18a9f1f16b5c5b4214fab0" } ] }
To access the RESTCONF API that corresponds to this CLI, click
here.
LDP Import and Export Policy Configuration
Syntax:
Attribute | Description |
---|---|
|
Specifies the IPv4 or IPv6 address. |
|
Export policy identifier |
|
Import policy identifier |
Example 1: LDP Export Configuration
set instance default protocol ldp session ipv4 address 198.51.100.2 export-policy exp-policy1 commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp session ipv4 { "rtbrick-config:ipv4": [ { "address": "198.51.100.2", "export-policy": "exp-policy1" } ] }
Example 3: LDP Import Configuration
set instance default protocol ldp session ipv4 address 198.51.100.2 import-policy imp-policy1 commit
supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp session ipv4 { "rtbrick-config:ipv4": [ { "address": "198.51.100.2", "import-policy": "imp-policy1" } ] }
To access the RESTCONF API that corresponds to this CLI, click
here.