LDP Commands
This chapter is a reference for the LDP commands:
advertise-labels
Use this command to prevent the distribution of any locally assigned labels.
Use the no parameter to enable the distribution of all locally assigned labels to all LDP neighbors.
Command Syntax
advertise-labels for any to none
advertise-labels for PREFIX to (PEER|any)
no advertise-labels for any to none
no advertise-labels for PREFIX to (PEER|any)
Parameters
for
Specify the permitted destinations
any
Specify to permit any locally assigned labels
PREFIX
Specify the destinations which have labels are advertised
to
Specify the given neighbor
PEER
Specify the LDP neighbors which receive these advertisements
none
Specify that there are no LDP neighbors
Default
The labels of all destinations are advertised to all LDP neighbors.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ldp
(config-router)#advertise-labels for any to none
#configure terminal
(config)#router ldp
(config-router)#advertise-labels for PREFIX to any
#configure terminal
(config)#router ldp
(config-router)#advertise-labels for PREFIX to PEER
advertise-label-for-default-route
Use this command to enable label advertisement for default route.
Use no form to disable the label advertisement for default route.
Command Syntax
advertise-label-for-default-route
Parameters
None
Default
Disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 4.2.
Examples
#configure terminal
(config)#router ldp
(config-router)#advertise-label-for-default-route
advertisement-mode
Use this command to set the label advertisement mode for all the interfaces for the current LSR. Specifying downstream-on-demand and downstream-unsolicited mode affects which LSR initiates mapping requests and mapping advertisements.
This command is a global command used to set the label advertisement mode for all interfaces for the current LSR. The advertisement mode set for a specific interface overrides the value set by this command (see ldp advertisement-mode). Use this command before starting the interface as it closes and restarts all sessions.
Use the no parameter to revert to the default advertisement mode value.
Command Syntax
advertisement-mode (downstream-on-demand|downstream-unsolicited)
no advertisement-mode (downstream-on-demand|downstream-unsolicited)
Parameters
downstream-on-demand
Sends label upon request. When a users uses this mode, a router distributes a label to a peer only if there is a pending label request from a peer. The reaction of the downstream router to this request depends on the label advertising mode supported on the next hop. This mode is typically used with the conservative label retention mode.
downstream-unsolicited
Sends label without waiting request. This mode distributes labels to peers without waiting for a label request, and is typically used with the liberal label retention mode.
Default
By default, advertisement mode is downstream-unsolicited
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
In the following example, the LSR will use the downstream-unsolicited advertisement mode for an LDP session on its interfaces.
#configure terminal
(config)#router ldp
(config-router)#advertisement-mode downstream-unsolicited
auto-targeted-session
Use this command at remote LFA node, to accept received targeted hello and allow creating TLDP session dynamically to establish rLFA tunnel. This command is used for remote LFA only.
Use the no parameter to disable dynamically TLDP session creation.
Dynamically created TLDP session can be deleted only when "auto-targeted-session" or "fast-reroute" configuration is removed.
Command Syntax
auto-targeted-session
no auto-targeted-session
Parameters
None
Command Mode
Router mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
#configure terminal
(config)#router ldp
(config-router)#auto-targeted-session
(config-router)#
clear ldp adjacency
Use this command to clear an adjacency with a specified peer, or to clear all adjacencies for the current LSR.
Command Syntax
clear ldp adjacency (A.B.C.D|*)
Parameters
*
Specify to clear all adjacencies.
A.B.C.D
Specify to clear IPv4 address of the peer.
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#clear ldp adjacency 123.123.123.33
clear ldp session
Use this command to clear a session established with a specified peer, or to clear all sessions for the current LSR.
Command Syntax
clear ldp session (A.B.C.D|*)
Parameters
*
Specify to clear all sessions.
A.B.C.D
Specify to clear IPv4 address of the peer.
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#clear ldp session 123.123.123.33
clear ldp statistics
Use this command to clear LDP statistics. This command clears the count per each operation filtered by an advertisement list.
Command Syntax
clear ldp statistics
Parameters
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#clear ldp statistics
clear ldp statistics advertise-labels
Use this command to clear LDP advertise-labels statistics. This command clears the count per each operation filtered by an advertisement list.
Command Syntax
clear ldp statistics advertise-labels
clear ldp statistics advertise-labels for PREFIX
clear ldp statistics advertise-labels for PREFIX to PEER
Parameters
advertise-labels
Specify the IP prefix list of advertise-labels.
for
Specify the permitted destinations.
PREFIX
Specify the destinations that have their labels advertised.
to
Specify the given neighbor.
PEER
Specify the LDP neighbors that receive these advertisements.
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#clear ldp statistics advertise-labels
control-mode
Use this command to set the control mode for label processing. Ordered processing sets the mode to strict chain-of-command; an LSR replies to a request packet from an LSR higher in the chain only after it receives a label from an LSR lower in the chain. Independent processing sets the mode to instant replies.
In independent control mode, each LSR might advertise label mappings to its neighbors at any time. In independent downstream-on-demand mode, an LSR might answer requests for label mappings immediately, without waiting for a label mapping from the next hop. In independent downstream unsolicited mode, an LSR might advertise a label mapping for an Forwarding Equivalence Class (FEC) to its neighbors whenever it is prepared to label-switch that FEC. In independent mode, an upstream label can be advertised before a downstream label is received.
In ordered control mode, an LSR may initiate the transmission of label mapping only for an FEC for which it has a label mapping for the FEC next hop, or for which the LSR is the egress. For each FEC for which the LSR is not the egress and no mapping exists, the LSR must wait until a label from a downstream LSR is received. An LSR may be an egress for some FECs and a non-egress for others. Changes in control mode only affect labels that were sent or received after the change was made.
Use the no parameter to revert to default control mode.
Note: Control mode "independent" is supported with advertisement mode "DU" only.
Note: When the advertisement mode is set as "DU", control mode automatically sets to "independent".
Note: Control mode "independent" is not supported with advertisement mode "DOD".
Note: Control mode "ordered" is supported with advertisement mode "DOD" only.
Note: Control mode "ordered" is not supported with advertisement mode "DU".
Note: When the advertisement mode is set as "DOD", control mode automatically sets to "ordered".
Command Syntax
control-mode (ordered|independent)
no control-mode
Parameters
independent
Sets control mode to independent processing.
ordered
Sets control mode to ordered processing.
Command Mode
Router mode
Default
By default, control mode is independent
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#control-mode ordered
debug ldp advertise-labels
Use this command to enable the debugging of LDP advertise-label events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp advertise-labels
no debug ldp advertise-labels
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp advertise-labels
debug ldp all
Use this command to enable the debugging of all LDP events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp all
no debug ldp all
no debug all
undebug all
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp all
debug ldp dsm
Use this command to enable the debugging of LDP DSM events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp dsm
no debug ldp dsm
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp dsm
debug ldp events
Use this command to enable the debugging of all LDP events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp events
no debug ldp events
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp advertise-labels
(config)#debug ldp all
(config)#debug ldp dsm
(config)#debug ldp events
debug ldp fsm
Use this command to enable the debugging of LDP FSM events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp fsm
no debug ldp fsm
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp fsm
debug ldp hexdump
Use this command to enable the debugging of LDP hexdump events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp hexdump
no debug ldp hexdump
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp hexdump
debug ldp inter-area
Use this command to enable the debugging of LDP inter-area events.
On using the debug command, the router continues to generate an output until the no parameter is used with this
command. The debug output and system error messages are written on the virtual terminal. Use the log
syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp inter-area
no debug ldp inter-area
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 4.0.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp inter-area
debug ldp nsm
Use this command to enable the debugging of LDP NSM events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp nsm
no debug ldp nsm
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp nsm
debug ldp packet
Use this command to enable the debugging of LDP packet events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp packet
debug ldp packet (notification|hello|initialization|keepalive|address|label)
no debug ldp packet
no debug ldp packet (notification|hello|initialization|keepalive|address|label)
Parameters
notification
Debug LDP notification packets.
hello
Debug LDP hello packets.
initialization
Debug LDP initialization packets.
keepalive
Debug LDP keepalive packets.
address
Debug LDP address (withdraw) packets.
label
Debug LDP address label packets.
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp packet hello
debug ldp usm
Use this command to enable the debugging of LDP USM events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp usm
no debug ldp usm
Parameters
None
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp usm
debug ldp vc usm
Use this command to enable the debugging of LDP VC events.
On using the debug command, the router continues to generate an output until the no parameter is used with this command. The debug output and system error messages are written on the virtual terminal. Use the log syslog command in configure mode to redirect the debugging output to a file or the syslog.
Use the no parameter with this command to disable this function.
Command Syntax
debug ldp vc dsm
debug ldp vc usm
no debug ldp vc dsm
no debug ldp vc usm
Parameters
dsm
Debug LDP downstream SM.
usm
Debug LDP upstream SM.
Command Mode
Configure mode, Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#log syslog
(config)#debug ldp vc dsm
(config)#debug ldp vc usm
disable-ldp
Use this command to disable LDP IPv4 on a specified interface.
This command disables the transmission of Hello packets through the current interface, and clears all created sessions and adjacencies for this interface. Use disable-ldp alone to disable only LDP IPv4 on the interface.
Command Syntax
disable-ldp (ipv4|)
Parameters
ipv4
Disables IPv4 on the interface.
Default
By default, disable ldp is disabled
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The following example disables LDP IPv4 on interface eth0.
#configure terminal
(config)#interface eth0
(config-if)#disable-ldp
The following example disables LDP IPv4 on interface eth0.
#configure terminal
(config)#interface eth0
(config-if)#disable-ldp ipv4
enable-ldp
Use this command to enable LDP IPv4 on a specified interface. This command enables the transmission of Hello packets through the current interface, so that LDP adjacencies and LDP sessions can be created.
Note: The corresponding interface must be enabled for label-switching using the
label-switching command.
Command Syntax
enable-ldp ipv4
Parameters
None
Default
By default, enable ldp is disabled
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The following example enables LDP IPv4 on interface eth0.
#configure terminal
(config)#interface eth0
(config-if)#enable-ldp ipv4
explicit-null
Use this command to configure the router to send explicit-null labels for directly connected FECs instead of implicit-null labels. Implicit-nulls are the default labels.
This command controls the label value advertised on the egress router of an LSP. By default, implicit null label (label 3) is advertised for directly connected FECs. LDP advertises an Implicit Null label that causes the previous hop router to perform penultimate hop popping. Use the explicit null command to avoid the penultimate router from penultimate hop popping, and to force it to replace the incoming label with the explicit null label.
Note: Do not use this command if the LDP is concurrently used for MPLS/BGP VPNs.
Use the no parameter to stop sending explicit-null labels for directly connected FECs and resume sending implicit-null labels for them.
Command Syntax
explicit-null
no explicit-null
Parameters
None
Default
By default, sends implicit-null labels.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ldp
(config-router)#explicit-null
fast-reroute
Use this command to enable the installation of backup paths advertised by IGP LFA (and/or rLFA) fast reroute.
Use no form CLI to disable the feature.
Command Syntax
fast-reroute
no fast-reroute
Parameters
None
Command Mode
Router mode
Applicability
This command was introduced in OcNOS version 5.1.
Examples
#configure terminal
(config)#router ldp
(config)fast-reroute
global-merge-capability
Use this command to override the default merge capability setting of all the interfaces for the current LSR.
The merge capability aggregates multiple incoming flows with the same destination address into a single outgoing flow. This reduces the label-space shortage by sharing labels for different flows with the same destination, or the same FEC (Forwarding Equivalence Class).
Use the no parameter to revert to the default merge capability settings of all the interfaces for this LSR.
Command Syntax
global-merge-capability (merge-capable|non-merge-capable)
no global-merge-capability
Parameters
merge-capable
Maps all incoming labels that are destined for the same FEC to the same outgoing label (this is the Ethernet default.)
non-merge-capable
Maps all incoming labels, regardless of destination FEC to unique outgoing labels (this is the non-Ethernet default.)
Default
By default, global merge capability is merge capable.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ldp
(config-router)#global-merge-capability merge-capable
graceful-restart
Use this command to enable the Graceful-Restart capability for LDP.
Use the no parameter to disable the GR capability for LDP.
Command Syntax
graceful-restart full
graceful-restart helper-only
graceful-restart timers max-recovery <15-600>
graceful-restart timers neighbor-liveness <5-300>
no graceful-restart
no graceful-restart timers max-recovery
no graceful-restart timers neighbor-liveness
Parameters
full
Configuring with full enable the complete GR capability
helper-only
Configuring with helper-only enables only helper mode
timers
Non-default recovery and reconnect timer values.
max-recovery
Maximum recovery time
<15-600>
Interval until which LDP preserves route after peer restart
neighbor-liveness
Neighbor Liveness Time
<5-300>
Hold timer for a targeted LDP peer
Default
GR capability is not enabled.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 5.0.
Examples
#configure terminal
(config)#router ldp
(config-router)#graceful-restart full
(config-router)#graceful-restart helper-only
(config-router)#graceful-restart timers max-recovery 100
(config-router)#graceful-restart timers neighbor-liveness 200
hello-interval
Use this command to set the interval after which hello packets are sent out.
LDP defines a mechanism for discovering adjacent Label Switching Routers (LSRs) that participate in label switching (adjacencies). Hello messages are sent to the All Routers Multicast Group (224.0.0.2). Whenever a new router comes up, it sends out a hello packet to a specified, multicast address announcing itself to the network. Every router directly connected to the network receives the packet. Receipt of a hello packet from another LSR creates a hello adjacency with that LSR. Use this command to specify the interval after which the hello packets will be sent.
Used as a global command, the hello-interval value may be overridden by the hello-interval set on the interface (see
ldp hello-interval). For optimum performance, set this value to no more than one-third the value of the hold-time specified.
Use the no parameter to revert to default hello interval.
Command Syntax
hello-interval <1-21845>
no hello-interval
Parameters
<1-21845>
Specify the interval in seconds. The default is 5 seconds.
Default
By default, hello interval is 5 seconds
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
This example shows how to set the hello-interval value for all interfaces of an LSR.
#configure terminal
(config)#router ldp
(config-router)#hello-interval 35
(config-router)#no hello-interval
hold-time
Use this command to set the global value for the hold-time after which the LSR rejects adjacencies.
An LSR maintains a record of hellos received from peers. Hold-time specifies the time an LSR maintains its record of hellos from a peer on not receiving another hello from that peer. A pair of LSRs negotiates the hold-time they use for hellos from each other. Each proposes a hold time value, and the LSR uses the lower of the two hold-time values. The hold-time value set on the interface overrides the hold-time value set by this command (see ldp hold-time). For optimum performance, set this value to no less than three times the value of the hello-interval specified.
Use the no parameter to revert to the default hold time.
Command Syntax
hold-time <3-65535>
no hold-time
Parameters
<3-65535>
Specify the hold-time value in seconds.
Default
By default, hold time is 15 seconds
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the hold-time value for all interfaces of an LSR.
#configure terminal
(config)#router ldp
(config-router)#hold-time 635
(config-router)#no hold-time
import-bgp-routes
Use this command to import BGP routes into LDP. BGP routes are not imported into LDP by default.
Use the no parameter to flush out all BGP routes currently being used by LDP, and to reject any further BGP specific routing updates from OcNOS.
Command Syntax
import-bgp-routes
no import-bgp-routes
Parameters
None
Default
By default, import bgp route is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#import-bgp-routes
inter-area-lsp
Use this command to enable creation of inter-area LSPs.
Use the no form of the command to disable this configuration.
Command Syntax
inter-area-lsp (PREFIX_ACL|)(config-only|)
no inter-area-lsp
Parameters
PREFIX_ACL
Access-list name for Prefix Based inter-area lsp
config-only
Optional. When this option is used, existing LDP sessions are not torn down.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 4.0.
Example
#configure terminal
(config)#router ldp
(config-router)#inter-area-lsp
#configure terminal
(config)#router ldp
(config-router)#inter-area-lsp config-only
#configure terminal
(config)#router ldp
(config-router)#inter-area-lsp acl1
#configure terminal
(config)#router ldp
(config-router)#inter-area-lsp acl1 config-only
keepalive-interval
Use this command to set the global value for the interval after which keep-alive packets are sent out.
Each LSR must send keep-alive messages at regular intervals to its LDP peers to keep the sessions active. The keep-alive interval determines the time interval between successive keep-alive messages. Use this command to set this interval. This value is overridden by the keep-alive interval set on the interface. For optimum performance, set this value to no more than one-third the value of the specified keep-alive time-out value.
Use the no parameter to revert to default keep-alive interval.
Command Syntax
keepalive-interval <10-21845>
no keepalive-interval
Parameters
<10-21845>
Specify the value of interval in seconds.
Default
By default, keepalive interval is 10 seconds
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the keep-alive timer for all interfaces of an LSR.
#configure terminal
(config)#router ldp
(config-router)#keepalive-interval 635
(config-router)#no keepalive-interval
keepalive-timeout
Use this command to set the global value for the time-out after which sessions are rejected.
Use this command to set the time period for which an LSR must wait for successive keep-alive messages from LDP peers. The keep-alive time-out value is overridden by the keep-alive time-out set on the interface (see ldp keepalive-timeout). For optimum performance, set this value to no less than three times the value of the specified keep-alive interval value.
Use the no parameter to revert to default keep-alive time-out.
Command Syntax
keepalive-timeout <30-65535>
no keepalive-timeout
Parameters
<30-65535>
Specify the time-out value in seconds.
Default
By default, keepalive timeout is 30 seconds.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the keep-alive time-out value for all interfaces of an LSR.
#configure terminal
(config)#router ldp
(config-router)#keepalive-timeout 635
(config-router)#no keepalive-timeout
label-retention-mode
Use this command to set the retention mode to be used for all labels exchanged.
When an LSR receives a label binding for a particular FEC (Forwarding Equivalence Class) from another LSR that is not its next hop for that FEC, it might keep track of such bindings or discard them. Use the liberal parameter to retain all labels binding to FEC received from label distribution peers, even if the LSR is not the current next-hop. Use the conservative parameter to maintain only the label bindings for valid next-hops in a LSP. Liberal label retention mode allows for quicker adaptation to routing changes, whereas conservative label retention mode requires an LSR to maintain fewer labels.
Note: The retention mode value set on the interface (see
ldp label-retention-mode) overrides the value set by this command.
Note: Any changes made to the retention mode for an interface (after a session is already operational) will only apply to labels received after the mode has been changed. All previously received labels will remain as they were.
Use the no parameter to revert to default retention mode.
Note: label-retention-mode "liberal" is supported with advertisement mode "DU" only.
Note: label-retention-mode "liberal" is not supported with advertisement mode "DOD".
Note: When the advertisement mode is set as "DU", label-retention-mode automatically sets to "liberal".
Note: label-retention-mode "conservative" is supported with advertisement mode "DOD" only.
Note: label-retention-mode "conservative" is not supported with advertisement mode "DU".
Note: When the advertisement mode is set as "DOD", label-retention-mode automatically sets to "conservative".
Command Syntax
label-retention-mode (conservative|liberal)
no label-retention-mode (conservative|liberal)
Parameters
conservative
Specify to delete all unused labels and FECs.
liberal
Specify to retain all labels, regardless of use.
Default
By default, label retention mode is liberal
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the retention mode for all interfaces of an LSR.
#configure terminal
(config)#router ldp
(config-router)#label-retention-mode liberal
ldp advertisement-mode
Use this command to set the label advertisement mode for an interface for the current LSR to either downstream-on-demand (label is sent only when requested) or downstream-unsolicited (label is sent unrequested). Specifying downstream-on-demand and downstream-unsolicited mode affects which LSR initiates mapping requests and mapping advertisements.
This is an interface-specific command; it overrides the advertisement mode set for an LSR using the advertisement-mode command (see
advertisement-mode). Use this command after the advertisement-mode command sets all the interface advertisement modes. In addition, users should use this command before starting the interface, since all affected sessions will be closed and restarted.
Use the no parameter to revert to the advertisement mode value set for the main LDP process.
Command Syntax
ldp advertisement-mode (downstream-on-demand|downstream-unsolicited)
no ldp advertisement-mode (downstream-on-demand|downstream-unsolicited)
Parameters
downstream-on-demand
Indicates that the sent label was requested. When a user uses this parameter, a router distributes a label to a peer only if there is a pending label request from a peer. The reaction of the downstream router to this request depends on the label advertising mode supported on the next hop. The downstream-on-demand mode is typically used with the conservative label retention mode.
downstream-unsolicited
Indicates that the label was sent unrequested. This parameter distributes labels to peers without waiting for a label request. This mode is typically used with the liberal label retention mode.
Default
By default, ldp advertisement mode is downstream unsolicited mode
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#interface eth0
(config-if)#ldp advertisement-mode downstream-on-demand
ldp hello-interval
Use this command to set the interval for sending multicast Hello packets via an interface.
LDP defines a mechanism for discovering adjacent Label Switching Routers (LSR) that participate in label switching (adjacencies). Whenever a new router comes up, it sends out a hello packet to a specified, multicast address announcing itself to the network. Every router directly connected to the network receives the packet. Receipt of a hello packet from another LSR creates a hello adjacency with that LSR. Use this command to specify the interval after which the hello packets will be sent.
For optimum performance, set the hello-interval value to no more than one-third the hold-time value.
Note: This command is an interface-specific command and overrides the value set for an LSR using the global hello-interval command.
Use the no parameter with this command to revert to the hello-interval value set for the main LDP process.
Command Syntax
ldp hello-interval <1-21845>
no ldp hello-interval
Parameters
<1-21845>
Specify the interval in seconds.
Default
By default, ldp hello interval is 5 seconds
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
This example shows how to set the hello-interval for a specific interface.
#configure terminal
(config)#interface eth0
(config-if)#ldp hello-interval 635
(config-if)#no ldp hello-interval
ldp hold-time
Use this command to set the hold-time value after which the LSR rejects adjacencies.
The hold-time timer is reset every time a hello packet is received from the peer in question. For optimum performance, set this value to no less than three times the hello-interval value.
Note: This command is an interface-specific command, and overrides the value set for an LSR using the global hold-time command.
Use the no parameter to revert to the hold-time value set for the main LDP process.
Command Syntax
ldp hold-time <3-65535>
no ldp hold-time
Parameters
<3-65535>
Specify the hold-time value in seconds.
Default
By default, ldp hold time is 15 seconds
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the hold-time for a specific interface:
#configure terminal
(config)#interface eth0
(config-if)#ldp hold-time 635
(config-if)#no ldp hold-time
ldp keepalive-interval
Use this command to set the interval for sending keep-alive messages to the peer in order to maintain a session.
Each LSR must send keep-alive messages at regular intervals to its LDP peers to keep the sessions active. The keep-alive interval determines the time-interval between successive keep-alive messages. This command sets this interval.
Note: This command is an interface-specific command, and overrides the value set for an LSR using the global keepalive-interval command.
Use the no parameter to revert to the keep-alive interval set for the main LDP process.
Command Syntax
ldp keepalive-interval <1-21845>
no ldp keepalive-interval
Parameters
<1-21845>
Specify the interval in seconds.
Default
By default, ldp keepalive interval is 10 seconds
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
This example shows how to set the hello-interval for a specific interface:
#configure terminal
(config)#interface eth0
(config-if)#ldp keepalive-interval 635
(config-if)#no ldp keepalive-interval
ldp keepalive-timeout
Use this command to set the keep-alive time-out value for rejecting a session with a peer.
Use this command to set the time period for which an LSR must wait for successive keep-alive messages from LDP peers. The keep-alive timer is reset every time a keep-alive packet is received from the peer in question. For optimum performance, set this value to no more than three times the keep-alive interval value.
Note: This command is an interface-specific command and overrides the value set for an LSR using the global keepalive-timeout command.
Use the no parameter to revert to the keep-alive time-out set for the main LDP process.
Command Syntax
ldp keepalive-timeout <3-65535>
no ldp keepalive-timeout
Parameters
<3-65535>
Specify the value in seconds.
Default
By default, ldp keepalive timeout is 30 seconds
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the keep-alive time-out timer for a specific interface:
#configure terminal
(config)#interface eth0
(config-if)#ldp keepalive-timeout 635
(config-if)#no ldp keepalive-timeout
ldp label-retention-mode
Use this command to set the retention mode to be used for all labels exchanged via the given interface.
When an LSR receives a label binding for a particular FEC (Forwarding Equivalence Class) from another LSR that is not its next hop for that FEC, it might keep track of such bindings or discard them. Use the liberal parameter to retain all labels binding to FEC received from label distribution peers, even if the LSR is not the current next-hop. Use the conservative parameter to maintain only the label bindings for valid next-hops in a LSP. Liberal label retention mode allows for quicker adaptation to routing changes, whereas conservative label retention mode requires an LSR to maintain fewer labels.
Note: The retention mode value set on the interface (see
label-retention-mode) overrides the value set by this command. This command is an interface-specific command, and overrides the setting for an LSR using the global
label-retention-mode command.
Use the no parameter to revert to the retention mode set for the main LDP process.
Command Syntax
ldp label-retention-mode (conservative|liberal)
no ldp label-retention-mode (conservative|liberal)
Parameters
conservative
Specify to delete all unused labels and FECs.
liberal
Specify to retain all labels, regardless of use.
Default
By default, ldp label retention mode is liberal
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows how to set the label retention mode for a specific interface:
#configure terminal
(config)#interface eth0
(config-if)#ldp label-retention-mode liberal
ldp multicast-hellos
Use this command to enable multicast hello exchange on a specified interface.
Use the no parameter to disable multicast hello exchange. R
Command Syntax
ldp multicast-hellos
no ldp multicast-hellos
Parameters
None
Default
By default, ldp multicast hello is enabled
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#interface eth0
(config-if)#ldp multicast-hellos
ldp-optimization
This command helps optimize the resetting of an LDP session by enabling the following two scalability features for LDP:
• Resets the session keepalive timer on receipt of a hello message
• Resets the hold timer on receipt of any LDP control message
Use the no parameter to disable the two previously listed scalability features.
Command Syntax
ldp-optimization
no ldp-optimization
Parameters
None
Default
By default, ldp optimization is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#ldp-optimization
loop-detection
Use this command to enable loop detection on the current LSR. This command detects looping LSPs, and prevent Label Request messages from looping because of non-merge capable LSRs. This loop detection mechanism is useful for networks of non time-to-live (non TTL) decrementing devices that can not allocate resources among traffic flows.
There are two methods supported for the loop detection mechanism: A Hop Count detection system, that is always enabled; and the Path Vector detection system, that can be toggled:
• Hop Count - During the setup of an LSP, the LSP passes a hop count with the LSP setup messages. This hop count is incremented by each node router participating in LSP establishment. If the hop count exceeds the maximum configured value, the LSP setup process is stopped, and a notification message is passed back to the message originator.
• Path Vector - A path vector contains a list of LSR identifiers. This is passed as a part of LSP setup messages. Each LSR participating in the LSP establishment adds its own LSR identifier to the path vector. If an LSR finds its own identifier in the path vector, it drops the message, and sends a message back to the originator.
The use of these messages ensures that a loop is detected while establishing a label switched path and before any data is passed over that LSP.
Use the no parameter to disable loop detection.
Command Syntax
loop-detection
no loop-detection
Parameters
None
Default
By default, loop detection is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#loop-detection
loop-detection-hop-count
Use this command to set the loop detection hop count, which determines the maximum hop-count value.
This command sets the maximum hop count value, which specifies the permitted maximum permitted hop-count. An LSR that detects a maximum hop count behaves as if the containing message has traversed a loop. The use of this command ensures that a loop is detected while establishing a label switched path before any data is passed via LSP.
Use the no parameter to revert to the default loop detection count
Command Syntax
loop-detection-hop-count <1-255>
Parameters
<1-255>
Indicates the loop detection hop count.
Default
By default, loop detection hop is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ldp
(config-router)#loop-detection-hop-count 128
loop-detection-path-vec-count
Use this command to set the loop detection vec (vector) count, which determines the maximum supported path vectors.
This command sets the maximum supported path vectors for loop detection, which specifies the permitted path vector length. An LSR that detects a path vector has reached the maximum length behaves as if the containing message has traversed a loop. This command ensures that a loop is detected while establishing a label switched path before any data is passed over that LSP.
Use the no parameter to revert to the default loop detection count
Command Syntax
loop-detection-path-vec-count <1-255>
Parameters
<1-255>
Indicates the loop detection hop count.
Default
By default, loop detection path vec count is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#loop-detection-path-vec-count 123
mpls ldp-igp sync isis
Use this command to enable LDP ISIS synchronization and to set the holddown timer for synchronization.
Use the no parameter to disable the LDP ISIS synchronization.
Note: Holddown timer value should be higher than LDP IGP sync timer.
Command Syntax
mpls ldp-igp sync isis (level-1|level-2|level-1-2) (holddown-timer <1-2147483>| )
Parameters
level-1|level-2|level-1-2
The ISIS level.
holddown-timer
How long IGP should wait for LDP to converge in seconds.
Default
None
Command Mode
Interface configuration mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
#int eth 1
#mpls ldp-igp sync isis level-1-2 holddown-timer 500
mpls ldp-igp sync ospf
Use this command to enable LDP-OSPF synchronization. This command also provides option to configure the hold-down timer for which OSPF will wait for LDP to converge and advertises Max cost. When the configured time expires, OSPF starts advertising the actual cost in the Router-LSA.
Note: Holddown timer value should be higher than LDP IGP sync timer.
Command Syntax
mpls ldp-igp sync ospf (holddown-timer <1-2147483>|)
Parameters
holddown-timer
Set holddown timer for the OSPF Sync
<1-2147483>
Hold down timer in seconds
Default
OSPF waits infinite when no hold-down timer is configured.
Command Mode
Interface configuration mode
Applicability
This command was introduced before OcNOS version 4.0.
Example
Enabling OSPF-LDP sync in interface eth3
#conf t
Enter configuration commands, one per line. End with CNTL/Z.
(config)#int eth3
(config-if)#mpls ldp-igp sync ospf
(config-if)#end
Enabling OSPF-LDP sync with holdown-timer enabled
#conf t
Enter configuration commands, one per line. End with CNTL/Z.
(config)#int eth3
(config-if)#mpls ldp-igp sync ospf holddown-timer 200
(config-if)#no mpls ldp-igp sync ospf
(config-if)#end
#
mpls ldp-igp sync-delay
Use this command to set the time delay for LDP-IGP synchronization.
Use the no parameter to disable the time delay.
Command Syntax
mpls ldp-igp sync-delay <5-60>
no mpls ldp-igp sync-delay
Parameters
sync-delay
Time delay for LDP to converge in seconds.
<5-60>
Time delay for notification of LDP convergence to IGP, in seconds
Default
If not configured the delay will be 0 seconds.
Command Mode
Interface configuration mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config-if)# interface eth0
(config-if)# mpls ldp-igp sync-delay 15
(config-if)# no mpls ldp-igp sync-delay
multicast-hellos
Use this command to enable multicast hello exchange on all interfaces enabled for LDP. This is used for auto-discovery of LDP peers on directly connected networks. This option is enabled by default.
Use the no parameter with this command to disable multicast hello exchange.
Command Syntax
multicast-hellos
no multicast-hellos
Parameters
None
Default
By default, multicast hello is enabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#multicast-hellos
neighbor
Use this command to configure neighbors of LDP.
Use the no parameter with this command to unconfigure the LDP neighbor.
Command Syntax
neighbor A.B.C.D auth AUTH-TYPE password (0|7) WORD
no neighbor A.B.C.D auth AUTH-TYPE password
Parameters
A.B.C.D
Neighbor address
auth AUTH-TYPE
Authentication Type md5
password
Set password to the neighbor
(0|7)
Password Type
WORD
Password
Default
By default, neighbor is disabled.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#neighbor 1.1.1.1 auth md5 password 0 myPass
(config-router)#no neighbor 1.1.1.1 auth md5 password
propagate-release
Use this command to propagate the release of labels to downstream routers.
Use the no parameter to prevent the propagate-release of labels.
Command Syntax
propagate-release
no propagate-release
Parameters
None
Default
By default, propagate release is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#propagate-release
pw-status-tlv
Use this command to enable the use of the PW Status TLV to signal the pseudowire status.
Use the no option with this command to disable the use of the PW Status TLV to signal the pseudowire status.
Command Syntax
pw-status-tlv
no pw-status-tlv
Parameters
None
Default
By default, pw status tlv is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#pw-status-tlv
request-labels-for
Use this command to request labels for the prefixes in the given IP prefix list. LDP request labels for the prefixes only if the valid and exact route is present for that prefix.
Use the no form of this command to disable multicast hello exchange.
Command Syntax
request-labels-for prefix-list-ipv4 NAME
no request-labels-for prefix-list-ipv4
Parameters
NAME
IPv4 prefix list name
Command Mode
LDP router mode
Applicability
This command was introduced in OcNOS version 3.0.
Examples
#configure terminal
(config)#router ldp
(config-router)#request-labels-for prefix-list-ipv4 myPrefixList
request-retry
Use this command to enable the retry of requests once a request for a label has been rejected for a valid reason. This command enables the LSR to send a maximum of five label requests if a label request is rejected by an LDP peer.
Use the no parameter to disable the retry of requests.
Command Syntax
request-retry
no request-retry
Parameters
None
Default
By default, request retry is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ldp
(config-router)#request-retry
request-retry-timeout
Use this command to set the interval between retries. Before this time is over, a request is re-sent to a peer. This command changes the interval between request messages that are resent to a peer to account for routing changes.
Use the no parameter to revert to the default request-retry time-out set.
Command Syntax
request-retry-timeout <1-65535>
no request-retry-timeout
Parameter
<1-65535>
Specify the interval between retries in seconds.
Default
By default, timeout is 5 seconds.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#request-retry-timeout 512
(config-router)#no request-retry-timeout
restart ldp graceful
Use this command to restart ldp gracefully.
Command Syntax
restart ldp graceful
Parameter
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 5.0.
Example
#restart ldp graceful
% Warning : LDP process will stop and needs to restart manually,
You may loose LDP configuration, if not saved
Proceed for graceful restart? (y/n):y
rlfa-ilm-optimization
Use this command to enable ILM optimization for rLFA. When ILM optimization is enabled, ILM delete and POP operations are delayed. ILM delete/POP configuration is delayed to make sure rLFA backup path is not removed immediately upon IGP network convergence.
Use the no parameter with this command to revert this configuration.
Command Syntax
rlfa-ilm-optimization
no rlfa-ilm-optimization
Parameter
None
Default
By default, ILM optimization is disabled.
Command Mode
Router(LDP) Config mode.
Applicability
This command was introduced before OcNOS version 6.2.0.
Example
(config)#router ldp
(config-router)# rlfa-ilm-optimization
router ldp
This command is used to enter the LDP specific command-line mode in which global attributes for the LDP process can be set. Without this command, the LSR does not perform any LDP operations, such as sending hello packets.
Use the no parameter with this command to disable this configuration.
Command Syntax
router ldp
no router ldp
Parameters
None
Default
By default, router ldp is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The following example shows the change in the prompt after using this router ldp command to enter router mode.
#configure router
(config)#router ldp
(config-router)#
router-id
Use this command to set the router-id to the supplied IP address; the router uses this address to generate the LDP-ID.
OcNOS has three methods to choose the router-id of LDP. The first priority router-id is the configured router-id in router mode (local configured router-id). The second priority router-id is the configured router-id in configure mode (global configured router-id). The lowest priority router-id is chosen by OcNOS among interfaces (global computed router-id).
Use the no parameter with this command to revert to using the first IP address configured on the box as the router-id for LDP-ID generation purposes.
Command Syntax
router-id A.B.C.D
no router-id A.B.C.D
no router-id
Parameter
A.B.C.D
Indicates the LDP router ID value.
Default
By default, router id is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure router
(config)#router ldp
(config-router)#router-id 123.123.123.8
snmp restart ldp
Use this command to restart SNMP in Label Distribution Protocol (LDP)
Command Syntax
snmp restart ldp
Parameters
None
Default
By default, snmp restart ldp is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#snmp restart ldp
targeted-peer ipv4
Use this command to enter a targeted IPv4 LDP peer mode.
A targeted session is an LDP session between non-directly connected LSRs. Set this command to send a targeted hello messages to specific IP addresses. This command is specific to a targeted IPv4 LDP peer.
Command Syntax
targeted-peer ipv4 A.B.C.D
no targeted-peer ipv4 A.B.C.D
Parameter
A.B.C.D
Specify the IPv4 address of the targeted peer.
Default
By default, targeted peer IPv4 is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ldp
(config-router)#targeted-peer ipv4 10.10.10.10
(config-router-targeted-peer)#
targeted-peer-hello-interval
Use this command to set the interval for sending unicast hello packets to targeted peers.
Use the no parameter with this command to revert to the default targeted-peer hello-interval value.
Command Syntax
targeted-peer-hello-interval <1-21845>
no targeted-peer-hello-interval
Parameter
<1-21845>
Specify the interval in seconds.
Default
By default, targeted peer hello interval is 15 seconds.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#targeted-peer-hello-interval 1
targeted-peer-hold-time
Use this command to set the time-out value that is the time that the router waits before rejecting an adjacency with targeted peers.
Use the no parameter to revert to the default targeted-peer hold-time value.
Command Syntax
targeted-peer-hold-time <3-65535>
no targeted-peer-hold-time
Parameter
<3-65535>
Specify the interval in seconds.
Default
By default, hold time is 45 seconds.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router ldp
(config-router)#targeted-peer-hold-time 555
(config-router)#no targeted-peer-hold-time
transport-address ipv4
Use this command to configure the IPv4 transport address for a label space.
The transport address is the address used for the TCP session over which LDP is running. Use this command to manually configure the transport address. Transport addresses may either be bound to a loopback interface, or to a physical interface that is bound to the label space in question. A transport address can also be manually configured using the CLI with the loopback address as the transport address.
Note: The CLI accepts only the loopback address to be configured as the transport address.
Use the no parameter to stop using the transport address as the IPv4 transport address. If the label space is not specified for either form of this command, a label space of zero is assumed.
Command Syntax
transport-address ipv4 A.B.C.D
transport-address ipv4 A.B.C.D 0
no transport-address ipv4 A.B.C.D
no transport-address ipv4 A.B.C.D 0
Parameters
A.B.C.D
Specify the IPv4 address to be used as the transport address. Only addresses bound to a loopback interface are valid for manual transport address configuration.
0
Platform-wide label space for which a transport address is being configured (Platformwide labels are used for all interfaces that can share the same labels)
Default
Transport addresses are chosen for label spaces. By default, the loopback address is selected as the transport address. If a loopback address is not configured, the label space value is examined. The IP address of the interface is bound to the same label space is chosen as the transport address.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure router
(config)#router ldp
(config-router)#transport-address ipv4 10.10.0.5 0