When an NSF-capable router begins a BGP session with a BGP peer, it sends an OPEN message to the peer. Included in the message
is a declaration that the NSF-capable or NSF-aware router has graceful restart capability. Graceful restart is the mechanism
by which BGP routing peers avoid a routing flap after a switchover. If the BGP peer has received this capability, it is aware
that the device sending the message is NSF-capable. Both the NSF-capable router and its BGP peer(s) (NSF-aware peers) need
to exchange the graceful restart capability in their OPEN messages, at the time of session establishment. If both peers do
not exchange the graceful restart capability, the session will not be graceful restart capable.
If the BGP session is lost during the RP switchover, the NSF-aware BGP peer marks all the routes associated with the NSF-capable
router as stale; however, it continues to use these routes to make forwarding decisions for a set period of time. This functionality
means that no packets are lost while the newly active RP is waiting for convergence of the routing information with the BGP
peers.
After an RP switchover occurs, the NSF-capable router reestablishes the session with the BGP peer. In establishing the new
session, it sends a new graceful restart message that identifies the NSF-capable router as having restarted.
At this point, the routing information is exchanged between the two BGP peers. Once this exchange is complete, the NSF-capable
device uses the routing information to update the RIB and the FIB with the new forwarding information. The NSF-aware device
uses the network information to remove stale routes from its BGP table. Following that, the BGP protocol is fully converged.
If a BGP peer does not support the graceful restart capability, it will ignore the graceful restart capability in an OPEN
message but will establish a BGP session with the NSF-capable device. This functionality will allow interoperability with
non-NSF-aware BGP peers (and without NSF functionality), but the BGP session with non-NSF-aware BGP peers will not be graceful
restart capable.