OcNOS DC : Layer 3 Guide : Open Shortest Path First Command Reference : OSPFv2 Graceful Restart Commands
OSPFv2 Graceful Restart Commands
This chapter describes the OSPFv2 graceful restart commands.
action interface
Configure action for an interface whose cost has to be updated on neighbor going down.
Use the no parameter with this command to remove the configs.
Command Syntax
action interface IFNAME cost <1-65535>
Parameters
interface
Apply action on interface
IFNAME
Interface's name
cost
Interface cost
<1-65535>
cost
Command Mode
ospf interface event mode (config-ospf-if-event)
Default
None
Applicability
This command was introduced before OcNOS version 6.3.0.
Example
(config-ospf-if-event)#action interface eth1 cost 100
(config-ospf-if-event)#commit
(config-ospf-if-event)#no action interface eth1 cost
(config-ospf-if-event)#commit
capability restart
Use this command to enable OSPF graceful restart or restart signaling. If a router is not restart-enabled, it cannot enter graceful restart mode and act as a helper.
Use the no parameter with this command to disable the features.
Command Syntax
capability restart graceful
no capability restart graceful
Parameters
None
Default
By default, OSPF graceful restart or restart signaling is enabled.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router ospf 100
(config-router)#capability restart graceful
 
(config)#router ospf 100
(config-router)#no capability restart graceful
 
event nbr
Configure events with OSPF neighbor id to monitor the state of OSPF neighbor in order to trigger events on any of the down states.
Use the no parameter with this command to remove the configuration.
Command Syntax
event nbr A.B.C.D down
Parameters
nbr
Configure neighbor sub-event
A.B.C.D
Destination IPv4 address
down
Event type down
Default
None
Command Mode
ospf interface event mode (config-ospf-if-event)
Applicability
This command was introduced before OcNOS version 6.3.0.
Example
(config-ospf-if-event)#event nbr 10.1.1.1 down
(config-ospf-if-event)#commit
(config-ospf-if-event)#no event nbr 10.1.1.1 down
(config-ospf-if-event)#commit
 
if-event-track ospf event
Use this command to configure an interface-track event with a valid event name with either matching all events or matching any of the events configured.
Use the no parameter with this command to remove the configs.
Command Syntax
if-event-track ospf event NAME match < all | any >
Parameters
ospf
OSPF specific commands
event
Configure the event
NAME
Event Name
match
Match criteria
all
Match criteria all
any
Match criteria any
Default
None
Command Mode
Config Mode
Applicability
This command was introduced before OcNOS version 6.3.0.
Example
(config)#if-event-track ospf event test match all
(config-ospf-if-event)#commit
(config-ospf-if-event)#exit
(config)#no if-event-track ospf event test
(config)#commit
 
debug ip ospf graceful-restart
Use this command to specify debugging option for OSPF graceful restart.
Use the no parameter with this command to disable this function.
Command Syntax
debug ip ospf graceful-restart (detail|terse|)
no debug ip ospf graceful-restart (detail|terse|)
Parameters
detail
Debug OSPF graceful restart detail information
terse
Debug OSPF graceful restart summary information
Command Mode
Privileged Exec mode and Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#debug ip ospf graceful-restart detail
ospf restart grace-period
Use this command to set the grace period for restarting the router.
If graceful restart is enabled, NSM is notified about the grace period. If the OSPF daemon unexpectedly shuts down, NSM sends this value to the OSPF daemon when it comes up again which uses this value to end the graceful state.
Use the no parameter with this command to revert to the default.
Command Syntax
ospf restart grace-period <2-1800>
no ospf restart grace-period
Parameters
<2-1800>
Grace period in seconds.
Default
The default grace period for restarting the OSPF router is 120 seconds.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#ospf restart grace-period 250
ospf restart helper
Use this command to configure the helper behavior for graceful restart.
Use the no parameter with this command to revert to default.
Command Syntax
ospf restart helper max-grace-period <2-1800>
ospf restart helper never (router-id A.B.C.D|)
no ospf restart helper never
no ospf restart helper (never router-id (A.B.C.D | all) | max-grace-period|)
Parameters
max-grace-period
 
Help only if received grace-period is less than this value.
<2-1800>
Help only if received grace-period is less than this value.
router-id
Neighbor to never to act as helper.
A.B.C.D
Router ID of neighbor to never to act as helper.
never
Prevent the neighbor from entering helper mode.
all
All neighbors to never to act as helper.
Default
By default, router behave as helper. To disable it as helper, ospf restart helper never command should be configured. ospf restart helper max-grace-period – Max-grace-period to function as helper. If not configured, value will be the grace-period in restarting node.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#ospf restart helper never router-id 1.1.1.1
 
#configure terminal
(config)#no ospf restart helper never router-id all
restart ospf graceful
Use this command to restart OSPF gracefully.
After this command is executed, the router immediately shuts down. NSM is notified that OSPF has shut down gracefully. NSM preserves routes installed by OSPF until the grace period expires.
Command Syntax
restart ospf graceful (grace-period <1-1800>|)
Parameters
<1-1800>
Grace period in seconds.
Default
By default, restart ospf graceful is disabled. Default value of grace-period is 120 seconds.
Command Mode
Privileged Exec mode and Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#restart ospf graceful grace-period 200
 
#restart ospf graceful
% Warning : OSPF process will stop and needs to restart manually,
You may loose ospf configuration, if not saved
Proceed for graceful restart? (y/n):y