ip ospf hello-interval [secs]
Configures the interval (in seconds) between OSPF Hello packets on an interface, used to adjust neighbor discovery and dead timer detection.
Definition: ip ospf hello-interval [secs] is a Cisco IOS interface config command. Configures the interval (in seconds) between OSPF Hello packets on an interface, used to adjust neighbor discovery and dead timer detection.
Overview
The `ip ospf hello-interval` command is a fundamental OSPF interface configuration command that sets the time interval between Hello packets sent by a router on a specific interface. Hello packets are used by OSPF to discover neighbors, maintain neighbor relationships, and act as a keepalive mechanism. The default hello interval is 10 seconds for broadcast and point-to-point networks, and 30 seconds for non-broadcast multi-access (NBMA) networks.
By adjusting this interval, network engineers can influence how quickly OSPF detects neighbor failures (via the dead interval, which is typically four times the hello interval) and how much control traffic is generated. This command is often used in conjunction with `ip ospf dead-interval` to tune OSPF convergence time. For example, on fast-failover links, reducing the hello interval to 1 second (and dead interval to 4 seconds) can achieve sub-second convergence.
Conversely, on low-bandwidth or high-latency links, increasing the hello interval reduces overhead. The command is applied in interface configuration mode and immediately affects the running configuration. It is important to note that the hello interval must match on both ends of a link for OSPF neighbors to form; otherwise, the routers will not become adjacent.
This command is typically used during initial OSPF deployment, when integrating new links, or when optimizing convergence. It fits into the broader workflow of OSPF configuration: after enabling OSPF on the interface with `ip ospf [process-id] area [area-id]`, you can fine-tune timers. Troubleshooting often involves verifying that hello intervals match using `show ip ospf interface`.
The command is available in all IOS versions and requires no special privilege level beyond interface configuration (global config mode). Changes take effect immediately and are saved to the running config. Understanding this command is critical for CCNA and CCNP candidates as it directly impacts OSPF neighbor state machine and network stability.
ip ospf hello-interval [secs]When to Use This Command
- Speed up OSPF convergence on a fast link by reducing the hello interval to 1 second.
- Match hello intervals on both sides of a link to ensure OSPF adjacency forms.
- Reduce OSPF overhead on a slow or congested WAN link by increasing the hello interval.
- Troubleshoot OSPF adjacency issues caused by mismatched hello intervals.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| seconds | <1-65535> | The time interval in seconds between Hello packets. Valid values range from 1 to 65535 seconds. Common values are 1 (for fast convergence), 10 (default for broadcast/point-to-point), and 30 (default for NBMA). A common mistake is setting the hello interval too low, which can cause excessive CPU usage and control traffic, or setting it too high, which delays neighbor detection and failure detection. The dead interval is automatically adjusted to four times this value unless explicitly set with `ip ospf dead-interval`. |
Command Examples
Set hello interval to 5 seconds on GigabitEthernet0/0
ip ospf hello-interval 5GigabitEthernet0/0 is up, line protocol is up
Internet address is 192.168.1.1/24
OSPF enabled on interface, area 0.0.0.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 5, Dead 20, Wait 20, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:03
Index 1/1, flood queue length 0
Next 0(0)/0(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 output shows OSPF interface details. The line 'Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5' confirms the hello interval is set to 5 seconds. The dead interval (20 seconds) is automatically 4x the hello interval. 'Hello due in 00:00:03' indicates the next Hello packet will be sent in 3 seconds.
Set hello interval to 10 seconds on Serial0/0/0
ip ospf hello-interval 10Serial0/0/0 is up, line protocol is up
Internet address is 10.0.0.1/30
OSPF enabled on interface, area 0.0.0.0
Process ID 1, Router ID 1.1.1.1, Network Type POINT-TO-POINT, Cost: 64
Transmit Delay is 1 sec, State POINT-TO-POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:07
Index 1/1, flood queue length 0
Next 0(0)/0(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
Suppress hello for 0 neighbor(s)On a point-to-point serial link, the hello interval is set to 10 seconds. The dead interval is 40 seconds (4x hello). The output shows the interface is in POINT-TO-POINT state with one adjacent neighbor. The 'Hello due in 00:00:07' shows the countdown to the next Hello.
Understanding the Output
The 'show ip ospf interface' command displays the configured hello interval in the line 'Timer intervals configured, Hello X, Dead Y'. The hello interval is the first number after 'Hello'. The dead interval is automatically set to 4 times the hello interval by default (unless manually changed).
A shorter hello interval (e.g., 1 second) allows faster detection of neighbor failures but increases OSPF traffic. A longer interval (e.g., 30 seconds) reduces overhead but slows convergence. The 'Hello due in' field shows the time remaining until the next Hello packet is sent.
If the hello interval is mismatched between neighbors, the adjacency will not form, and the 'Neighbor Count' will show 0. Always verify that the hello interval matches on both sides of a link.
Configuration Scenarios
Configure OSPF with Fast Hello on a Point-to-Point Link
Two branch routers are connected via a high-speed point-to-point link. The network requires sub-second OSPF convergence to minimize downtime for critical applications.
Topology
R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2Steps
- 1.Step 1: Enter global configuration mode on R1: configure terminal
- 2.Step 2: Enter interface configuration for GigabitEthernet0/0: interface GigabitEthernet0/0
- 3.Step 3: Set the OSPF hello interval to 1 second: ip ospf hello-interval 1
- 4.Step 4: (Optional) Set the dead interval to 4 seconds (default is 4x hello): ip ospf dead-interval 4
- 5.Step 5: Enable OSPF on the interface (if not already): ip ospf 1 area 0
- 6.Step 6: Repeat steps 1-5 on R2 with identical timer values.
- 7.Step 7: Verify the configuration: show ip ospf interface GigabitEthernet0/0
! R1 configuration interface GigabitEthernet0/0 ip address 10.0.12.1 255.255.255.252 ip ospf hello-interval 1 ip ospf dead-interval 4 ip ospf 1 area 0 ! ! R2 configuration interface GigabitEthernet0/0 ip address 10.0.12.2 255.255.255.252 ip ospf hello-interval 1 ip ospf dead-interval 4 ip ospf 1 area 0
Verify: Use 'show ip ospf interface GigabitEthernet0/0' on either router. Expected output includes: 'Hello due in 0:00:00', 'Timer intervals configured, Hello 1, Dead 4', and the neighbor state should be FULL/DR (or FULL/ - for point-to-point).
Watch out: Both routers must have identical hello intervals; otherwise, the neighbor relationship will not form. Also, if the dead interval is not explicitly set, it will be automatically set to 4 seconds (4x hello). Ensure the dead interval matches as well.
Increase Hello Interval on a Low-Bandwidth NBMA Link
A remote office connects via a Frame Relay link (NBMA) with limited bandwidth. The default 30-second hello interval is acceptable, but to reduce control traffic, the engineer decides to increase the hello interval to 60 seconds.
Topology
R1(Serial0/0)---Frame Relay---(Serial0/0)R2Steps
- 1.Step 1: Enter global configuration mode on R1: configure terminal
- 2.Step 2: Enter interface configuration for Serial0/0: interface Serial0/0
- 3.Step 3: Set the OSPF hello interval to 60 seconds: ip ospf hello-interval 60
- 4.Step 4: (Optional) Set the dead interval to 240 seconds: ip ospf dead-interval 240
- 5.Step 5: Ensure OSPF network type is NBMA or point-to-multipoint: ip ospf network non-broadcast
- 6.Step 6: Repeat on R2 with identical timer values.
- 7.Step 7: Verify: show ip ospf interface Serial0/0
! R1 configuration interface Serial0/0 ip address 172.16.0.1 255.255.255.0 encapsulation frame-relay ip ospf network non-broadcast ip ospf hello-interval 60 ip ospf dead-interval 240 ip ospf 1 area 0 ! ! R2 configuration interface Serial0/0 ip address 172.16.0.2 255.255.255.0 encapsulation frame-relay ip ospf network non-broadcast ip ospf hello-interval 60 ip ospf dead-interval 240 ip ospf 1 area 0
Verify: Use 'show ip ospf interface Serial0/0'. Look for 'Hello due in 0:00:XX' where XX is near 60 seconds, and 'Timer intervals configured, Hello 60, Dead 240'. Neighbor state should be FULL/DR or FULL/BDR depending on the NBMA configuration.
Watch out: On NBMA networks, the default hello interval is 30 seconds. If you change the hello interval, you must also adjust the dead interval accordingly (typically 4x). Additionally, ensure the OSPF network type is set correctly; otherwise, the router may use broadcast defaults and mismatched timers.
Troubleshooting with This Command
When troubleshooting OSPF neighbor issues, the `ip ospf hello-interval` command is often a suspect. A common symptom is that OSPF neighbors are stuck in INIT or EXSTART state, or they never form. The first step is to verify the hello interval on the interface using `show ip ospf interface [interface]`.
Look for the line 'Timer intervals configured, Hello X, Dead Y'. If the hello interval does not match between neighbors, the routers will not become adjacent. For example, if one router has Hello 10 and the other has Hello 20, they will see each other's Hello packets but will not match the timer, causing the neighbor state to remain in INIT.
Another symptom is frequent neighbor flapping: if the hello interval is too short (e.g., 1 second) and the dead interval is not adjusted, the router may not receive three consecutive Hellos within the dead interval due to transient network issues, causing the neighbor to be declared dead. Conversely, if the hello interval is too long, failure detection is delayed. To diagnose, use `debug ip ospf hello` to see Hello packet details, including the hello interval field.
The debug output shows 'Hello interval: X, Dead interval: Y' for received packets. If these do not match the local configuration, the router will log a mismatch. Another useful command is `show ip ospf neighbor [neighbor-id]`, which shows the state and dead time.
If the dead time is counting down but never resets, it indicates that Hellos are not being received. Also, check the OSPF process configuration with `show ip ospf` to see if the router is configured as a DR/BDR, which may affect timer expectations. In multi-access networks, the hello interval must match on all routers in the same subnet.
A step-by-step diagnostic flow: 1) Verify interface is up/up and has an IP address. 2) Check OSPF is enabled on the interface (`show ip ospf interface`). 3) Verify hello and dead intervals match on both ends. 4) Check for ACLs that might block OSPF multicast (224.0.0.5). 5) Use `debug ip ospf adj` to see adjacency events. Correlating `show ip ospf interface` with `show ip ospf neighbor` helps pinpoint timer mismatches. Remember that changing the hello interval automatically adjusts the dead interval unless explicitly set, so always verify both.
In summary, the hello interval is a critical parameter for OSPF neighbor formation and stability; mismatches are a leading cause of OSPF adjacency problems.
CCNA Exam Tips
CCNA exam tip: The dead interval is automatically set to 4 times the hello interval unless manually changed with 'ip ospf dead-interval'.
CCNA exam tip: Hello intervals must match on both OSPF neighbors for adjacency to form; mismatched intervals prevent adjacency.
CCNA exam tip: On broadcast multiaccess networks (e.g., Ethernet), the default hello interval is 10 seconds; on non-broadcast networks (e.g., Frame Relay), it is 30 seconds.
CCNA exam tip: The 'ip ospf hello-interval' command is configured in interface configuration mode, not router OSPF mode.
Common Mistakes
Mistake: Setting the hello interval without also adjusting the dead interval manually, causing the dead interval to remain at 4x the new hello interval (which may be too short).
Mistake: Forgetting to apply the same hello interval on both ends of a link, resulting in OSPF adjacency not forming.
Mistake: Using the command in router OSPF configuration mode instead of interface configuration mode, which causes a syntax error.
ip ospf hello-interval [secs] vs ip ospf dead-interval [secs]
These two commands are often paired because they work together to control OSPF neighbor detection and failure detection. The hello interval determines how often hellos are sent, while the dead interval sets how long to wait before declaring a neighbor dead. They are commonly confused because adjusting the hello interval automatically adjusts the dead interval unless explicitly configured.
| Aspect | ip ospf hello-interval [secs] | ip ospf dead-interval [secs] |
|---|---|---|
| Function | Sets interval between OSPF Hello packets | Sets time before declaring neighbor down |
| Effect on Timers | Adjusts hello timer only | Adjusts dead timer, which is usually 4x hello |
| Default Relationship | Default: 10 sec (broadcast), 30 sec (non-broadcast) | Default: 40 sec (broadcast), 120 sec (non-broadcast), auto-adjusted if hello changed |
| Configuration Impact | Changing this auto-adjusts dead timer (if not explicitly set) to 4x new value | Changing this does not auto-adjust hello timer; hello remains unchanged |
| Convergence | Slower hellos delay neighbor discovery; faster hellos reduce dead interval and speed detection | Shorter dead interval speeds convergence, but risk of false failures |
Use ip ospf hello-interval [secs] when you want to control the frequency of OSPF hello packets, which indirectly affects the dead interval and neighbor detection speed.
Use ip ospf dead-interval [secs] when you want to explicitly set the failure detection time independent of the hello interval, such as to speed convergence without changing hello rate.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 switches), the `ip ospf hello-interval` command syntax and behavior are identical to classic IOS. However, on some IOS-XE platforms, the default OSPF network type for routed ports may be point-to-point, which uses a default hello interval of 10 seconds. The command is available in interface configuration mode.
On NX-OS (e.g., Nexus switches), the equivalent command is `ip ospf hello-interval [seconds]` under interface configuration, but the default hello interval is 10 seconds for all network types. NX-OS also supports the `ip ospf dead-interval` command. Note that on NX-OS, the hello interval must match on both ends, but the dead interval is automatically set to 4x the hello interval unless explicitly configured.
On ASA firewalls, OSPF is supported in multiple context mode, but the command is `ospf hello-interval [seconds]` under interface configuration (e.g., `interface gigabitethernet0/0` then `ospf hello-interval 10`). The ASA uses a default hello interval of 10 seconds. In IOS-XR, the command is `hello-interval [seconds]` under the OSPF interface configuration submode (e.g., `router ospf 1` then `interface GigabitEthernet0/0/0/0` then `hello-interval 10`).
IOS-XR also requires the dead interval to be set separately with `dead-interval`. There are no significant differences between IOS 12.x, 15.x, and 16.x for this command; the syntax and behavior remain consistent. However, in IOS 12.x, the command was introduced earlier and is fully supported.
Always verify the specific platform documentation for any nuances.
Related Commands
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.
show ip ospf interface
Displays OSPF interface parameters and status, used to verify OSPF configuration and troubleshoot neighbor relationships.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions