Re-enabling BGP4 graceful restart in bgp global configuration mode

If you disable the BGP4 graceful restart (GR) feature on a routing device you can re-enable it, providing it with the capability to inform its neighbors and peers when it is performing a restart. BGP IPv4 GR can be re-enabled in BGP configuration mode.
  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the router bgp command to enable BGP routing.
    device(config)# router bgp
  3. Enter the local-as command to configure the autonomous system number (ASN) in which your device resides.
    device(config-bgp-router)# local-as 1000
  4. Enter the neighbor remote-as command to add a neighbor.
    device(config-bgp-router)# neighbor 10.10.10.1 remote-as 2
  5. Enter the graceful-restart command to re-enable the graceful restart feature.
    device(config-bgp-router)# graceful-restart
  6. Do any of the following:
    • Enter the graceful-restart command using the purge-time keyword to overwrite the default purge-time value.
      device(config-bgp-router)# graceful-restart purge-time 300
    • Enter the graceful-restart command using the restart-time keyword to overwrite the default restart-time advertised to graceful restart-capable neighbors.
      device(config-bgp-router)# graceful-restart restart-time 180
    • Enter the graceful-restart command using the stale-routes-time keyword to overwrite the default amount of time that a helper device will wait for an EOR message from a peer.
      device(config-bgp-router)# graceful-restart stale-routes-time 100

The following example re-enables the GR feature.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 1000
device(config-bgp-router)# neighbor 10.10.10.1 remote-as 2
device(config-bgp-router)# graceful-restart

The following example re-enables the GR feature and sets the purge time to 120 seconds, over-writing the default value.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 1000
device(config-bgp-router)# neighbor 10.10.10.1 remote-as 2
device(config-bgp-router)# graceful-restart purge-time 120

The following example re-enables the GR feature and sets the restart time to 180 seconds, over-writing the default value.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 1000
device(config-bgp-router)# neighbor 10.10.10.1 remote-as 2
device(config-bgp-router)# graceful-restart restart-time 180

The following example re-enables the GR feature and sets the stale-routes time to 100 seconds, over-writing the default value.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 1000
device(config-bgp-router)# neighbor 10.10.10.1 remote-as 2
device(config-bgp-router)# graceful-restart stale-routes-time 100

Use the clear ip bgp neighbor command with the all parameter for the changes to the GR parameters to take effect immediately.