The graceful-restart command enables the GR function.
The undo graceful-restart command disables the GR function.
By default, OSPF GR is disabled.
graceful-restart [ period period | planned-only | partial ] *
undo graceful-restart [ period | planned-only | partial ] *
Parameter | Description | Value |
---|---|---|
period period |
Specifies the duration of GR. |
It is an integer ranging from 1s to 1800s. The default value is 120s. |
planned-only |
Indicates that the switch supports only the planned GR. By default, the switch supports both the planned GR and unplanned GR. |
- |
partial |
Indicates that the switch partially supports the GR. By default, the switch totally supports the GR. |
- |
Planned GR: indicates that a device manually restarts or performs a master/slave device switchover by using the command. Before the device restarts or performs a master/slave device switchover, Restarter will send a grace LSA.
Unplanned GR: indicates that a device restarts or performs a master/slave device switchover because of faults. A device directly performs a master/slave device switchover without sending a grace LSA, and then enters GR after the slave device goes Up. It is different from the planned GR.
Usage Scenario
The graceful-restart command enables OSPF GR to avoid the route flapping due to the traffic interruption or master/slave device switchover. After the graceful-restart command is run to enable GR for a switch, the Helper function is also enabled.
Prerequisites
Opaque LSAs provide a generic mechanism for OSPF extension:
Before configuring OSPF GR, you must enable opaque LSA capability running the opaque-capability enable command.
Configuration Impact
After an OSPF process is restarted using GR, the Restarter switch and the Helper switch reestablish the neighbor relationship, exchange routing information, synchronize the LSDB, and update the routing table and forwarding table. This implements OSPF fast convergence, prevents traffic interruption, and stabilizes the network topology.
Precautions
If there are special requirements on the GR Helper, run the graceful-restart helper-role command to configure the requirements.
You are advised not to enable OSPF GR if BFD is enabled for a stack of fixed switches. This is because the time taken for smooth data switching during a master/standby switchover in the stack may be longer than the BFD timeout interval, in which situation BFD sessions go Down and OSPF GR fails.