Enables the BGP graceful restart capability.
Disabled.
BGP address-family IPv4 unicast configuration mode
BGP address-family IPv6 unicast configuration mode
BGP address-family IPv4 unicast VRF configuration mode
BGP address-family IPv6 unicast VRF configuration mode
BGP address-family L2VPN EVPN configuration mode
Use this command under a BGP address-family configuration mode to enable or disable the graceful-restart capability for all BGP neighbors in the address family. When this command is enabled, graceful-restart capability is negotiated with neighbors in the BGP OPEN message when a session is established. If the neighbor advertises support for graceful restart, that function is activated for that neighbor session. Otherwise, graceful restart is not activated for that session, even though it is enabled locally. If the neighbor has not sent graceful-restart parameters, the restarting device will not wait for the neighbor to start route calculation, but graceful restart will be enabled.
If the graceful-restart capability is enabled after a BGP session has been established, the neighbor session must be cleared for graceful restart to take effect.
The purge-time parameter is applicable for both restarting and helper devices. The timer starts when a BGP connection is closed. The timer ends when an EOR is received from all nodes, downloaded into BGP and an EOR sent to all neighbors. The configured purge-time timer value is effective only on the configured node.
The restart-time parameter is applicable only for helper devices. The timer starts at the time the BGP connection is closed by the remote peer and ends when the Peer connection is established. The configured restart-time timer value is effective only on the peer node, and not in the configured node. During negotiation time, the timer value is exchanged.
The stale-routes-time parameter is applicable only for helper devices. The timer starts when the peer connection is established after the HA-failover. The timer ends at the time an EOR is received from the peer. The configured stale-time timer value is effective only on the configured node.
For non-default VRF instances, graceful restart timers are inherited from the default VRF. The purge-time, restart-time, and stale-routes-time parameters are not available in BGP address-family IPv4 unicast VRF configuration mode and BGP address-family IPv6 unicast VRF configuration mode.
Use the clear ip bgp neighbor command with the all parameter for the changes to the graceful-restart parameters to take effect immediately.
The no form of the command disables the BGP graceful-restart capability globally for all BGP neighbors in the address family.
The following example enables the BGP graceful restart capability.
device# configure terminal device(config)# router bgp device(config-bgp-router)# local-as 1 device(config-bgp-router)# neighbor 1.1.1.1 remote-as 2 device(config-bgp-router)# address-family ipv4 unicast device(config-bgp-ipv4u)# graceful-restart
The following example sets the purge time to 240 seconds.
device# configure terminal device(config)# router bgp device(config-bgp-router)# local-as 1 device(config-bgp-router)# neighbor 1.1.1.1 remote-as 2 device(config-bgp-router)# address-family ipv4 unicast device(config-bgp-ipv4u)# graceful-restart %Warning: Please clear the neighbor session for the parameter change to take effect! device(config-bgp-ipv4u)# graceful-restart purge-time 240
The following example sets the restart time to 60 seconds.
device# configure terminal device(config)# router bgp device(config-bgp-router)# local-as 1 device(config-bgp-router)# neighbor 1.1.1.1 remote-as 2 device(config-bgp-router)# address-family ipv4 unicast device(config-bgp-ipv4u)# graceful-restart %Warning: Please clear the neighbor session for the parameter change to take effect! device(config-bgp-ipv4u)# graceful-restart restart-time 60 %Warning: Please clear the neighbor session for the parameter change to take effect!
The following example sets the stale-routes time to 180 seconds.
device# configure terminal device(config)# router bgp device(config-bgp-router)# local-as 1 device(config-bgp-router)# neighbor 1000::1 remote-as 2 device(config-bgp-router)# address-family ipv6 unicast device(config-bgp-ipv6u)# neighbor 1000::1 activate device(config-bgp-ipv6u)# graceful-restart %Warning: Please clear the neighbor session for the parameter change to take effect! device(config-bgp-ipv6u)# graceful-restart stale-routes-time 180 %Warning: Please clear the neighbor session for the parameter change to take effect!
The following example enables the BGP graceful restart capability and sets the purge time to 220 seconds in L2VPN EVPN configuration mode.
device# configure terminal device(config)# router bgp device(config-bgp-router)# address-family l2vpn evpn device(config-bgp-evpn)# graceful-restart purge-time 220