# NSR

NSF/GR uses modifications to existing protocols (OSPF, ISIS, BGP and LDP) to allow a router to switchover from an active RP to a standby RP without disruption to the routing protocol adjacency. This adds quite a bit of complexity and each protocol handles GR slightly differently. Wouldn’t it be better if the router could internally sync it’s active RP and standby RP, so that when a switchover happens, the standby RP already knows the adjancy states, LSDBs, etc, and the neighbor does not need to “help” rebuild the RIB?



This is exactly what NSR enables. NSR stands for Non-stop routing and can be enabled and used on a router without any support or negotiation with its neighbors. NSR is transparent, because a neighbor will not know whether the router underwent a SSO event. It is a completely internal process on the router preforming switchover.



### ISIS NSR <a href="#id-849ae00e-453c-4e06-b678-0f968e369708" id="id-849ae00e-453c-4e06-b678-0f968e369708"></a>

We saw in the previous article that the **cisco** mode for **nsf** effectively enables NSR. On IOS-XE I believe this is still the only way to achieve NSR for ISIS. On IOS-XR you have the option of NSF modes plus NSR. My guess is that **cisco** mode and NSR effectively do the same thing.

```
csr1000v(config)#router isis
csr1000v(config-router)#nsf cisco

RP/0/0/CPU0:XRv(config-isis)#nsf ?
  cisco              Cisco Proprietary NSF restart
  ietf               IETF NSF restart
  interface-expires  # of times T1 can expire waiting for the restart ACK
  interface-timer    Timer used to wait for a restart ACK (seconds)
  lifetime           Maximum route lifetime following restart (seconds)
RP/0/0/CPU0:XRv(config-isis)#nsr ?
  <cr>
```



### OSPF NSR <a href="#c872922c-9e92-45d7-be9b-f7cdb053b307" id="c872922c-9e92-45d7-be9b-f7cdb053b307"></a>

NSR for OSPF is quite straightforward. Simply enable **nsr** under the ospf process.

```
csr1000v(config)#router ospf 1
csr1000v(config-router)#nsr

RP/0/0/CPU0:XRv(config)#router ospf 1
RP/0/0/CPU0:XRv(config-ospf)#nsr
```



### LDP NSR <a href="#id-49bdbf13-8079-48f5-8b2c-d3528ed240f6" id="id-49bdbf13-8079-48f5-8b2c-d3528ed240f6"></a>

Likewise NSR for LDP is simple. NSR for LDP syncs the LIB with the standby RP so that during a switchover event, all label bindings and LDP adjacencies are retained.

```
csr1000v(config)#mpls ldp nsr

RP/0/0/CPU0:XRv(config)#mpls ldp
RP/0/0/CPU0:XRv(config-ldp)#nsr
```



### BGP NSR <a href="#d9afea62-c07e-4e40-81f6-35ee5e4bb36b" id="d9afea62-c07e-4e40-81f6-35ee5e4bb36b"></a>

To enable NSR in XR you use the following command:

```
RP/0/0/CPU0:XRv(config)#router bgp 65000
RP/0/0/CPU0:XRv(config-bgp)#nsr
```



The command syntax for XE is slightly different:

```
csr1000v(config)#router bgp 65000
csr1000v(config-router)#bgp ha-mode sso
```



In both cases it appears that you are supposed to also enable GR, and the router will preform GR if the peer supports it. If not, the router can use NSR.



In IOS-XE you can also enable NSR or GR on a per-neighbor basis:

```
csr1000v(config-router)#neighbor 1.1.1.1 ha-mode ?
  graceful-restart  graceful-restart for this peer
  sso               stateful-switchover support for this peer
```



### Futher Reading <a href="#id-9923b38a-2df6-4906-b82b-0f4731715f41" id="id-9923b38a-2df6-4906-b82b-0f4731715f41"></a>

[https://www.cisco.com/c/en/us/td/docs/iosxr/ncs5500/routing/60x/b-ncs5500-routing-configuration-guide-60x/b-ncs5500-routing-configuration-guide-60x\_chapter\_00.html#id\_32096](https://www.cisco.com/c/en/us/td/docs/iosxr/ncs5500/routing/60x/b-ncs5500-routing-configuration-guide-60x/b-ncs5500-routing-configuration-guide-60x_chapter_00.html#id_32096)\


[https://www.cisco.com/c/en/us/td/docs/ios/12\_2sb/feature/guide/sbb\_bnsr.html](https://www.cisco.com/c/en/us/td/docs/ios/12_2sb/feature/guide/sbb_bnsr.html)
