BGP graceful-restart is the mechanism that you are looking for.
Graceful-restart maintains forwarding for the routes that have been received from a BGP neighbor while the connection is being restarted. When the neighbor drops, the routes will be marked Stale (S) in the BGP table and will still be available for route selection.
There are two timers that are associated with graceful-restart:
- stalepath time - maximum amount of time to hold onto stale routes
- restart time - maximum amount of time to wait for neighbor to come back up
BGP graceful-restart capability is advertised in the BGP OPEN
message. This means that if you do decide to use it, you will have to restart the BGP connection for each neighbor before it will work.
Probably shouldn't use graceful-restart if you are also using BFD on the link as it can cause issues.
Configuration
For Brocade Vyatta Routers
set protocols bgp 65000 parameters graceful-restart [stalepath-time seconds]
For Brocade IOS Routers
To enable globally
router bgp
graceful-restart
To enable per-vrf
router bgp
address-family ipv4 unicast vrf test
graceful-restart
Bonus Round
Vyatta routers let you dynamically advertise new capabilities for BGP, this allows you to test options without risking the BGP session not coming up. The following needs to be configured:
set protocols bgp [ASN] [neighbor address] capability dynamic
You can then configure graceful-restart without resetting the BGP peering.