NSF/NSR Whitepapers
When preparing for Cisco exams, it is useful to study the white papers and config guides for topics on the blueprint. Sometimes “trivia” type of questions can come from these resources. For this reason, I’ve spent some time combing through the config guides for NSF and NSR. I’ve summarized my findings and tried to point out any important “trivia” knowledge that seemed worthy of noting.
LDP
NSF/GR
Cisco refers to the GR helper mode as “LDP GR,” and the ability to preform a switchover as “LDP NSF SSO.” For this reason there are two separate chapters: one for GR and one for NSF SSO.
A router in NSF SSO mode must also run in LDP GR mode. (Although LDP GR technically refers to “helper only” mode where the router cannot perform NSF SSO switchover). For this reason, to enable the feature for both “modes” you simply use mpls ldp graceful-restart. What controls SSO or GR mode appears to be whether redundancy mode sso is enabled.
For GR, the router simply holds stale label bindings and allows the neighbor to gracefully switchover to the standby RP. You enable mpls ldp graceful-restart globally. In GR mode, the router cannot locally preform an SSO switchover event.
For NSF SSO, the config guide makes a point to mention that you must enable NSF on the routing protocols. This isn’t really explained, but I believe the idea is that your LDP sessions run ontop of the IGP, so you must ensure that the IGP supports NSF too. For this reason, the overall steps to enable LDP NSF SSO are as follows:
Enable SSO
Enable CEF (automatically supported on most routers these days)
Enable NSF for the IGP
Enable MPLS LDP GR globally
Enable LDP on each interface
Because enabling LDP GR requires existing neighborships to restart, you should enable LDP GR globally before enabling LDP on an interface.
NSF SSO mode also has a checkpointing mechanism, where state information from the active RP is checkpointed to the backup RP. I usually think of this as an NSR feature instead of NSF, but it appears this is implemented in NSF as well.
A router in NSF SSO mode and a router in GR-only mode will both have output seen in show mpls ldp neighbor graceful-restart. For example:
The difference between a NSF SSO router and GR-only router can be seen with the command show mpls ldp checkpoint. A NSF SSO router will show a sync’ed checkpoint status:
A GR-only router will show that sync is disabled:
LDP NSR
Remeber that NSR is an “internal-only” mechanism that allows a router to switchover from the Active RP to the Standby RP with no “help” from its neighbor. For this reason, NSR is a little easier to configure and verify.
In NSR, all LDP messages are replicated by the active RP to the standby RP. The standby RP essentially runs in a “hot standby” state, where it receives all LDP messages but does not send messages to its neighbors.
There are three states LDP NSR operates in:
Initial State
The standby RP is ready to support NSR but it is not sync’ed to the active RP yet. This might be seen right when NSR is enabled or when the system/standby RP boots up.
Steady State
The active and standby LDP processes on the RPs are sync’ed. The standby RP is ready to take over.
Port Switchover
The standby RP has taken over as active.
To enable LDP NSR you simply use the following global command:
In the LDP NSR chapter, no mention is made about enabling NSR for IGPs prior to enabling NSR for LDP.
The show command show mpls ldp nsr verifies whether NSR is enabled.
References
OSPF
NSF/GR
The config guide for OSPF NSF makes a similar disctintion to LDP’s NSF SSO and GR modes. In OSPF, “restarting mode” is the name given to a router that can preform an RP switchover, and “helper mode” is the name given to an NSF-aware router that can help its neighbor rebuild its RIB.
OSPF is unique in that there are two NSF modes: cisco mode, and ietf mode. You can only enable one mode at a time. Neither modes are supported over sham-links. Cisco mode is not supported over virtual links, however the config guide seems to imply that ietf mode is supported over virtual links.
By default, a router supports helper mode for both cisco and ietf NSF modes. You cannot configure the router to be able to preform a switchover (”restarting mode”) in both cisco and ietf modes, however the router can be a helper for both modes at the same time (and it is by default).
If you want to disable helper mode, you can use the following command:
To enable “restarting mode,” you enable NSF for either ietf mode, or cisco mode:
While it’s not explicitly stated, you will need to enable SSO support on the router to be able to use NSF in “restarting mode.”
You can verify both the helper mode and restarting mode using the following show command:
OSPFv3 calls this same feature “graceful-restart.” Remember that the terms NSF and GR are generally interchangable. To enable the restart capability, you use the following command:
Graceful restart awareness (”helper mode”) is enabled by default as in OSFPv2. To disable it, use the following command:
You can verify OSPFv3 GR using its own show command:
There is also a feature called strict-lsa-checking which is available to be used on a helper router in ietf mode. The IETF specification states that if a helper router is currently “helping” a neighbor that is undergoing graceful restart, and the helper router sees that an LSA has been updated, it should completely exit the GR process. The idea behind this, is that the nature of OSPF requires the LSDB to always be synchronized. If an LSA is updated, the “helper” router should accept the updated LSA so that its LSDB is in sync. It should now break the GR process instead of holding onto stale information for its neighbor.
By default, strict LSA checking is disabled. To enable it you use the following command:
NSR
Enabling and understanding NSR for OSPF is more straightforward than NSF. As you’ve seen in LDP NSR, NSR is a self-contained restart mechanism that allows a router to preform an RP switchover with no “help” from its neighbor.
The only interesting point the config guide makes, is that NSR can significantly increase memory consumption. My guess is that this is not much of an issue on today’s hardware.
To enable NSR you simply use the following command:
Likewise to enable NSR for OSPFv3 you can use the same command. You also have the option of enabling or disabling NSR on a per-address family basis.
References
ISIS
You may think ISIS supports two NSF modes as OSPF does: cisco and ietf mode. This is true from a configuration standpoint, but cisco mode for ISIS is really an early implementation of NSR. For this reason, cisco mode NSF doesn’t quite count as NSF in my eyes.
It is not clear to me whether NSF ietf mode helper support is enabled by default as with OSPF and LDP. It seems that you may need to enable NSF for ietf mode if you want to have the router act as a GR helper. To enable NSF in ietf mode you simply use the following configuration:
To enable NSR on IOS-XE, you actually enable NSF for cisco mode. There is no “NSR” configuration.
On IOS-XR you can enable both NSF cisco and NSR, which likely do the same thing.
References
Last updated