neighbor graceful-shutdown

Syntax

neighbor {<IP-ADDR> | <PEER-GROUP-NAME>} graceful-shutdown 
     [ local-preference <LOCAL-PREF> 
     | <CONFIG-DELAY> 
     | <CONFIG-DELAY> local-preference <LOCAL-PREF> ]

no neighbor {<IP-ADDR> | <PEER-GROUP-NAME>} graceful-shutdown 
     [ local-preference <LOCAL-PREF> 
     | <CONFIG-DELAY> 
     | <CONFIG-DELAY> local-preference <LOCAL-PREF> ]

Description

Configures the wait time before shutting down the BGP neighbor session, and can also configure the local preference value to be advertised before graceful shutdown.

The no form of this command sets the wait time to the default value of 180 seconds and the local-preference value to the default of 0.

Command context

config-bgp

Parameters

<IP-ADDR>

Specifies an IP address in IPv4 format (x.x.x.x), where x is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), where x is a hexadecimal number from 0 to F.

<PEER-GROUP-NAME>

Specifies a peer group.

local-preference<LOCAL-PREF>

Specifies the local preference value for exporting the iBGP routes during a graceful shutdown. The lower the value, the lower the local preference. A value of 0 indicates that the route is the least preferred. Range: 0 to 4294967295. Default: 0.

<CONFIG-DELAY>

Specifies the time to wait before shutting down the neighbor in seconds. Range: 10 to 1200. Default: 180.

Authority

Administrators or local user group members with execution rights for this command.

Usage

If the graceful shutdown timer has already started and the administrator configures a command that triggers a session restart, traffic loss can occur if the graceful shutdown delay is not sufficient for the BGP peers to converge to a new route.

NOTE:

On each Autonomous System Boundary Router (ASBR) supporting the graceful shutdown receiver procedure, an inbound BGP route policy must be applied on all EBGP sessions of the ASBR.

The policy must match the GSHUT community and lower the precedence of the route by changing the route attributes.

The Graceful-Shutdown feature does not work for reflected routes because the route reflector (RR) does not modify local-preference attribute. The routes, originated by the RR, carry the GSHUT local-preference value. As per the RFC 4456, when an RR reflects a route, it should not modify the following path attributes:
  • NEXT-HOP

  • AS-PATH

  • LOCAL-PREF

  • MED

Their modification could potentially result in routing loops. In this situation, apply on the RR an inbound BGP route policy, meeting the following conditions:
  • Match the graceful-shutdown community.

  • Set the local preference attributes of the paths tagged with the graceful-shutdown community to a lower value than other routes to the same destination.

Examples

Setting the wait time delay:
switch(config-bgp)# neighbor 1.1.1.1 graceful-shutdown 10
Setting the local-preference value:
switch(config-bgp)# neighbor 1.1.1.1 graceful-shutdown local-preference 100
Setting the wait time delay and local-preference value:
switch(config-bgp)# neighbor 1.1.1.1 graceful-shutdown 10 local-preference 100
Setting the wait time delay to the default of 180 seconds:
switch(config-bgp)# no neighbor 1.1.1.1 graceful-shutdown 10
Setting the local-preference value to default of 0:
switch(config-bgp)# no neighbor 1.1.1.1 graceful-shutdown local-preference 100
Setting the wait time delay and local-preference value to defaults:
switch(config-bgp)# no neighbor 1.1.1.1 graceful-shutdown 10 local-preference 100
Complete deletion:
switch(config-bgp)# no neighbor 1.1.1.1 graceful-shutdown