Network Bytes · Episode 114 · CCNA 3.4
"OSPF hello and dead timers"
OSPF neighbors send each other hello messages on a timer, every 10 seconds on Ethernet by default. If no hello arrives before the dead timer (40 seconds by default) runs out, the neighbor is declared down and routes are recalculated. Both timers must match, or the routers never become neighbors.
Hellos: "still here"
Once OSPF is running on an interface, the router sends small Hello packets out of it on a schedule. Hellos do two jobs: they let routers on the same link find each other and become neighbors, and once they are neighbors, they keep proving that the other router is still alive. The time between hellos is the hello timer (in the standard, the HelloInterval). On Ethernet (broadcast) and point-to-point links, Cisco routers send a hello every 10 seconds by default.
The dead timer is a countdown
For every neighbor, a router also runs a countdown: the dead timer (the RouterDeadInterval). By default it is 40 seconds, four times the hello timer, so a neighbor can miss a few hellos without being dropped. Every hello that arrives from that neighbor resets the countdown to full. You can watch this happen: the "Dead Time" column in show ip ospf neighbor counts down and jumps back up each time a hello arrives.
When the countdown hits zero
If no hello arrives before the dead timer reaches zero, the router declares the neighbor down. It removes the adjacency, floods updated link-state information (LSAs) and reruns the SPF calculation, so traffic that used to go through that neighbor is sent another way if one exists. That is what "routes are recalculated" means in the video. Smaller timers find a failure sooner, but cost a little more traffic and CPU.
Timers must match
The hello and dead timers are written inside every Hello packet. When a router receives a hello, it checks them against its own settings for that interface. If either one is different, the router ignores the hello, and the two routers never become neighbors: show ip ospf neighbor shows nothing for that link. To see an interface's timers, run show ip ospf interface and look for the line Timer intervals configured, Hello 10, Dead 40. To change them, use ip ospf hello-interval and ip ospf dead-interval in interface configuration mode, on both ends of the link.
Try it yourself
In Packet Tracer or a lab, connect two routers, enable OSPF on the link, and run show ip ospf neighbor a few times in a row. Watch the "Dead Time" value count down and jump back each time a hello arrives. Then run show ip ospf interface to find the timer line. For a challenge, change only the dead interval on one router with ip ospf dead-interval and watch the neighbor disappear once the old countdown runs out; set it back to bring the neighbor up again.
Good to know
- CCNA 3.4 covers configuring and verifying single-area OSPFv2, including neighbor adjacencies. See EP46 (OSPF in 60 seconds), EP47 (neighbors and DR/BDR), EP94 (router ID) and EP98 (cost).
- Routers send Hello packets on each OSPF interface every HelloInterval; the RouterDeadInterval is how long a router waits without a hello before declaring the neighbor down. Both values travel in the Hello packet and must match (IETF RFC 2328).
- Cisco defaults are 10 and 40 seconds on broadcast (Ethernet) and point-to-point networks, and 30 and 120 seconds on non-broadcast networks (left out of the video).
- "Every hello resets the countdown" is what Cisco IOS shows in the Dead Time column of
show ip ospf neighbor. - "Routes are recalculated" means the router floods new LSAs and reruns SPF.
- On Cisco IOS, if you set only the hello interval, the dead interval automatically changes to four times the new hello.
- A timer mismatch shows no neighbor in
show ip ospf neighbor; with debugging on, the router logs a hello parameter mismatch. - Area ID, subnet, authentication and stub flags must also match for routers to become neighbors (EP47; left out of the video).
For CCNA learners
CCNA exam topic 3.4 asks you to configure and verify single-area OSPFv2. Know the default hello and dead timers (10 and 40 seconds on Ethernet), that a missed dead timer brings the neighbor down, that mismatched timers stop an adjacency from forming, and that show ip ospf interface shows the configured timers.
Answer to the comment question
20 seconds. The usual ratio is dead timer = 4 × hello timer, so with a 5-second hello the dead timer is 4 × 5 = 20 seconds. On Cisco IOS, setting ip ospf hello-interval 5 on its own changes the dead interval to 20 seconds automatically; remember to make the same change on the neighbor so the timers still match.
Test your knowledge
Quick quiz: "OSPF hello and dead timers"
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- IETF, "RFC 2328: OSPF Version 2": Hello packets, the HelloInterval and RouterDeadInterval, and why they must match between neighbors
- Cisco, "OSPF Fast Hello Packets": the hello and dead intervals on Cisco routers and the ip ospf dead-interval command
- Cisco Community, "OSPF routers do not form neighbor relationship due to a mismatch": what happens when the timers do not match, and how to spot it
Video transcript
How does an OSPF router know its neighbor has gone silent?
OSPF neighbors keep sending each other small hello messages, like friends texting "still here."
On Ethernet, a hello goes out every 10 seconds. That's the hello timer.
Each router also runs a countdown: the dead timer, 40 seconds by default, four times the hello.
Every hello resets the countdown. If it hits zero, the neighbor is declared down, and routes are recalculated.
One catch: both routers' timers must match. If the hello or dead timer is different, they won't become neighbors at all.
To check them, run show ip ospf interface.
You set the hello timer to 5 seconds, keeping the usual 4-to-1 ratio. What's the dead timer? Comment your answer below!
That's your byte.
More from Network Bytes
- EP111"Interface errors: CRC and runts"
- EP112"Cloud-managed switches and access points"
- EP116"DTP: how trunks negotiate, and why to turn it off"
- EP117"Single-mode vs multimode fiber"