Supported Platforms
Example: Configuring SPF Algorithm Options for OSPF
This example shows how to configure the SPF algorithm options. The SPF options control the timers that dictate when the SPF algorithm runs.
Requirements
Before you begin:
- Configure the device interfaces. See the Junos® OS Network Interfaces.
- 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
OSPF uses the SPF algorithm to determine the route to reach each destination. All routing devices in an area run this algorithm in parallel, storing the results in their individual topology databases. Routing devices with interfaces to multiple areas run multiple copies of the algorithm. The SPF options control the timers used by the SPF algorithm.
Before you modify any of the default settings, you should have a good understanding of your network environment and requirements.
This example shows how to configure the options for running the SPF algorithm. You include the spf-options statement and the following options:
- delay—Configures the amount of time (in milliseconds) between the detection of a topology and when the SPF actually runs. When you modify the delay timer, consider your requirements for network reconvergence. For example, you want to specify a timer value that can help you identify abnormalities in the network, but allow a stable network to reconverge quickly. By default, the SPF algorithm runs 200 milliseconds after the detection of a topology. The range is from 50 through 8000 milliseconds.
- rapid-runs—Configures the maximum number of times that the SPF algorithm can run in succession before the hold-down timer begins. By default, the number of SPF calculations that can occur in succession is 3. The range is from 1 through 10. Each SPF algorithm is run after the configured SPF delay. When the maximum number of SPF calculations occurs, the hold-down timer begins. Any subsequent SPF calculation is not run until the hold-down timer expires.
- holddown—Configures the time to hold down, or wait, before running another SPF calculation after the SPF algorithm has run in succession the configured maximum number of times. By default, the hold down time is 5000 milliseconds. The range is from 2000 through 20,000 milliseconds. If the network stabilizes during the holddown period and the SPF algorithm does not need to run again, the system reverts to the configured values for the delay and rapid-runs statements.
Configuration
CLI Quick Configuration
To quickly configure the SPF options, copy the following commands and paste them into the CLI.
Step-by-Step Procedure
To configure the SPF options:
- Enter OSPF configuration mode.
Note: To specify OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.
[edit]user@host# edit protocols ospf - Configure the SPF delay time.[edit protocols ospf]user@host# set spf-options delay 210
- Configure the maximum number of times that the SPF algorithm
can run in succession.[edit protocols ospf]user@host# set spf-options rapid-runs 4
- Configure the SPF hold-down timer.[edit protocols ospf]user@host# set spf-options holddown 5050
- If you are done configuring the device, commit the configuration.[edit protocols ospf]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.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Confirm that the configuration is working properly.
Verifying SPF Options
Purpose
Verify that SPF is operating per your network requirements. Review the SPF delay field, the SPF holddown field, and the SPF rapid runs fields.
Action
From operational mode, enter the show ospf overview command for OSPFv2, and enter the show ospf3 overview command for OSPFv3.