Courseiva
OSPFInterface Config

ip ospf dead-interval [secs]

Sets the OSPF dead interval, which is the time a router waits to hear from a neighbor before declaring it down, used to tune OSPF convergence.

Definition: ip ospf dead-interval [secs] is a Cisco IOS interface config command. Sets the OSPF dead interval, which is the time a router waits to hear from a neighbor before declaring it down, used to tune OSPF convergence.

Overview

The `ip ospf dead-interval` command is used in OSPF (Open Shortest Path First) interface configuration mode to set the dead interval, which is the time a router waits to receive a Hello packet from a neighbor before declaring that neighbor as down. The dead interval is typically four times the Hello interval by default (e.g., 40 seconds for a 10-second Hello interval). This command allows network engineers to tune OSPF convergence speed by adjusting the dead interval.

A shorter dead interval speeds up failure detection but increases overhead due to more frequent Hello packets, while a longer interval reduces overhead but delays convergence. This command is particularly useful in environments where fast convergence is critical, such as in financial trading networks or VoIP deployments, where even a few seconds of downtime can be costly. It is also used in scenarios where link reliability is low, and a longer dead interval can prevent flapping.

The command is configured per interface, and the value must be consistent across all routers on the same segment to form OSPF adjacencies. If the dead interval is mismatched, OSPF neighbors will not form. The command is entered in interface configuration mode, and the change takes effect immediately, impacting the running configuration.

It is important to note that the dead interval can be set to a value less than the Hello interval, but this is not recommended as it can cause unnecessary neighbor flapping. The command is available in all IOS versions and is a fundamental tool for OSPF tuning. When troubleshooting OSPF neighbor issues, verifying the dead interval is a key step.

The command is also used in conjunction with `ip ospf hello-interval` to control OSPF timers. In summary, `ip ospf dead-interval` is a critical command for controlling OSPF convergence and should be used carefully to balance performance and stability.

Syntax·Interface Config
ip ospf dead-interval [secs]

When to Use This Command

  • Speeding up OSPF convergence on fast links by reducing the dead interval to 10 seconds.
  • Matching the dead interval to a neighbor's configured interval to avoid adjacency flapping.
  • Using a longer dead interval on unstable links to prevent unnecessary neighbor resets.
  • Setting the dead interval to 4 times the hello interval as per OSPF default behavior.

Parameters

ParameterSyntaxDescription
seconds<1-65535>Specifies the dead interval in seconds. Valid values range from 1 to 65535. The default is 40 seconds for broadcast networks (4 times the default Hello interval of 10 seconds). Common mistakes include setting the value too low, causing flapping, or setting it inconsistently across neighbors, which prevents adjacency formation.

Command Examples

Set dead interval to 40 seconds

ip ospf dead-interval 40
Router(config-if)# ip ospf dead-interval 40
Router(config-if)#

No output is shown upon successful configuration. The command sets the OSPF dead interval to 40 seconds on the interface.

Verify dead interval with show ip ospf interface

show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 1.1.1.1, Interface address 192.168.1.1
  Backup Designated router (ID) 2.2.2.2, Interface address 192.168.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1/1, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

The 'Timer intervals configured' line shows Hello 10, Dead 40. The Dead interval is 40 seconds, meaning the router will wait 40 seconds without receiving a hello from a neighbor before declaring it dead.

Understanding the Output

The primary command 'ip ospf dead-interval' does not produce output; it silently configures the interface. To verify, use 'show ip ospf interface'. In the output, look for 'Timer intervals configured' which lists Hello, Dead, Wait, and Retransmit intervals.

The Dead interval is the time in seconds the router waits for a hello from a neighbor before considering the neighbor down. A typical default is 40 seconds (4 times the hello interval of 10 seconds). If the dead interval is set too low, neighbors may flap; if too high, convergence is slow.

Ensure dead intervals match on both ends of a link to avoid adjacency issues.

Configuration Scenarios

Configure OSPF Dead Interval for Fast Convergence on a Point-to-Point Link

Two branch routers are connected via a high-speed point-to-point link. The network requires fast convergence to minimize downtime for critical applications. The default dead interval of 40 seconds is too slow; we need to reduce it to 10 seconds.

Topology

R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2

Steps

  1. 1.Step 1: Enter global configuration mode on R1: R1> enable, R1# configure terminal
  2. 2.Step 2: Enter interface configuration mode for GigabitEthernet0/0: R1(config)# interface GigabitEthernet0/0
  3. 3.Step 3: Set the OSPF dead interval to 10 seconds: R1(config-if)# ip ospf dead-interval 10
  4. 4.Step 4: Exit and repeat on R2: R2(config)# interface GigabitEthernet0/0, R2(config-if)# ip ospf dead-interval 10
  5. 5.Step 5: Verify the configuration: R1# show ip ospf interface GigabitEthernet0/0
Configuration
! R1 Configuration
interface GigabitEthernet0/0
 ip address 10.0.12.1 255.255.255.252
 ip ospf dead-interval 10
 ip ospf 1 area 0
!
! R2 Configuration
interface GigabitEthernet0/0
 ip address 10.0.12.2 255.255.255.252
 ip ospf dead-interval 10
 ip ospf 1 area 0
!

Verify: Use 'show ip ospf interface GigabitEthernet0/0' on both routers. Expected output includes 'Dead timer due in 00:00:10' and 'Neighbor Count is 1'. Also check 'show ip ospf neighbor' to confirm adjacency state is FULL.

Watch out: Ensure the dead interval is set identically on both ends; otherwise, OSPF neighbors will not form. Also, if you change the dead interval, consider adjusting the Hello interval proportionally (e.g., set Hello interval to 2.5 seconds if dead is 10) to maintain the default ratio of 4:1, though not mandatory.

Increase OSPF Dead Interval on an Unstable Link to Prevent Flapping

A router connects to a remote site over a satellite link that experiences intermittent packet loss. The default dead interval of 40 seconds is causing frequent neighbor flapping because Hello packets are occasionally lost. Increasing the dead interval to 120 seconds provides more tolerance.

Topology

R1(Gi0/0)---192.168.1.0/30---(Gi0/0)R2

Steps

  1. 1.Step 1: Enter global configuration mode on R1: R1> enable, R1# configure terminal
  2. 2.Step 2: Enter interface configuration mode: R1(config)# interface GigabitEthernet0/0
  3. 3.Step 3: Set the OSPF dead interval to 120 seconds: R1(config-if)# ip ospf dead-interval 120
  4. 4.Step 4: Optionally increase Hello interval to 30 seconds to maintain ratio: R1(config-if)# ip ospf hello-interval 30
  5. 5.Step 5: Repeat on R2 with identical values.
  6. 6.Step 6: Verify the configuration: R1# show ip ospf interface GigabitEthernet0/0
Configuration
! R1 Configuration
interface GigabitEthernet0/0
 ip address 192.168.1.1 255.255.255.252
 ip ospf dead-interval 120
 ip ospf hello-interval 30
 ip ospf 1 area 0
!
! R2 Configuration
interface GigabitEthernet0/0
 ip address 192.168.1.2 255.255.255.252
 ip ospf dead-interval 120
 ip ospf hello-interval 30
 ip ospf 1 area 0
!

Verify: Use 'show ip ospf interface GigabitEthernet0/0' to see 'Dead timer due in 00:02:00' and 'Hello due in 00:00:30'. Also monitor 'show ip ospf neighbor' to ensure the neighbor state remains FULL over time.

Watch out: Increasing the dead interval delays convergence. If the link goes down, it will take up to 120 seconds to detect the failure. Ensure this trade-off is acceptable. Also, the Hello interval must be consistent across neighbors; if you change it, both sides must match.

Troubleshooting with This Command

The `ip ospf dead-interval` command is primarily used for troubleshooting OSPF neighbor issues. When a router fails to form an adjacency, one of the first checks is the OSPF timers. Use `show ip ospf interface` to display the configured dead interval and the current dead timer countdown.

Healthy output shows a dead timer counting down from the configured value (e.g., 'Dead timer due in 00:00:35' for a 40-second interval). If the dead timer resets frequently without reaching zero, it indicates that Hello packets are being received correctly. However, if the dead timer expires (reaches zero), the neighbor is declared down.

Common symptoms include: 1) OSPF neighbors stuck in INIT or EXSTART state – often due to mismatched dead intervals. Use `show ip ospf interface` on both routers to compare the 'Dead' field. 2) Frequent neighbor flapping – check if the dead interval is too short for the link's reliability. 3) Slow convergence – if the dead interval is too long, detection of failures is delayed. To diagnose, follow this flow: Step 1: Check OSPF neighbor state with `show ip ospf neighbor`.

If neighbor is missing or down, proceed. Step 2: Verify interface OSPF configuration with `show ip ospf interface`. Look for 'Dead timer due in' – if it is 00:00:00, the timer expired.

Step 3: Compare the dead interval on both ends. If mismatched, correct it. Step 4: Check Hello interval as well, as it affects the dead interval ratio.

Step 5: Use debug commands like `debug ip ospf hello` to see if Hello packets are being sent and received. Correlate the debug output with the dead timer. For example, if you see 'Hello received' but the dead timer still expires, there may be a one-way communication issue.

Also, use `show ip ospf neighbor detail` to see the dead time remaining for each neighbor. In summary, the dead interval is a critical parameter for OSPF stability and convergence; troubleshooting it involves verifying consistency and appropriateness for the network environment.

CCNA Exam Tips

1.

CCNA exam tip: The dead interval must match on both OSPF neighbors; otherwise, they will not form an adjacency.

2.

CCNA exam tip: By default, dead interval is 4 times the hello interval (e.g., hello 10, dead 40).

3.

CCNA exam tip: You can set the dead interval independently of the hello interval, but best practice is to keep the 4:1 ratio.

4.

CCNA exam tip: On broadcast networks, the dead interval also affects the wait timer for DR/BDR election.

Common Mistakes

Mistake 1: Setting dead interval to a value lower than the hello interval, causing constant neighbor flapping.

Mistake 2: Forgetting to configure the same dead interval on both ends of a point-to-point link, preventing adjacency.

Mistake 3: Using 'ip ospf dead-interval' in global configuration mode instead of interface configuration mode.

ip ospf dead-interval [secs] vs ip ospf hello-interval [secs]

The ip ospf dead-interval and ip ospf hello-interval commands are often considered together because the dead interval defaults to 4 times the hello interval, but each can be independently configured to tune OSPF convergence and neighbor discovery.

Aspectip ospf dead-interval [secs]ip ospf hello-interval [secs]
Default Value40 seconds (broadcast)10 seconds (broadcast)
RelationshipDefaults to 4× hello-interval; can be set independentlyUsed as base for dead-interval default
Convergence ImpactDirectly sets time to declare neighbor downAffects frequency of hello packets; indirectly impacts dead detection
Matching RequirementMust match on neighboring routersMust match on neighboring routers

Use ip ospf dead-interval [secs] when you need to adjust the OSPF failure detection time independently of hello interval, such as for fast convergence on lossy links.

Use ip ospf hello-interval [secs] when you want to control the frequency of OSPF hello packets, typically to match neighbor settings or to reduce overhead on low-bandwidth links.

Platform Notes

In IOS-XE (e.g., Catalyst 9000 switches), the `ip ospf dead-interval` command syntax and behavior are identical to classic IOS. However, the output of `show ip ospf interface` may include additional fields like 'Wait timer' for DR/BDR election. In NX-OS (Cisco Nexus switches), the equivalent command is `ip ospf dead-interval` under interface configuration mode, but the default dead interval is 40 seconds on broadcast networks.

NX-OS also supports the `ip ospf hello-interval` command. There is no difference in syntax. For ASA firewalls, OSPF is supported in multiple context mode, and the command is `ospf dead-interval` under interface configuration mode (e.g., `ospf dead-interval 40`).

In IOS-XR, the command is `ospf dead-interval` under the OSPF process configuration, not interface mode. For example: `router ospf 1`, then `area 0`, then `interface GigabitEthernet0/0/0/0`, then `dead-interval 40`. The behavior is similar but the configuration hierarchy differs.

In older IOS versions (12.x), the command is the same as in 15.x and 16.x. There are no significant differences in syntax or output across these versions. Always verify the specific platform documentation, as some platforms may have additional parameters like 'minimal' for fast hello (BFD-like) but that is beyond the scope of this command.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions