ON THIS PAGE
Configuring Graceful Restart for OSPF
Graceful Restart for OSPF Overview
Graceful restart allows a routing device undergoing a restart to inform its adjacent neighbors and peers of its condition. During a graceful restart, the restarting device and its neighbors continue forwarding packets without disrupting network performance. Because neighboring devices assist in the restart (these neighbors are called ), the restarting device can quickly resume full operation without recalculating algorithms.
On a broadcast link with a single neighbor, when the neighbor initiates an OSPFv3 graceful restart operation, the restart might be terminated at the point when the local routing device assumes the role of a helper. A change in the LSA is considered a topology change, which terminates the neighbor’s restart operation.
Graceful restart is disabled by default. You can either globally enable graceful restart for all routing protocols, or you can enable graceful restart specifically for OSPF.
This topic describes the following information:
Helper Mode for Graceful Restart
When a device enabled for OSPF graceful restart restarts, it retains routes learned before the restart in its forwarding table. The device does not allow new OSPF link-state advertisements (LSAs) to update the routing table. This device continues to forward traffic to other OSPF neighbors (or helper routers), and sends only a limited number of LSAs during the restart period. To reestablish OSPF adjacencies with neighbors, the restarting device must send a grace LSA to all neighbors. In response, the helper routers enter helper mode (the ability to assist a neighboring device attempting a graceful restart) and send an acknowledgment back to the restarting device. If there are no topology changes, the helper routers continue to advertise LSAs as if the restarting device had remained in continuous OSPF operation.
Helper mode is enabled by default when you start the routing platform, even if graceful restart is not enabled. You can disable helper mode specifically for OSPF.
When the restarting device receives replies from all the helper routers, the restarting device selects routes, updates the forwarding table, and discards the old routes. At this point, full OSPF adjacencies are reestablished and the restarting device receives and processes OSPF LSAs as usual. When the helper routers no longer receive grace LSAs from the restarting device or when the topology of the network changes, the helper routers also resume normal operation.
Beginning with Junos OS Release 11.4, you can configure restart signaling-based helper mode for OSPFv2 graceful restart configurations. The Junos OS implementation is based on RFC 4811, OSPF Out-of-Band Link State Database (LSDB) Resynchronization, RFC 4812, OSPF Restart Signaling, and RFC 4813, OSPF Link-Local Signaling. In restart signaling-based helper mode implementations, the restarting device informs its restart status to its neighbors only after the restart is complete. When the restart is complete, the restarting device sends hello messages to its helper routers with the restart signal (RS) bit set in the hello packet header. When a helper router receives a hello packet with the RS bit set in the header, the helper router returns a hello message to the restarting device. The reply hello message from the helper router contains the ResyncState flag and the ResyncTimeout timer that enable the restarting device to keep track of the helper routers that are syncing up with it. When all helpers complete the synchronization, the restarting device exits the restart mode.
Restart signaling-based graceful restart helper mode is not supported for OSPFv3 configurations.
Planned and Unplanned Graceful Restart
OSPF supports two types of graceful restart: planned and unplanned. During a planned restart, the restarting routing device informs the neighbors before restarting. The neighbors act as if the routing device is still within the network topology, and continue forwarding traffic to the restarting routing device. A grace period is set to specify when the neighbors should consider the restarting routing device as part of the topology. During an unplanned restart, the routing device restarts without warning.
Example: Configuring Graceful Restart for OSPF
This example shows how to configure graceful restart specifically for OSPF.
Requirements
Before you begin:
Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election.
Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
Graceful restart enables a routing device undergoing a restart
to inform its adjacent neighbors and peers of its condition. During
a graceful restart, the restarting routing device and its neighbors
continue forwarding packets without disrupting network performance.
By default, graceful restart is disabled. You can globally enable
graceful restart for all routing protocols by including the graceful-restart
statement at the [edit routing-options]
hierarchy level,
or you can enable graceful restart specifically for OSPF by including
the graceful-restart
statement at the [edit protocols
(ospf|ospf3)]
hierarchy level.
The first example shows how to enable graceful restart and configure the optional settings for the grace period interval. In this example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPF area 0.0.0.0, and you configure those interfaces for graceful restart. The grace period interval for OSPF graceful restart is determined as equal to or less than the sum of the notify-duration time interval and the restart-duration time interval. The grace period is the number of seconds that the routing device’s neighbors continue to advertise the routing device as fully adjacent, regardless of the connection state between the routing device and its neighbors.
The notify-duration
statement configures how long
(in seconds) the routing device notifies helper routers that it has
completed graceful restart by sending purged grace link-state advertisements
(LSAs) over all interfaces. By default, the routing device sends grace
LSAs for 30 seconds. The range is from 1 through 3600 seconds.
The restart-duration
statement configures the amount
of time the routing device waits (in seconds) to complete reacquisition
of OSPF neighbors from each area. By default, the routing device allows
180 seconds. The range is from 1 through 3600 seconds.
The second example shows how to disable graceful restart for
OSPF by including the disable
statement.
Topology
Configuration
Enabling Graceful Restart for OSPF
CLI Quick Configuration
To quickly enable graceful restart for OSPF, copy the following commands and paste them into the CLI.
[edit] set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4 set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5 set protocols ospf area 0.0.0.0 interface fe-1/1/1 set protocols ospf area 0.0.0.0 interface fe-1/1/2 set routing-options graceful-restart set protocols ospf graceful-restart restart-duration 190 set protocols ospf graceful-restart notify-duration 40
Step-by-Step Procedure
To enable graceful restart for OSPF:
Configure the interfaces.
Note:For OSPFv3, use IPv6 addresses.
[edit] user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4 user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
Configure OSPF on the interfaces.
Note:To specify OSPFv3, include the
ospf3
statement at the[edit protocols]
hierarchy level.[edit] user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/1 user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
Configure graceful restart globally
[edit] user@host#edit routing-options graceful-restart
Configure OSPF graceful restart.
[edit] user@host# edit protocols ospf graceful-restart
(Optional) Configure the restart duration time.
[edit protocols ospf graceful-restart] user@host# set restart-duration 190
(Optional) Configure the notify duration time.
[edit protocols ospf graceful-restart] user@host# set notify-duration 40
If you are done configuring the device, commit the configuration.
[edit protocols ospf graceful-restart] user@host# commit
Results
Confirm your configuration by entering the show
interfaces
and show protocols ospf
commands. If the
output does not display the intended configuration, repeat the instructions
in this example to correct the configuration.
user@host# show interfaces fe-1/1/1 { unit 0 { family inet { address 10.0.0.4/32; } } } fe-1/1/2 { unit 0 { family inet { address 10.0.0.5/32; } } } user@host# show protocols ospf graceful-restart { restart-duration 190; notify-duration 40; } area 0.0.0.0 { interface fe-1/1/1.0; interface fe-1/1/2.0; }
To confirm an OSPFv3 configuration, enter the show interfaces
and the show protocols ospf3
commands.
Disabling Graceful Restart for OSPF
CLI Quick Configuration
To quickly disable graceful restart for OSPF,
copy the following commands, paste them into a text file, remove any
line breaks, change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit] hierarchy level,
and then enter commit
from configuration mode.
[edit] user@host# set protocols ospf graceful-restart disable
Step-by-Step Procedure
To disable graceful restart for OSPF:
Disable graceful restart for the OSPF protocol only.
This command does not affect the global graceful restart configuration setting.
Note:To specify OSPFv3, include the
ospf3
statement at the[edit protocols]
hierarchy level.[edit] user@host# set protocols ospf graceful-restart disable
If you are done configuring the device, commit the configuration.
[edit] user@host# commit
Results
Confirm your configuration by entering the show
protocols ospf
command. If the output does not display the intended
configuration, repeat the instructions in this example to correct
the configuration.
user@host# show protocols ospf graceful-restart disable;
To confirm an OSPFv3 configuration, enter the show protocols
ospf3
command.
Verification
Confirm that the configuration is working properly.
Verifying the OSPF Graceful Restart Configuration
Purpose
Verify information about your OSPF graceful restart configuration.
Action
From operational mode, enter the show ospf overview
command for OSPFv2. Enter the show ospf3 overview
command
for OSPFv3.
Meaning
The Restart field displays the status of graceful restart as either enabled or disabled. The Restart duration field displays how much time the restarted routing device requires to complete reacquisition of OSPF neighbors. The Restart grace period field displays how much time the neighbors should consider the restarted routing device as part of the topology.
Verifying Graceful Restart Status
Purpose
Verify the status of graceful restart.
Action
From operational mode, enter the show route instance
detail
command.
Meaning
The Restart State field displays Pending if the restart has not been completed or Complete if the restart has finished. The Path selection timeout field indicates the amount of time remaining until graceful restart is declared complete. There is a more detailed Restart State field that displays a list of protocols that have or have not yet completed graceful restart for the specified routing table.
Example: Configuring the Helper Capability Mode for OSPFv2 Graceful Restart
This example shows how to disable and reenable the helper mode capability for OSPFv2 graceful restart.
Requirements
Before you begin:
Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election
Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
The OSPF graceful restart helper capability assists a neighboring routing device attempting a graceful restart. By default, the helper capability is globally enabled when you start the routing platform. This means that the helper capability is enabled when you start OSPF, even if graceful restart is not globally enabled or specifically enabled for OSPF. You can further modify your graceful restart configuration to disable the helper capability.
Beginning with Junos OS Release 11.4, you can configure restart signaling-based helper mode for OSPFv2 graceful restart configurations. Both the standard and restart signaling-based helper modes are enabled by default.
In the first example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPFv2 area 0.0.0.0, and you configure those interfaces for
graceful restart. You then disable the standard OSPFv2 graceful restart
helper capability by including the helper-disable standard
statement. This configuration is useful if you have an environment
that contains other vendor equipment that is configured for restart
signaling-based graceful restart.
The helper-disable
statement and the no-strict-lsa-checking
statement cannot be configured at the same time. If you attempt
to configure both statements at the same time, the routing device
displays a warning message when you enter the show protocols
ospf
command.
The second example shows how to reenable the standard OSPFv2 restart helper capability that you disabled in the first example.
Topology
Configuration
Disabling Helper Mode for OSPFv2
CLI Quick Configuration
To quickly enable graceful restart for OSPFv2 with helper mode disabled, copy the following commands and paste them into the CLI.
[edit] set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4 set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5 set protocols ospf area 0.0.0.0 interface fe-1/1/1 set protocols ospf area 0.0.0.0 interface fe-1/1/2 set protocols ospf graceful-restart helper-disable standard
Step-by-Step Procedure
To enable graceful restart for OSPFv2 with helper mode disabled:
Configure the interfaces.
[edit] user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4 user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
Configure OSPFv2 on the interfaces
[edit] user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/1 user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
Disable the OSPFv2 graceful restart helper capability. If you disable the OSPFv2 graceful restart helper capability, you cannot disable strict LSA checking.
[edit] user@host# set protocols ospf graceful-restart helper-disable standard
If you are done configuring the device, commit the configuration.
[edit] user@host# commit
Results
Confirm your configuration by entering the show
interfaces
and the show protocols ospf
commands.
If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
user@host# show interfaces fe-1/1/1 { unit 0 { family inet { address 10.0.0.4/32; } } } fe-1/1/2 { unit 0 { family inet { address 10.0.0.5/32; } } } user@host# show protocols ospf graceful-restart { helper-disable { standard; } } area 0.0.0.0 { interface fe-1/1/1.0; interface fe-1/1/2.0; }
Reenabling Helper Mode for OSPFv2
CLI Quick Configuration
To quickly reenable standard helper-mode for
OSPFv2, copy the following commands, paste them into a text file,
remove any line breaks, change any details necessary to match your
network configuration, copy and paste the commands into the CLI at
the [edit] hierarchy level, and then enter commit
from
configuration mode.
[edit] delete protocols ospf graceful-restart helper-disable standard
To reenable restart signaling-based helper mode, include
the restart-signaling
statement. To reenable both standard
and restart signaling-based helper mode, include the both
statement.
Step-by-Step Procedure
To reenable standard helper mode for OSPFv2:
Delete the standard helper-mode statement from the OSPFv2 configuration.
[edit] user@host# delete protocols ospf graceful-restart helper-disable standard
If you are done configuring the device, commit the configuration.
[edit] user@host# commit
Results
After you reenable standard helper mode, the show
protocols ospf
command no longer displays the graceful restart
configuration.
Verification
Confirm that the configuration is working properly.
Verifying the OSPFv2 Graceful Restart Configuration
Purpose
Verify information about your OSPFv2 graceful restart configuration. The Restart field displays the status of graceful restart as either enabled or disabled, the Graceful restart helper mode field displays the status of the standard helper mode capability as enabled or disabled, and the Restart-signaling helper mode field displays the status of the restart signaling-based helper mode as enabled or disabled. By default, both standard and restart signaling-based helper modes are enabled.
Action
From operational mode, enter the show ospf overview
command.
Verifying Graceful Restart Status
Purpose
Verify the status of graceful restart. The Restart State field displays Pending if the restart has not completed, or Complete if the restart has finished. The Path selection timeout field indicates the amount of time remaining until graceful restart is declared complete. There is a more detailed Restart State field that displays a list of protocols that have completed graceful restart or have not yet completed graceful restart for the specified routing table.
Action
From operational mode, enter the show route instance
detail
command.
Example: Configuring the Helper Capability Mode for OSPFv3 Graceful Restart
This example shows how to disable and reenable the helper mode capability for OSPFv3 graceful restart.
Requirements
Before you begin:
Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election
Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
The OSPF graceful restart helper capability assists a neighboring routing device attempting a graceful restart. By default, the helper capability is globally enabled when you start the routing platform. This means that the helper capability is enabled when you start OSPF, even if graceful restart is not globally enabled or specifically enabled for OSPF. You can further modify your graceful restart configuration to disable the helper capability.
In the first example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPFv3 area 0.0.0.0, and you configure those interfaces for
graceful restart. You then disable the OSPFv3 graceful restart helper
capability by including the helper-disable
statement.
The helper-disable
statement and the no-strict-lsa-checking
statement cannot be configured at the same time. If you attempt
to configure both statements at the same time, the routing device
displays a warning message when you enter the show protocols
ospf
command.
The second example shows how to reenable the OSPFv3 restart helper capability that you disabled in the first example.
Topology
Configuration
Disabling Helper Mode for OSPFv3
CLI Quick Configuration
To quickly enable graceful restart for OSPFv3 with helper mode disabled, copy the following commands and paste them into the CLI.
[edit] set interfaces fe-1/1/1 unit 0 family inet6 address 2001:0a00:0004:: set interfaces fe-1/1/2 unit 0 family inet6 address 2001:0a00:0005:: set protocols ospf3 area 0.0.0.0 interface fe-1/1/1 set protocols ospf3 area 0.0.0.0 interface fe-1/1/2 set protocols ospf3 graceful-restart helper-disable
Step-by-Step Procedure
To enable graceful restart for OSPFv3 with helper mode disabled:
Configure the interfaces.
[edit] user@host# set interfaces fe-1/1/1 unit 0 family inet6 address 2001:0a00:0004:: user@host# set interfaces fe-1/1/1 unit 0 family inet address 2001:0a00:0005::
Configure OSPFv3 on the interfaces
[edit] user@host# set protocols ospf3 area 0.0.0.0 interface fe-1/1/1 user@host# set protocols ospf3 area 0.0.0.0 interface fe-1/1/2
Disable the OSPFv3 graceful restart helper capability. If you disable the OSPFv3 graceful restart helper capability, you cannot disable strict LSA checking.
[edit] user@host# set protocols ospf3 graceful-restart helper-disable
If you are done configuring the device, commit the configuration.
[edit] user@host# commit
Results
Confirm your configuration by entering the show
interfaces
and the show protocols ospf3
commands.
If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
user@host# show interfaces fe-1/1/1 { unit 0 { family inet6 { address 2001:0a00:0004::/128; } } } fe-1/1/2 { unit 0 { family inet6 { address 2001:0a00:0005::/128; } } } user@host# show protocols ospf3 graceful-restart { helper-disable; } area 0.0.0.0 { interface fe-1/1/1.0; interface fe-1/1/2.0; }
Reenabling Helper Mode for OSPFv3
CLI Quick Configuration
To quickly reenable helper-mode for OSPFv3, copy the following command and paste it into the CLI.
[edit] delete protocols ospf3 graceful-restart helper-disable
Step-by-Step Procedure
To reenable helper mode for OSPFv3:
Delete the standard helper-mode statement from the OSPFv3 configuration.
[edit] user@host# delete protocols ospf3 graceful-restart helper-disable
If you are done configuring the device, commit the configuration.
[edit] user@host# commit
Results
After you reenable standard helper mode, the show
protocols ospfs
command no longer displays the graceful restart
configuration.
Verification
Confirm that the configuration is working properly.
Verifying the OSPFv3 Graceful Restart Configuration
Purpose
Verify information about your OSPFv3 graceful restart configuration. The Restart field displays the status of graceful restart as either enabled or disabled, and the Helper mode field displays the status of the helper mode capability as either enabled or disabled.
Action
From operational mode, enter the show ospf3 overview
command.
Verifying Graceful Restart Status
Purpose
Verify the status of graceful restart. The Restart State field displays Pending if the restart has not completed, or Complete if the restart has finished. The Path selection timeout field indicates the amount of time remaining until graceful restart is declared complete. There is a more detailed Restart State field that displays a list of protocols that have completed graceful restart or have not yet completed graceful restart for the specified routing table.
Action
From operational mode, enter the show route instance
detail
command.
Example: Disabling Strict LSA Checking for OSPF Graceful Restart
This example shows how to disable strict link-state advertisement (LSA) checking for OSPF graceful restart.
Requirements
Before you begin:
Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election
Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
You can disable strict LSA checking to prevent the termination of graceful restart by a helping router. You might configure this option for interoperability with other vendor devices. The OSPF graceful restart helper capability must be enabled if you disable strict LSA checking. By default, LSA checking is enabled.
In this example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPF area 0.0.0.0, and you configure those interfaces for
graceful restart. You then disable strict LSA checking by including
the no-strict-lsa-checking
statement.
The helper-disable
statement and the no-strict-lsa-checking
statement cannot be configured at the same time. If you attempt
to configure both statements at the same time, the routing device
displays a warning message when you enter the show protocols
ospf
command.
Topology
Configuration
Procedure
CLI Quick Configuration
To quickly enable graceful restart for OSPF with strict LSA checking disabled, copy the following commands and paste them into the CLI.
[edit] set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4 set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5 set protocols ospf area 0.0.0.0 interface fe-1/1/1 set protocols ospf area 0.0.0.0 interface fe-1/1/2 set protocols ospf graceful-restart no-strict-lsa-checking
Step-by-Step Procedure
To enable graceful restart for OSPF with strict LSA checking disabled:
Configure the interfaces.
Note:For OSPFv3, use IPv6 addresses.
[edit] user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4 user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
Configure OSPF on the interfaces
Note:To specify OSPFv3, include the
ospf3
statement at the[edit protocols]
hierarchy level.[edit] user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/1 user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
Disable strict LSA checking. If you disable the strict LSA checking, OSPF graceful restart helper capability must be enabled (which is the default behavior).
[edit] user@host# set protocols ospf graceful-restart no-strict-lsa-checking
If you are done configuring the device, commit the configuration.
[edit ] user@host# commit
Results
Confirm your configuration by entering the show
interfaces
and the show protocols ospf
commands.
If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
user@host# show interfaces fe-1/1/1 { unit 0 { family inet { address 10.0.0.4/32; } } } fe-1/1/2 { unit 0 { family inet { address 10.0.0.5/32; } } } user@host# show protocols ospf graceful-restart { no-strict-lsa-checking; } area 0.0.0.0 { interface fe-1/1/1.0; interface fe-1/1/2.0; }
To confirm your OSPFv3 configuration, enter the show interfaces
and the show protocols ospf3
commands.
Verification
Confirm that the configuration is working properly.
Verifying the OSPF Graceful Restart Configuration
Purpose
Verify information about your OSPF graceful restart configuration. The Restart field displays the status of graceful restart as either enabled or disabled.
Action
From operational mode, enter the show ospf overview
command for OSPFv2, and enter the show ospf3 overview
command for OSPFv3.
Verifying Graceful Restart Status
Purpose
Verify the status of graceful restart. The Restart State field displays Pending if the restart has not completed, or Complete if the restart has finished. The Path selection timeout field indicates the amount of time remaining until graceful restart is declared complete. There is a more detailed Restart State field that displays a list of protocols that have completed graceful restart or have not yet completed graceful restart for the specified routing table.
Action
From operational mode, enter the show route instance
detail
command.