Configuration Hierarchy

The diagram below illustrates the LDP configuration hierarchy.

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:

set instance <instance-name> protocol ldp <attribute> <value>

Attribute Description

<instance-name>

Name of the LDP instance.

interface <name>

Name of the logical interface.

router-id <router-id>

Router identifier in IPv4 format.

address-family <afi>

Address family identifier (AFI). Supported values: ipv4, or ipv6. Refer to section LDP Address Family Configuration for LDP address family configuration details.

connection-preference <afi>

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.

igp-synchronization <…​>

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.

source-address <ipv4|ipv6> <source-address>

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.

loop-detection <…​>

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.

timer <…​>

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.

peer <ipv4|ipv6> <address> authentication-id <…​>

Specifies an IPv4 or IPv6 LDP peer attributes to apply TCP authentication. Refer to section LDP Authentication Configuration.

peer <ipv4|ipv6> <address> export-policy|import-policy <…​>

Specifies an IPv4 or IPv6 LDP peer attributes to apply import/export policy configurations. Refer to section LDP Import and Export Policy Configuration.

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": "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"
        }
      ]
    }
  }
supervisor@rtbrick>SPINE01: cfg>

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:

set instance <instance-name> protocol ldp address-family <attribute> <value>

Attribute Description

<afi>

Address family identifier (AFI). Supported values: ipv4, ipv6

<afi> status <enable|disable>

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.

<afi> redistribute <source>

Specifies the source from which the routes are to be redistributed. The available options include direct, ipoe, isis, ospf, ppp, and static.

<afi> redistribute <source> policy <policy>

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

supervisor@rtbrick>SPINE01: cfg>  show config instance default protocol ldp address-family
{
  "rtbrick-config:address-family": [
    {
      "afi": "ipv6",
      "status": "disable"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>

Example 2: LDP Redistribution Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp address-family ipv4 redistribution direct
{
  "rtbrick-config:redistribution": [
    {
      "source": "direct"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>

Example 3: LDP Policy Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp address-family ipv4 redistribution
{
  "rtbrick-config:redistribution": [
    {
      "source": "direct",
      "policy": "filter-link-addres"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>

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>

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>

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:

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>

LDP Authentication Configuration

To meet the security requirements of LDP sessions, configure LDP authentication.

Syntax:

set instance <instance-name> protocol ldp peer ipv4|ipv6 <address> authentication-id <authentication-id>

Attribute Description

<address>

Specifies the transport IP address of the peer.

<authentication-id>

Authentication Tuple Identifier

Example 1: LDP Authentication Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp peer ipv4
{
  "rtbrick-config:ipv4": [
    {
      "address": "192.168.1.2",
      "authentication-id": "auth_id_1"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>

TCP Authentication Configuration

In the instance TCP authentication hierarchy, you can optionally enable MD5 or HMAC SHA authentication. Authentication is not configured for LDP directly, but for the TCP sessions used by LDP.

Syntax:

set instance <instance> tcp authentication <authentication-id> <attribute> <value>

Attribute Description

<authentication-id>

Authentication identifier

type <type>

Authentication identifier such as MD5

key1-id <key1-id>

Key ID1 of the receiver

key1-encrypted-text <key1-encrypted-text>

Encrypted text of key1

key1-plain-text <key1-plain-text>

Plain text of key1

key2-id <key2-id>

Key ID2 of the receiver

key2-encrypted-text <key2-encrypted-text>

Encrypted text of key2

key2-plain-text <key2-plain-text>

Plain text of key2

Example: LDP TCP Authentication Configuration

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"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>

LDP Import and Export Policy Configuration

Syntax:

set instance <instance-name> protocol ldp peer ipv4|ipv6 <address> <attribute> <value>

Attribute Description

<address>

Specifies the IPv4 or IPv6 address.

export-policy <export-policy>

Export policy identifier

import-policy <import-policy>

Import policy identifier

Example 1: LDP Export Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp peer ipv4
{
  "rtbrick-config:ipv4": [
    {
      "address": "192.168.1.2",
      "export-policy": "exp-policy1"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>

Example 3: LDP Import Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ldp peer ipv4
{
  "rtbrick-config:ipv4": [
    {
      "address": "192.168.1.2",
      "import-policy": "imp-policy1"
    }
  ]
}
supervisor@rtbrick>SPINE01: cfg>