LDP Graceful Restart
Label Distribution Protocol (LDP) Graceful Restart allows devices to preserve MPLS LDP LFIB entries in the forwarding plane during the loss of a TCP connection or the LDP agent restarts. The Graceful Restart helper negotiates on a per-session during session initialization, and if a peer fails, maintains the MPLS LDP LFIB entries providing the underlying IGP links to reach the peer remain active.
A Graceful Restart speaker maintains the MPLS LDP LFIB entries if the LDP agent unexpectedly restarts. Changing the Gracecul Restart role of a peer from disabled to helper or to speaker impacts traffic as the session must renegotiate the connection.
The peers advertise the LDP Graceful Restart capability through the LDP session initialization and creates an additional TLV called Fault Tolerant Session TLV and includes it in the LDP initialization message. The TLV contains the following :
- A set of flags as defined in Section 8.2 of RFC3479 and the Learn-From-Network flag must be set.
- A Fault Tolerant Reconnect timer
- A Fault Tolerant Recovery timer
When two peers exchange LDP initialization messages, the Graceful Restart considers the maximum time between those timers and the configured thresholds to initiate a restart.
LDP Graceful Restart Conditions
An LDP Graceful Restart may occur with the following conditions:
- The LDP Agent initializes and sets Graceful Restart as active locally. Any session established with active Graceful Restartalso becomes Graceful Restart active.
- Manually shutting down the LDP agent using the CLI command, shutdown does not trigger Graceful Restart.
- An expiring LDP adjacency hold timer, as in the case of not receiving Hello messages, triggers a Graceful Restart.
- An expiring LDP session keep alive timer, as in the case of not receiving session KeepAlive messages,triggers a Graceful Restart.
- If the LDP agent restarts after a non-graceful restart, such as receiving an agentLdpAgent terminate, a Graceful Restart triggers on the switch.
Configuring an LDP Graceful Restart Speaker
Enabling the speaker role also enables the helper role which preserves the entire MPLS LDP LFIB entries if the LDP agent restarts, and also acts as a helper to preserve the LFIB entries of peer with the restarted LDP agent.
Use the following commands to configure an LDP Graceful Restart Speaker role:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart speaker
Configuring Graceful Restart Speaker Parameters
The LDP Graceful Restart Speaker Configuration Mode configures additional parameters for a Speaker such as reconnection timers and length of time to preserve MPLS LDP LFIB entries when the local LDP agent restarts.
The timer reconnect parameter defines the time that a Helper preserves MPLS LDP LFIB entries when a particular session unexpectedly becomes unavailable. The Helper uses a default value of 90 seconds.
Use the following commands to configure a timer connect value of 500 seconds:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart speaker
switch(config-mpls-ldp-gr-speaker)# timer connect 500
The timer state-holding parameter defines the time for the LDP Restarting Speaker to preserve the MPLS LDP LFIB entries if its LDP agent restarts unexpectedly. The timer starts when the LDP Restarting Speaker recovers and becomes active again. The Fault Tolerant Session TLV uses the state holding time out value as the recovery timeout value during session reinitialization. By default, the state holding timeout uses 90 seconds.
Use the following commands to configure a timer state-holding value of 500 seconds:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart speaker
switch(config-mpls-ldp-gr-speaker)# timer state-holding 500
Configuring an LDP Graceful Restart Helper
Enabling the Helper role does not enable the Speaker role. If LDP agent restarts, the device cannot preserve the MPLS LDP LFIB entries, but can only preserve the LFIB entries for a peer with the restarted LDP agent.
Use the following commands to configure an LDP Graceful Restart Speaker role:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart helper
Configuring Graceful Restart Helper Parameters
The LDP Graceful Restart Helper Configuration Mode configures additional parameters for a Helper such as length of time to preserve and recover MPLS LDP LFIB entries.
The timer neighbor-liveness parameter defines the maximum time the Graceful Restart Helper preserves the MPLS LDP LFIB entries for a session unexpectedly disconnected. The Helper preserves the MPLS LDP LFIB entries for the lower Maximum Recovery timeout value and the received Recovery timeout value in seconds.
Use the following commands to configure a timer neighbor-liveness value of 500 seconds:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart helper
switch(config-mpls-ldp-gr-speaker)# timer neighbor-liveness 500
The timer recovery parameter defines the time for a Helper to preserve the MPLS LDP LFIB entries for a session once the session with restarting Speaker re-establishes on the switch. The Helper preserves the MPLS LDP LFIB entries for the lower Maximum Recovery timeout value and the received Recovery timeout value in seconds.
Use the following commands to configure a timer recovery value of 500 seconds:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart helper
switch(config-mpls-ldp-gr-helper)# timer recovery 500
The pseudowire parameter supports LDP-signaled pseudowires and preserves the bindings when the LDP session goes down for a peer.
Use the following commands to configure a pseudowire for a Helper:
switch(config)# mpls ldp
switch(config-mpls-ldp)# graceful-restart helper
switch(config-mpls-ldp-gr-helper)# pseudowire