Configuring LDP with CLI

This section provides information to configure LDP using the command line interface.

Topics in this section include:

LDP Configuration Overview

When the implementation of LDP is instantiated, the protocol is in the no shutdown state. In addition, targeted sessions are then enabled. The default parameters for LDP are set to the documented values for targeted sessions in draft-ietf-mpls-ldp-mib-09.txt.

LDP must be enabled in order for signaling to be used to obtain the ingress and egress labels in frames transmitted and received on the service distribution path (SDP). When signaling is off, labels must be manually configured when the SDP is bound to a service.

Basic LDP Configuration

This chapter provides information to configure LDP and remove configuration examples of common configuration tasks.

The LDP protocol instance is created in the no shutdown (enabled) state.

The following displays the default LDP configuration.

A:ALA-1>config>router>ldp# info
----------------------------------------------
session-parameters
exit
interface-parameters
exit
targeted-session
exit
no shutdown
----------------------------------------------
A:ALA-1>config>router>ldp#

Common Configuration Tasks

This section provides information to configure:

Enabling LDP

LDP must be enabled in order for the protocol to be active. MPLS does not need to be enabled on the router except if the network interface uses the Packet over Sonet (POS) encapsulation (Sonet path encapsulation type set to ppp-auto). In this case, MPLS must be enabled and the interface name added into MPLS to allow for the MPLSCP to come up on the PPP link between the two peers and for MPLS to be used on the interface. MPLS is enabled in the config>router>mpls context.

Use the following syntax to enable LDP on a router:

CLI Syntax:
ldp
Example:
config>router# ldp

The following displays the enabled LDP configuration.

A:ALA-1>config>router# info
----------------------------------------------
...
#------------------------------------------
echo "LDP Configuration"
#------------------------------------------
ldp
session-parameters
exit
interface-parameters
exit
targeted-session
exit
exit
----------------------------------------------
...
A:ALA-1>config>router#

Configuring FEC Originate Parameters

A FEC can be added to the LDP IP prefix database with a specific label operation on the node. Permitted operations are pop or swap. For a swap operation, an incoming label can be swapped with a label in the range of 16 to 1048575. If a swap- label is not configured then the default value is 3.

A route table entry is required for a FEC with a pop operation to be advertised. For a FEC with a swap operation, a route-table entry must exist and user configured next-hop for swap operation must match one of the next-hops in route-table entry.

Use the following syntax to configure FEC originate parameters:

CLI Syntax:
config>router>ldp
fec-originate ip-prefix/mask [advertised-label in-label] next-hop ip-address [swap-label out-label]
fec-originate ip-prefix/mask [advertised-label in-label] pop

The following displays a FEC originate configuration example.

A:ALA-5>config>router# info
----------------------------------------------
fec-originate 100.1.1.1/32 pop
fec-originate 100.2.1.1/32 advertised-label 1000 next-hop 10.10.1.2
fec-originate 100.3.1.1/32 advertised-label 1001 next-hop 10.10.2.3
swap-label 131071
session-parameters
exit
interface-parameters
exit
targeted-session
exit
exit
----------------------------------------------
A:ALA-5>config>router>ldp#

Configuring Graceful-Restart Helper Parameters

Graceful-restart helper advertises to its LDP neighbors by carrying the fault tolerant (FT) session TLV in the LDP initialization message, assisting the LDP in preserving its IP forwarding state across the restart. Alcatel-Lucent’s recovery is self-contained and relies on information stored internally to self-heal. This feature is only used to help third-party routers without a self-healing capability to recover.

Maximum recovery time is the time (in seconds) the sender of the TLV would like the receiver to wait, after detecting the failure of LDP communication with the sender.

Neighbor liveness time is the time (in seconds) the LSR is willing to retain its MPLS forwarding state. The time should be long enough to allow the neighboring LSRs to re-sync all the LSPs in a graceful manner, without creating congestion in the LDP control plane.

Use the following syntax to configure graceful-restart parameters:

CLI Syntax:
config>router>ldp
[no] graceful-restart

Applying Export and Import Policies

Both inbound and outbound label binding filtering are supported. Inbound filtering allows a route policy to control the label bindings an LSR accepts from its peers. An import policy can accept or reject label bindings received from LDP peers.

Label bindings can be filtered based on:

  1. Neighbor — Match on bindings received from the specified peer.
  2. Interface — Match on bindings received from a neighbor or neighbors adjacent over the specified interface.
  3. Prefix-list — Match on bindings with the specified prefix/prefixes.

Outbound filtering allows a route policy to control the set of LDP label bindings advertised by the LSR. An export policy can control the set of LDP label bindings advertised by the router. By default, label bindings for only the system address are advertised and propagate all FECs that are received. All other local interface FECs can be advertised using policies.

Note:

The system IP address and static FECs cannot be blocked using an export policy.

Matches can be based on:

  1. Loopback — loopback interfaces.
  2. All — all local subnets.
  3. Match — match on bindings with the specified prefix/prefixes.

Use the following syntax to apply import and export policies:

CLI Syntax:
config>router>ldp
export policy-name [policy-name...(upto 32 max)]
import policy-name [policy-name...(upto 32 max)]

The following displays export and import policy configuration examples.

A:ALA-1>config>router# info
----------------------------------------------
export "LDP-export"
fec-originate 100.1.1.1/32 pop
fec-originate 100.2.1.1/32 advertised-label 1000 next-hop 10.10.1.2
import "LDP-import"
session-parameters
exit
interface-parameters
exit
targeted-session
exit
----------------------------------------------
A:ALA-1>config>router#

Targeted Session Parameters

Use the following syntax to specify targeted-session parameters:

CLI Syntax:
config>router# ldp
targeted-session
disable-targeted-session
export-prefixes policy-name [policy-name...(up to 5 max)]
ipv4
hello timeout factor
keepalive timeout factor
import-prefixes policy-name [policy-name...(up to 5 max)]
peer ip-address
hello timeout factor
keepalive timeout factor
no shutdown
tunneling
lsp lsp-name

The following example displays an LDP configuration example:

A:ALA-1>config>router>ldp# info
----------------------------------------------
...
targeted-session
ipv4
hello 120 3
keepalive 120 3
exit
peer 10.10.10.104
hello 240 3
keepalive 240 3
exit
exit
----------------------------------------------
A:ALA-1>config>router>ldp#

Interface Parameters

Use the following syntax to configure interface parameters:

CLI Syntax:
config>router# ldp
interface-parameters
interface ip-int-name [dual stack]
bfd-enable [ipv4][ipv6]
ipv4/ipv6
hello timeout factor
keepalive timeout factor
transport-address {system | interface}
no shutdown
ipv4/ipv6
hello timeout factor
keepalive timeout factor
transport-address {system | interface}

The following example displays an interface parameter configuration example:

A:ALA-1>config>router>ldp# info
----------------------------------------------
...
interface-parameters
interface "to-DUT1" dual-stack
ipv4
hello 240 3
keepalive 240 3
exit
exit
exit
----------------------------------------------
A:ALA-1>config>router>ldp#

Session Parameters

Use the following syntax to specify interface parameters:

CLI Syntax:
config>router# ldp
session-parameters
peer ip-address
auth-keychain name
authentication-key [authentication-key | hash-key] [hash | hash2]
ttl-security min-ttl-value [log log-id]

The following example displays an LDP configuration example:

A:ALA-1>config>router>ldp# info
----------------------------------------------
export "LDP-export"
import "LDP-import"
session-parameters
peer 1.1.1.1
exit
peer 10.10.10.104
exit
exit
tcp-session-parameters
peer-transport 10.10.10.104
authentication-key "E7GtYNZHTAaQqVMRDbfNIZpLtHg4ECOk" hash2
exit
exit
interface-parameters
interface "to-DUT1" dual-stack
ipv4
hello 240 3
keepalive 240 3
exit
exit
exit
targeted-session
ipv4
hello 120 3
keepalive 120 3
exit
peer 10.10.10.104
hello 240 3
keepalive 240 3
exit
exit
----------------------------------------------
A:ALA-1>config>router>ldp#

LDP Signaling and Services

When LDP is enabled, targeted sessions can be established to create remote adjacencies with nodes that are not directly connected. When service distribution paths (SDPs) are configured, extended discovery mechanisms enable LDP to send periodic targeted hello messages to the SDP far-end point. The exchange of LDP hellos trigger session establishment. The SDP signaling default enables tldp. The service SDP uses the targeted-session parameters configured in the config>router>ldp>targeted-session context.

The SDP LDP and LSP commands are mutually exclusive; either one LSP can be specified or LDP can be enabled. If LDP is already enabled on an MPLS SDP, then an LSP cannot be specified on the SDP. If an LSP is specified on an MPLS SDP, then LDP cannot be enabled on the SDP.

To enable LDP on the SDP when an LSP is already specified, the LSP must be removed from the configuration using the no lsp lsp-name command. For more information about configuring SDPs, refer to the SR OS Services Guide.

The following example displays the command syntax usage to configure enable LDP on an MPLS SDP:

CLI Syntax:
config>service>sdp#
ldp
signaling {off | tldp}

The following displays an example of an SDP configuration showing the signaling default tldp enabled.

A:ALA-1>config>service>sdp# info detail
----------------------------------------------
description "MPLS: to-99"
far-end 10.10.10.99
            signaling tldp
path-mtu 4462
keep-alive
hello-time 10
hold-down-time 10
max-drop-count 3
timeout 5
no message-length
no shutdown
exit
no shutdown
----------------------------------------------
A:ALA-1>config>service>sdp#

The following displays an example of an SDP configuration for the 7750 SR, showing the signaling default tldp enabled.

A:ALA-1>config>service>sdp# info detail
----------------------------------------------
description "MPLS: to-99"
far-end 10.10.10.99
ldp
signaling tldp
path-mtu 4462
keep-alive
hello-time 10
hold-down-time 10
max-drop-count 3
timeout 5
no message-length
no shutdown
exit
no shutdown
----------------------------------------------
A:ALA-1>config>service>sdp#

The following shows a working configuration of LDP over RSVP-TE (1) where tunnels look like the second example (2):

Example 1: LDP over RSVP-TE

*A:ALA-1>config>router>ldp# info
----------------------------------------------
prefer-tunnel-in-tunnel
interface-parameters
interface "port-1/1/3"
exit
interface "port-lag-1"
exit
exit
targeted-session
peer 10.51.0.1
shutdown
tunneling
lsp "to_P_1"
exit
exit
peer 10.51.0.17
shutdown
tunneling
lsp "to_P_6"
exit
exit
exit
----------------------------------------------
*A:ALA-1>config>router>ldp#

Example 2: Tunnels

ALA-1>config>router>if-attr# info
----------------------------------------------
admin-group "lower" value 2
admin-group "upper" value 1
----------------------------------------------
*A:ALA-1>config>router>mpls# info
----------------------------------------------
resignal-timer 30
interface "system"
exit
interface "port-1/1/3"
exit
interface "port-lag-1"
exit
path "dyn"
no shutdown
exit
lsp "to_P_1"
to 10.51.0.1
cspf
fast-reroute facility
exit
primary "dyn"
exit
no shutdown
exit
lsp "to_P_6"
to 10.51.0.17
cspf
fast-reroute facility
exit
primary "dyn"
exit
no shutdown
exit
no shutdown
----------------------------------------------
*A:ALA-1>config>router>mpls#

LDP Configuration Management Tasks

This section discusses the following LDP configuration management tasks:

Disabling LDP

The no ldp command disables the LDP protocol on the router. All parameters revert to the default settings. LDP must be shut down before it can be disabled.

Use the following command syntax to disable LDP:

CLI Syntax:
no ldp
shutdown

Modifying Targeted Session Parameters

The modification of LDP targeted session parameters does not take effect until the next time the session goes down and is re-establishes. Individual parameters cannot be deleted. The no form of a targeted-session parameter command reverts modified values back to the default. Different default parameters can be configured for IPv4 and IPv6 LDP targeted hello adjacencies.

The following example displays the command syntax usage to revert targeted session parameters back to the default values:

Example:
config>router# ldp
config>router>ldp# targeted-session
config>router>ldp>tcp-session-parameters>peer# no authentication-key
config>router>ldp>targ-session# no disable-targeted-session
config>router>ldp>targ-session>ipv4# no hello
config>router>ldp>targ-session>ipv4# no keepalive
config>router>ldp>targ-session# no peer 10.10.10.104

The following output displays the default values:

A:ALA-1>config>router>ldp>targeted# info detail
----------------------------------------------
no disable-targeted-session
no import-prefixes
no export-prefixes
ipv4
no hello
no keepalive
no hello-reduction
exit
ipv6
no hello
no keepalive
no hello-reduction
exit
----------------------------------------------
A:ALA-1>config>router>ldp>targeted#

Modifying Interface Parameters

Individual parameters cannot be deleted. The no form of a interface-parameter command reverts modified values back to the defaults. The modification of LDP targeted session parameters does not take effect until the next time the session goes down and is re-establishes.

The following output displays the default values:

A:ALA-1>config>router>ldp>if-params>if# info detail
----------------------------------------------
no bfd-enable
ipv4
no hello
no keepalive
no local-lsr-id
fec-type-capability
p2mp-ipv4 enable
exit
no transport-address
no shutdown
exit
no shutdown
----------------------------------------------