Configuring OSPF Graceful Restart
E-series routers support OSPF graceful restart extensions as defined in RFC 3623 (Graceful OSPF Restart). Graceful restart enables a router to continue forwarding OSPF traffic based on routing information it receives prior to an unplanned restart, while the E-series router switches from the primary SRP to the secondary SRP module.
Graceful restart helps to avoid interruptions in traffic forwarding and network-wide route changes when a route processor restarts or switches over to a redundant route processor.
To accomplish OSPF graceful restart, communication must take place between the router that is restarting and its OSPF neighbors. These neighboring routers must cooperate with (or help) the restarting router by keeping it in the forwarding path while it is restarting.
The restarting router sends a grace LSA (a link-local LSA) to inform its neighbors that it is restarting. After receiving this grace LSA, the neighbors act as if the router still exists in the network topology and continue forwarding traffic through the restarting router (for the specified grace period as defined in the grace LSA). If the restarting router does not become fully adjacent with the helper router before the grace period expires, the helper abandons the helper role and determines its adjacency with the restarting router to be down. Also, based on your configuration, the helper can abandon a restart if it detects a topology change before the restart is complete.
After the router restarts, the restarting router purges the grace LSA from the OSPF domain.
To configure the router as a graceful restart helper, use the graceful restart helper commands. These commands include graceful-restart helper and graceful-restart helper-abort-topology-change.
To configure the router for a restart scenario, use the graceful restart commands. These commands include graceful-restart, graceful-restart notify-time, and graceful-restart restart-time.
NOTE: Graceful restart mode is supported only for OSPFv2 routers. OSPF graceful restart helper mode is supported for both OSPFv2 and OSPFv3 routers.
graceful-restart
host1(config-router)#graceful-restartUse the no version to disable OSPF graceful restart capability on the router. graceful-restart helper
- Use to configure the OSPFv2 or OSPFv3 router to function as an OSPF graceful restart helper router.
- Example
host1(config-router)#graceful-restart helperUse the no version to disable OSPF graceful restart helper mode capability on the router. graceful-restart helper-abort-topology-change
- Use to specify conditions under which the OSPFv2 or OSPFv3 router abandons its role as an OSPF graceful restart helper router.
- Use the any keyword to abandon the helper role when any LSA changes during the restart. Use the non-externals keyword to abandon the helper role only when any nonexternal LSA changes during the restart.
- Example
host1(config-router)#graceful-restart helper-abort-topology-change anyUse the no version to return the router to its default behavior of helping a restarting OSPF router during topology changes. graceful-restart notify-time
- Use to specify the time (in the range 13600 seconds) expected for the router to remove grace LSAs over all interfaces.
- The restarting router sends the sum of the restart duration and notify duration as the grace period to the helping neighbors in the grace LSA. Receiving a maximum-aged grace LSA is an indication to the helper that the restart has been successfully completed on the restarting router.
- If the grace period on the helper router expires before the receipt of max-aged grace LSAs, the helper router stops the restart process and does not respond to the restarting router. The helper router then originates its own LSAs with the real current state of the adjacency with the restarting router reflected in them.
- Example
host1(config-router)#graceful-restart notify-time 500Use the no version to return the notify duration to its default value, 15 seconds. graceful-restart restart-time
- Use to specify the time (in the range 13600 seconds) expected for the router to reacquire OSPF neighbors that were fully operational prior to the restart.
- When this timer expires, the restarting router exits the restart procedure, originates any LSAs that were suppressed during the restart, removes any self-originated LSAs that it received from helping neighbors, runs SPF, and updates any routes in the routing table.
- Example
host1(config-router)#graceful-restart restart-time 350Use the no version to return the restart duration to its default value, 180 seconds.