OcNOS-SP : Layer 3 Guide : Border Gateway Protocol Command Reference : BGP Graceful Restart Commands
BGP Graceful Restart Commands
This chapter describes the BGP graceful restart commands.
bgp graceful-restart
Use this command to enable BGP graceful-restart capabilities. The restart-time parameter is used for setting the maximum time that a graceful-restart neighbor waits to come back up after a restart. This value is applied to all neighbors unless you explicitly override it by configuring the corresponding value on the neighbor. The stalepath-time parameter is used to set the maximum time to preserve stale paths from a gracefully restarted neighbor. All stalepaths, unless reinstated by the neighbor after a re-establishment, will be deleted at the expiration of this timer.
Use the no parameter with this command to restore the router to its default state.
Command Syntax
bgp graceful-restart
bgp graceful-restart graceful-reset
bgp graceful-restart restart-time <1-3600>
bgp graceful-restart stalepath-time <1-3600>
no bgp graceful-restart
no bgp graceful-restart graceful-reset
no bgp graceful-restart restart-time
no bgp graceful-restart stalepath-time
Parameters
graceful-reset
The BGP daemon is not restarted, so that any changes in network configurations that cause BGP reset do not affect packet forwarding.
restart-time
Maximum time needed for neighbors to restart. Default is 90 seconds.
<1-3600>
Delay value in seconds.
stalepath-time
Maximum time to retain stale paths from restarting neighbors. Default is 360 seconds.
<1-3600>
Delay value in seconds.
Default
By default, the maximum time for neighbors to restart is 90 seconds.
By default, the maximum time to retain stale paths from restarting neighbors is 360 seconds.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 10
(config-router)#bgp graceful-restart
 
#configure terminal
(config)#router bgp 10
(config-router)#no bgp graceful-restart
bgp g-shut
Use this command to gracefully shut down all BGP IPv4 sessions under this router. The BGP graceful shutdown feature reduces packet loss during maintenance activity.
Use the no parameter with this command to bring up all the sessions under this router after completion of maintenance activity using the bgp g-shut command.
Command Syntax
bgp g-shut
no bgp g-shut
Parameters
None
Default
By default, bgp g-shut is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 100
(config-router)#bgp g-shut
 
#configure terminal
(config)#router bgp 100
(config-router)#no bgp g-shut
bgp g-shut-capable
Use this command to enable the graceful shutdown capability at the router level and make available the graceful-shutdown related commands at the router and BGP neighbor levels.
Use the no parameter with this command to disable the graceful shutdown capability on a router.
Note: The graceful shutdown capability cannot be disabled on a router that is in a graceful shutdown state until it comes out this state--after the graceful shutdown has been initiated and the impacted BGP sessions are up again.
Command Syntax
bgp g-shut-capable
no bgp g-shut-capable
Parameters
None
Default
By default, the graceful shutdown capability is disabled at the router level
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 100
(config-router)#bgp g-shut-capable
 
#configure terminal
(config)#router bgp 100
(config-router)#no bgp g-shut-capable
bgp g-shut-local-preference
Use this command to sets the local preference of the router to use during graceful shutdown. The local preference value indicates the preferred path when there are multiple paths to the same destination in a single routing database. The path with a higher preference value is the preferred one. The preferred path is sent to all routers and access servers in the local autonomous system.
Use the no parameter with this command to revert to the default setting.
Command Syntax
bgp g-shut-local-preference <0-4294967295>
no bgp g-shut-local-preference
Parameters
<0-4294967295>
Local preference value
Default
By default, the local preference value is set to 0
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 100
(config-router)#bgp g-shut-local-preference 22
bgp update-delay
Use this command to set the update delay for a graceful-restart capable router. The update-delay value is the maximum time a graceful-restart capable router, which is restarting, will defer route-selection and advertisements to all its graceful-restart capable neighbors. This maximum time starts from the instance the first neighbor attains established state after restart. The restarting router prematurely terminates this timer when end-of-RIB markers are received from all its graceful-restart capable neighbors.
Use the no form of this command to set to the update delay to its default value.
Command Syntax
bgp update-delay <1-3600>
no bgp update-delay
no bgp update-delay <1-3600>
Parameters
<1-3600>
Delay interval in seconds
Default
By default, update-delay value is 120 seconds
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router bgp 10
(config-router)#bgp update-delay 345
neighbor capability graceful-restart
Use this command to advertise the graceful restart capability to its neighbor. This configuration indicates that the BGP speaker has the ability to preserve its forwarding state for the address family when BGP restarts.
You must first specify a neighbor’s remote-as identification number assigned by the neighbor router.
Note: The graceful restart capability is advertised only when the graceful restart capability has been enabled using the bgp graceful-restart command.
Use the no parameter with this command to not advertise the graceful restart capability to its neighbor.
Command Syntax
neighbor (A.B.C.D|X:X::X:X|WORD) capability graceful-restart
no neighbor (A.B.C.D|X:X::X:X|WORD) capability graceful-restart
Parameters
A.B.C.D
Address of the BGP neighbor in an IPv4 format
X:X::X:X
Address of the BGP neighbor in an IPv6 format
WORD
Name of a BGP peer group created with the neighbor WORD peer-group command. When you specify this parameter, the command applies to all peers in the group.
Default
By default, the graceful-restart is disabled
Command Mode
Address family mode - Applicable for ipv4, ipv6 and vpnv4
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 10
(config-router)#address-family ipv4 unicast
(config-router-af)#neighbor 10.10.10.50 capability graceful-restart
(config-router)#address-family vpnv4 unicast
(config-router-af)#neighbor 2.2.2.2 activate
(config-router-af)#neighbor 2.2.2.2 capability graceful-restart
(config-router-af)#neighbor 3.3.3.3 activate
(config-router-af)#neighbor 3.3.3.3 capability graceful-restart
(config-router-af)#exit-address-family
neighbor g-shut
Use this command to start a graceful shutdown for the BGP session of the specified BGP neighbor. The BGP session for this neighbor is shut down after the graceful shutdown timer expires.
If there is no alternate path available for traffic to flow prior the actual shutdown of the BGP session, this path is made available for 60 seconds or for configured time after which the path is no longer available and traffic is dropped.
Use the no parameter with this command to bring up the session again for the specified BGP neighbor whose BGP session had been shut down using the neighbor g-shut command.
Note: The graceful shutdown capability is not supported on iBGP sessions.
Command Syntax
neighbor (A.B.C.D|X:X::X:X|WORD) g-shut
no neighbor (A.B.C.D|X:X::X:X|WORD) g-shut
Parameters
A.B.C.D
Neighbor IPv4 address
X:X::X:X|
Neighbor IPv6 address
WORD
Neighbor tag
Default
By default, neighbor g-shut is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 100
(config-router)#neighbor 1.1.1.2 g-shut
 
#configure terminal
(config)#router bgp 100
(config-router)#no neighbor 1.1.1.2 g-shut
 
 
neighbor g-shut-timer
Use this command to configure the value of the graceful shutdown timer. After the timer expires, the BGP session initiated for graceful shutdown is shut down.
Use the no parameter with this command to revert to the default setting.
Command Syntax
neighbor (A.B.C.D|X:X::X:X|WORD) g-shut-timer <10-65535>
no neighbor (A.B.C.D|X:X::X:X|WORD) g-shut-timer <10-65535>
Parameters
A.B.C.D
Neighbor IPv4 address
X:X::X:X
Neighbor IPv6 address
WORD
Neighbor tag
<10-65535>
Graceful shutdown timer in seconds
Default
By default, the timer value is set to 60 seconds
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 100
(config-router)#neighbor 1.1.1.2 g-shut-timer 120
neighbor restart-time
Use this command to set a different restart-time than the global restart-time configured using the bgp graceful-restart command.
Use the no parameter with this command to restore the router to its default state.
Command Syntax
neighbor (A.B.C.D|X:X::X:X|WORD) restart-time <1-3600>
no neighbor (A.B.C.D|X:X::X:X|WORD) restart-time <1-3600>
Parameters
A.B.C.D
Address of the BGP neighbor in an IPv4 format
X:X::X:X
Address of the BGP neighbor in an IPv6 format
WORD
Name of a BGP peer group created with the neighbor WORD peer-group command. When you specify this parameter, the command applies to all peers in the group.
<1-3600>
The maximum time that a graceful-restart neighbor waits to come back up after a restart. Make sure that this value does not exceed the stalepath-time specified in router mode.
Default
By default, restart time is 90 seconds
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router bgp 10
(config-router)#neighbor 3.3.3.3 restart-time 45