Configuring BGP4 graceful restart

The graceful restart (GR) feature can be configured on a routing device, providing it with the capability to inform its neighbors when it is performing a restart.

About this task

Note

Note

High availability (HA) requires GR to be enabled.

Procedure

  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 ip address remote-as command to add a neighbor.
    device(config-bgp-router)# neighbor 10.11.12.13 remote-as 2
  5. Enter the address-family ipv4 unicast command to enter IPv4 address-family configuration mode.
    device(config-bgp-router)# address-family ipv4 unicast
  6. Enter the graceful-restart command to enable the graceful restart feature.
    device(config-bgp-ipv4u)# graceful-restart
  7. Do any of the following:
    • Enter the graceful-restart command and use purge-time parameter to overwrite the default purge-time value.
      device(config-bgp-ipv4u)# graceful-restart purge-time 300
    • Enter the graceful-restart command and use restart-time parameter to overwrite the default restart-time advertised to graceful restart-capable neighbors.
      device(config-bgp-ipv4u)# graceful-restart restart-time 180
    • Enter the graceful-restart command and use stale-routes-time parameter to overwrite the default amount of time that a helper device will wait for an EOR message from a peer.
      device(config-bgp-ipv4u)# graceful-restart stale-routes-time 100

Example

The following example enables the GR feature.

device# configure terminal	
device(config)# router bgp
device(config-bgp-router)# local-as 1
device(config-bgp-router)# neighbor 10.11.12.13 remote-as 2
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# graceful-restart

Example

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

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 1
device(config-bgp-router)# neighbor 10.11.12.13 remote-as 2
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# graceful-restart purge-time 180

Example

The following example 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 1
device(config-bgp-router)# neighbor 10.11.12.13 remote-as 2
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# graceful-restart restart-time 180

Example

The following example 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 1
device(config-bgp-router)# neighbor 10.11.12.13 remote-as 2
device(config-bgp-router)# address-family ipv4 unicast
device(config-bgp-ipv4u)# graceful-restart stale-routes-time 100

What to do next

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