< Home

spf-schedule-interval

Function

The spf-schedule-interval command sets the interval for OSPF to calculate routes.

The undo spf-schedule-interval command restores the default setting.

By default, the intelligent timer is enabled. The interval for the SPF calculation is expressed in milliseconds. The maximum interval for the SPF calculation is 10000 ms, the initial interval is 500 ms, and the Holdtime interval is 1000 ms.

Format

spf-schedule-interval { interval1 | intelligent-timer max-interval start-interval hold-interval | millisecond interval2 }

undo spf-schedule-interval

Parameters

Parameter Description Value
interval1 Specifies the interval for OSPF to perform the SPF calculation, in second. The value is an integer ranging from 1 to 10, in seconds.
intelligent-timer Sets the interval for the SPF calculation of OSPF through an intelligent timer. -
max-interval Specifies the maximum interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 120000, in milliseconds.
start-interval Specifies the initial interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 60000, in milliseconds.
hold-interval Specifies the Holdtime interval for OSPF to perform the SPF calculation. The value is an integer ranging from 1 to 60000, in milliseconds.
millisecond interval2 Specifies the interval for OSPF to perform the SPF calculation, in millisecond. The value is an integer ranging from 1 to 10000, in milliseconds.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Based on the LSDB, the router that runs OSPF calculates the SPT with itself as the root based on the SPF arithmetic, and determines the next hop to the destination network according to the SPT. When the OSPF LSDB changes, the shortest path needs to be recalculated. Frequent network changes and continual calculation of the shortest path consume many system resources and affect the efficiency of the routers. You can configure an intelligent timer and set a proper interval for the SPF calculation to prevent excessive router memory and bandwidth resources from being consumed.

In a networking environment, in which the convergence time of routes is required to be shorter, you can set millisecond as the unit of interval to increase the frequency of calculating routes. Route convergence therefore speeds up. In other networking environments, the default value is recommended.

Configuration Impact

After this command is configured, the interval for the SPF calculation is as follows:

  1. The initial interval for the SPF calculation is specified by the parameter start-interval.
  2. The interval for the SPF calculation for the nth (n≥2) time is equal to hold-interval×2(n-2).
  3. When the interval specified by hold-interval×2(n-2) reaches the maximum interval specified by max-interval, OSPF performs the SPF calculation at the maximum interval for three consecutive times. Then, go back to Step 1, and OSPF performs the SPF calculation at the initial interval specified by start-interval.
  4. When the interval specified by hold-interval×2(n-2) reaches the maximum interval specified by max-interval, OSPF performs SPF calculation at the maximum interval until max-interval expires without flapping or the OSPF process is restarted.

Example

# Set the interval for OSPF to calculate routes to 6 seconds.

<sysname> system-view
[sysname] ospf 1
[sysname-ospf-1] spf-schedule-interval 6
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >