After an LDP session is established, an LSR maintains the integrity of the session by sending keepalive messages. The keepalive timer for each peer session resets whenever it receives any LDP protocol message or a keepalive message on that session. When the keepalive timer expires, LDP concludes that the TCP connection is bad or the peer is dead and terminates the session.
device(config-router-mpls-ldp)# ka-interval 11 %Warn: Please clear LDP sessions for the new KA parameter value to take effect on existing sessions device(config-router-mpls-ldp)# ka-timeout 40 %Error: ka-interval needs to be unconfigured before ka-timeout is configured device(config-router-mpls-ldp)# no ka-interval %Warn: Please clear LDP sessions for the new KA parameter value to take effect on existing sessions device(config-router-mpls-ldp)# ka-timeout 40 %Warn: Please clear LDP sessions for the new KA parameter value to take effect on existing sessions
device# configure terminal
device(config)# router mpls
device(config-router-mpls)# ldp
device(config-router-mpls-ldp)# ka-timeout 180 %Warn: Please clear LDP sessions for the new KA parameter value to take effect on existing sessions
device(config-router-mpls-ldp)# ka-int-count 10 %Warn: Please clear LDP sessions for the new KA parameter value to take effect on existing sessions
device # show mpls ldp Label Distribution Protocol version 1 (deleting it will stop LDP) LSR ID: 10.122.122.122, using Loopback 1 Hello interval: Link 5 sec, Targeted 15 sec Hold time value sent in Hellos: Link 15 sec, Targeted 45 sec Keepalive interval: 18 sec, Hold time multiple: 10 intervals Keepalive timeout: 180 sec Load sharing: 8 Tunnel metric: 0 FEC used for auto discovered peers: current 129, configured 129 End of LIB: Disabled, Notification time: 60000 ms, tx label silence time: 1000 ms Rx label silence time: 1000 ms Graceful restart: disabled Reconnect time: 0 seconds, Max peer reconnect time: 120 seconds Recovery time: 0 seconds, Max peer recovery time: 120 seconds Forwarding state holding timer: not running Label Withdrawal delay: 60 seconds (Default)
The following example is the configuration of the previous steps.
device# configure terminal device(config)# router mpls device(config-router-mpls)# ldp device(config-router-mpls-ldp)# ka-timeout 180 device(config-router-mpls-ldp)# ka-int-count 10