The BGP Graceful Shutdown feature reduces or eliminates the loss of traffic along a link being shut down for maintenance. Routers always have a valid route available during the convergence process. This feature is used primarily for maintenance on a link between a Provider Edge (PE), PE-PE, PE- Route Reflector (RR), PE-Customer Edge (CE) and CE.
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see
Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
www.cisco.com/go/cfn. An account on Cisco.com is not required.
Information About BGP Graceful Shutdown
Purpose and Benefits of BGP Graceful Shutdown
There are times when planned maintenance operations cause routing changes in BGP. After the shutdown of eBGP and iBGP peering sessions between autonomous system border routers (ASBRs), BGP routers are temporarily unreachable during BGP convergence. The goal of gracefully shutting down one or more BGP sessions is to minimize traffic loss during the planned shutdown and subsequent reestablishment of the sessions.
The BGP Graceful Shutdown feature reduces or eliminates the loss of inbound or outbound traffic flows that were initially forwarded along the peering link that is being shut down for maintenance. This feature is primarily for PE-CE, PE-RR and PE-PE links. Lowering the local preference for paths received over the session being shutdown renders the affected paths less preferred by the BGP decision process, but still allows the paths to be used during the convergence while alternative paths are propagated to the affected routers. Therefore, routers always have a valid route available during the convergence process.
The feature also allows vendors to provide a graceful shutdown mechanism that does not require any router reconfiguration at maintenance time. The benefits of the BGP Graceful Shutdown feature are fewer lost packets and less time spent reconfiguring routers.
GSHUT Community
The GSHUT community is a well-known community used in conjunction with the BGP Graceful Shutdown feature. The GSHUT community attribute is applied to a neighbor specified by the
neighbor shutdown graceful command, thereby gracefully shutting down the link in an expected number of seconds. The GSHUT community is always sent by the GSHUT initiator.
The GSHUT community is specified in a community list, which is referenced by a route map and then used to make policy routing decisions.
The GSHUT community can also be used in the
show ip bgp community command to limit output to GSHUT routes.
Device(config-router)# neighbor 2001:db8:3::1 shutdown graceful 600 community 1200 local-preference 300
Configures the router to gracefully shut down the link to the specified peer in the specified number of seconds; advertises the route with the GSHUT (Graceful Shutdown) community; and advertises the route with another community or specifies a local preference value for the route, or both.
Make sure to specify an adequate amount of time for iBGP peers to converge and to choose an alternate path as the best path.
If the
graceful keyword is used in the
neighborshutdown command, at least one of the two attributes (a community or local preference) must be configured. You may configure both attributes.
If the
graceful keyword is used in the
neighborshutdown command, the route is advertised with the GSHUT community by default. You may also set one other community for policy routing purposes.
In this particular example, the route to the neighbor is configured to shut down in 600 seconds, is advertised with the GSHUT community and community 1200, and is configured with a local preference of 300.
The router receiving the advertisement looks at the community value(s) of the route and optionally uses the community value to apply routing policy. Filtering routes based on a community is done with the
ip community-list command and a route map.
During the graceful shutdown, the
neighborshutdown command is not nvgened. After the timer expires, SHUTDOWN is nvgened.
Step 6
end
Example:
Device(config-router)# end
Returns to EXEC mode.
Step 7
showipbgpcommunitygshut
Example:
Device# show ip bgp community gshut
(Optional) Displays information about the routes that are advertised with the well-known GSHUT community.
Filtering BGP Routes Based on the GSHUT Community
Perform this task on a BGP peer to the device where you enabled the BGP Graceful Shutdown feature.
Configures a route map to permit or deny routes for policy routing.
Step 9
match community {standard-list-number |
expanded-list-number |
community-list-name [exact]}
Example:
Device(config-route-map)# match community GSHUT
Configures that the routes that match ip community-list GSHUT will be policy routed.
Step 10
exit
Example:
Device(config-route-map)# exit
Exits route-map configuration mode.
Step 11
ip community-list{standard |
standardlist-name} {deny |
permit}
gshut
Example:
Device(config)# ip community-list standard GSHUT permit gshut
Configures a community list and permits or denies routes that have the GSHUT community to the community list.
If you specify other communities in the same statement, there is a logical AND operation and all communities in the statement must match the communities for the route in order for the statement to be processed.
Step 12
routerbgpautonomous-system-number
Example:
Device(config)# router bgp 2000
Configures a BGP routing process.
Step 13
neighboraddressroute-mapmap-namein
Example:
Device(config)# neighbor 2001:db8:4::1 route-map RM_GSHUT in
Applies the route map to incoming routes from the specified neighbor.
In this example, the route map named RM_GSHUT denies routes from the specified neighbor that have the GSHUT community.
Configuration Examples for BGP Graceful Shutdown
Example: Shutting Down a BGP Link Gracefully
Graceful Shutdown While Setting a Local-Preference
This example gracefully shuts down the link to the specified neighbor in 600 seconds, adds the GSHUT community to the route, and sets a local preference of 500 for the route.
Graceful Shutdown While Setting an Additional Community
This example gracefully shuts down the link to the specified neighbor in 600 seconds, and adds the GSHUT community and numbered community to the route.
Graceful Shutdown while Setting an Additional Community and Local-Preference
This example gracefully shuts down the link to the specified neighbor in 600 seconds, adds the GSHUT community and the numbered community to the route, and sets a local preference of 500 to the route.
Example: Filtering BGP Routes Based on the GSHUT Community
In additional to being able to gracefully shut down a BGP route, another use of the GSHUT community is to configure a community list to filter routes with this community from getting into the BGP routing table.
This example illustrates how to use a community list to filter incoming BGP routes based on the GSHUT community. In this example, a route map named RM_GSHUT denies routes based on a standard community list named GSHUT. The community list contains routes with the GSHUT community. The route map is then applied to incoming routes from the neighbor at 2001:db8:4::1.
router bgp 2000
neighbor 2001:db8:4::1 remote-as 1000
neighbor 2001:db8:4::1 activate
neighbor 2001:db8:4::1 send-community
exit
route-map RM_GSHUT deny 10
match community GSHUT
exit
ip community-list standard GSHUT permit gshut
router bgp 2000
neighbor 2001:db8:4::1 route-map RM_GSHUT in
Requirements for the Graceful Shutdown of BGP Sessions
Technical Assistance
Description
Link
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to
www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1 Feature Information for BGP
Graceful Shutdown
Feature Name
Releases
Feature
Information
BGP Graceful
Shutdown
Cisco IOS XE
Release 3.6S
Cisco IOS XE
Release 3.7S
The BGP
Graceful Shutdown feature reduces or eliminates the loss of traffic along a
link being shut down for maintenance. Routers always have a valid route
available during the convergence process.
In Cisco IOS
XE Release 3.7S, support was added for the Cisco ASR 903 router.
The following
commands were modified:
ip
community-list,
neighbor
shutdown,
show ip bgp
community, and
show ip bgp
vpnv4.
BGP GSHUT
Enhancement
Cisco IOS XE Release 3.11S
The BGP
Graceful Shutdown (GSHUT) Enhancement feature enables graceful shutdown of
either all neighbors or only virtual routing and forwarding (VRF) neighbors
across BGP sessions.
The following
command was introduced:
bgp graceful-shutdown all.