Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring OSPF Timers

This example shows how to configure the OSPF timers.

Requirements

Before you begin:

Overview

The default OSPF timer settings are optimal for most networks. However, depending on your network requirements, you might need to modify the timer settings. This example explains why you might need to modify the following timers:

  • Hello interval
  • Dead interval
  • LSA retransmission interval
  • Transit delay

Hello Interval and Dead Interval

The hello interval and the dead interval optimize convergence times by efficiently tracking neighbor status. By lowering the values of the hello interval and the dead interval, you can increase the convergence of OSPF routes if a path fails. These intervals must be the same on all routing devices on a shared network. Otherwise, OSPF cannot establish the appropriate adjacencies.

In the first example, you lower the hello interval to 2 seconds and the dead interval to 8 seconds on point-to-point OSPF interfaces fe-0/0/1 and fe-1/0/1 in area 0.0.0.0 by configuring the following settings:

  • hello-interval—Specifies the length of time, in seconds, before the routing device sends a hello packet out of an interface. By default, the routing device sends hello packets every 10 seconds. The range is from 1 through 255 seconds.
  • dead-interval—Specifies the length of time, in seconds, that the routing device waits before declaring that a neighboring routing device is unavailable. This is an interval during which the routing device receives no hello packets from the neighbor. By default, the routing device waits 40 seconds (four times the hello interval). The range is 1 through 65,535 seconds.

LSA Retransmission Interval

The link-state advertisement (LSA) retransmission interval optimizes the sending and receiving of LSA and acknowledgement packets. You must configure the LSA retransmission interval to be equal to or greater than 3 seconds to avoid triggering a retransmit trap because the Junos OS delays LSA acknowledgments by up to 2 seconds. If you have a virtual link, you might find increased performance by increasing the value of the LSA retransmission interval.

In the second example, you increase the LSA retransmission timer to 8 seconds on OSPF interface fe-0/0/1 in area 0.0.0.1 by configuring the following setting:

  • retransmit-interval—Specifies the length of time, in seconds, that the routing device waits to receive an LSA packet before retransmitting LSA to an interface’s neighbors. By default, the routing device retransmits LSAs to its neighbors every 5 seconds. The range is from 1 through 65,535 seconds.

Transit Delay

The transit delay sets the time the routing device uses to age a link-state update packet. If you have a slow link (for example, one with an average propagation delay of multiple seconds), you should increase the age of the packet by a similar amount. Doing this ensures that you do not receive a packet back that is younger than the original copy.

In the final example, you increase the transit delay to 2 seconds on OSPF interface fe-1/0/1 in area 0.0.0.1. By configuring the following setting, this causes the routing device to age the link-state update packet by 2 seconds:

  • transit-delay—Sets the estimated time required to transmit a link-state update on the interface. You should never have to modify the transit delay time. By default, the routing device ages the packet by 1 second. The range is from 1 through 65,535 seconds.

Configuration

Configuring the Hello Interval and the Dead Interval

CLI Quick Configuration

To quickly configure the hello and dead intervals, copy the following commands and paste them into the CLI.

[edit]set protocols ospf area 0.0.0.0 interface fe-0/0/1 hello-interval 2set protocols ospf area 0.0.0.0 interface fe-0/0/1 dead-interval 8set protocols ospf area 0.0.0.0 interface fe-1/0/1 hello-interval 2set protocols ospf area 0.0.0.0 interface fe-1/0/1 dead-interval 8

Step-by-Step Procedure

To configure the hello and dead intervals:

  1. Create an OSPF area.

    Note: To specify OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.

    [edit]user@host# edit protocols ospf area 0.0.0.0
  2. Specify the interfaces.
    [edit protocols ospf area 0.0.0.0]user@host# set interface fe-0/0/1user@host# set interface fe-1/0/1
  3. Configure the hello interval.
    [edit protocols ospf area 0.0.0.0 ]user@host# set interface fe-0/0/1 hello-interval 2user@host# set interface fe-1/0/1 hello-interval 2
  4. Configure the dead interval.
    [edit protocols ospf area 0.0.0.0 ]user@host# set interface fe-0/0/1 dead-interval 8user@host# set interface fe-1/0/1 dead-interval 8
  5. If you are done configuring the device, commit the configuration.
    [edit protocols ospf area 0.0.0.0 ]user@host# commit

    Note: Repeat this entire configuration on all routing devices in a shared network.

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 area 0.0.0.0 { interface fe-0/0/1.0 {hello-interval 2;dead-interval 8;}interface fe-1/0/1.0 {hello-interval 2;dead-interval 8;}}

To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.

Controlling the LSA Retransmission Interval

CLI Quick Configuration

To quickly configure the LSA retransmission interval, copy the following command and paste it into the CLI.

[edit]set protocols ospf area 0.0.0.1 interface fe-0/0/1 retransmit-interval 8

Step-by-Step Procedure

To configure the LSA retransmission interval:

  1. Create an OSPF area.

    Note: To specify OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.

    [edit]user@host# edit protocols ospf area 0.0.0.1
  2. Specify the interface.
    [edit protocols ospf area 0.0.0.1]user@host# set interface fe-0/0/1
  3. Configure the LSA retransmission interval.
    [edit protocols ospf area 0.0.0.1 ]user@host# set interface fe-0/0/1 retransmit-interval 8
  4. If you are done configuring the device, commit the configuration.
    [edit protocols ospf area 0.0.0.1]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 area 0.0.0.1 { interface fe-0/0/1.0 {retransmit-interval 8;}}

To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.

Specifying the Transit Delay

CLI Quick Configuration

To quickly configure the transit delay, copy the following command and paste it into the CLI.

[edit]set protocols ospf area 0.0.0.1 interface fe-1/0/1 transit-delay 2

Step-by-Step Procedure

To configure the transit delay:

  1. Create an OSPF area.

    Note: To specify OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.

    [edit]user@host# edit protocols ospf area 0.0.0.1
  2. Specify the interface.
    [edit protocols ospf area 0.0.0.1]user@host# set interface fe-1/0/1
  3. Configure the transit delay.
    [edit protocols ospf area 0.0.0.1 ]user@host# set interface fe-1/0/1 transit-delay 2
  4. If you are done configuring the device, commit the configuration.
    [edit protocols ospf area 0.0.0.1 ]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 area 0.0.0.1 { interface fe-1/0/1.0 {transit-delay 2;}}

To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.

Verification

Confirm that the configuration is working properly.

Verifying the Timer Configuration

Purpose

Verify that the interface for OSPF or OSPFv3 has been configured with the applicable timer values. Confirm that the Hello field, the Dead field, and the ReXmit field display the values that you configured.

Action

From operational mode, enter the show ospf interface detail for OSPFv2, and enter the show ospf3 interface detail command for OSPFv3.

Published: 2012-12-08