Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring Graceful Restart for OSPF

This example shows how to configure graceful restart specifically for OSPF.

Requirements

Before you begin:

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. To enable graceful restart specifically for OSPF, first you need to globally enable graceful restart for all routing protocols.

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.

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.4set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5set protocols ospf area 0.0.0.0 interface fe-1/1/1set protocols ospf area 0.0.0.0 interface fe-1/1/2set routing-options graceful-restartset 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:

  1. 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.4user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
  2. 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/1user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
  3. Configure graceful restart globally
    [edit]user@host#edit routing-options graceful-restart
  4. Configure OSPF graceful restart.
    [edit]user@host# edit protocols ospf graceful-restart
  5. (Optional) Configure the restart duration time.
    [edit protocols ospf graceful-restart]user@host# set restart-duration 190
  6. (Optional) Configure the notify duration time.
    [edit protocols ospf graceful-restart]user@host# set notify-duration 40
  7. 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 command and paste it into the CLI.

[edit] user@host# set protocols ospf graceful-restart disable

Step-by-Step Procedure

To disable graceful restart for OSPF:

  1. 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
  2. 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.

Published: 2013-08-15