BGP Advance Feature Non Stop Forwarding- NSF

 Today I am going to talk about the BGP protocol and the topic I choose is the BGP NSF. NSF stands for Non-Stop Forwarding in BGP protocol. The post is basically for the CCIE students who really want to understand the BGP NSF feature in details.

What NSF feature actually is ?
NSF is a feature that allows routers to keep on forwarding traffic (non stop forwarding) even in the event of a restart. This is done by separating the control and the data plane, having one process involved in building the routing table and another process in forwarding the packets.

How NSF feature supports in BGP ?
BGP support for NSF requires that neighbor routers are NSF-aware or NSF-capable. NSF awareness in BGP is also enabled by the graceful restart mechanism. A router that is NSF-aware functions like a router that is NSF-capable with one exception and that exception is an NSF-aware router is incapable of performing an SSO operation. 

Fig 1.1- BGP Protocol with NSF

However, a router that is NSF-aware is capable of maintaining a peering relationship with a NSF-capable neighbor during a NSF SSO operation, as well as holding routes for this neighbor during the SSO operation.

This feature takes advantage of CEF which updates the line cards with the information from FIB.

In order for NSF to work, routers must be NSF-capable or NSF-aware. A NSF-capable router is a router that can perform restarts without disrupting packet forwarding, while a NSF-aware router understands NSF-specific signaling from NSF-capable routers.

NSF requires these additional features because, while performing restart, a router will not be able to send Hellos to its peers. This normally should result in the neighbor relationship being dropped, routes being lost, packets being dropped.

Fig 1.2- BGP Non Stop Forwarding

Routers exchange NSF capabilities information with each other and when a NSF-capable router performs restart, its NSF-aware peers will change the default behavior in order to prevent breaking the neighbor relationship.

NSF-aware routers are also called NSF-helpers because they will help a router performing a NSF restart to re-sync with the network as soon as possible.

The BGP Nonstop Forwarding Awareness feature provides an NSF-aware router with the capability to detect a neighbor that is undergoing an SSO operation, maintain the peering session with this neighbor, retain known routes, and continue to forward packets for these routes. 

The deployment of BGP NSF awareness can minimize the affects of route-processor (RP) failure conditions and improve the overall network stability by reducing the amount of resources that are normally required for reestablishing peering with a failed router.

Configuring NSF Awareness timers in BGP

NDNA_router(config)# router bgp 101>>>>>> AS number
NDNA_router(config-router)# bgp graceful-restart 120 >>>>>> Restart-time
NDNA_router(config-router)# bgp graceful-restart 360 >>>>>> Stale-path time

Default restart-time : 120 sec
Default stale-path-time: 360 sec

This command is enabled per address-family. You can enable it for all address families with:

NDNA_router(config-router)# bgp graceful-restart all

To verify:

NDNA_router# show ip bgp neighbors

Show configurations