TechKnowSurge
Cisco CCNA 3.4
VideoNetworkFree

DEMO: Set Hello and Dead Interval Counters

OSPF hello and dead interval timers control how routers detect and maintain neighbor relationships, and mismatched timer values between connected interfaces will cause adjacencies to fail and disrupt network connectivity.

Complete this video to capture a CTF flag worth 1 point.

About this video

OSPF relies on hello packets to discover and maintain neighbor relationships between routers. On broadcast network types, the hello timer is set to 10 seconds by default, meaning a router sends hello packets every 10 seconds to signal its presence. The dead interval, which defaults to 40 seconds, defines how long a router will wait without receiving a hello packet before declaring a neighbor unreachable. The dead interval is always four times the hello interval under default settings, and both values are visible through the show ip ospf interface and show ip ospf neighbor commands. When the hello interval is modified on one interface, the dead interval adjusts automatically to maintain the four-to-one ratio, but the change only takes effect locally. If the neighboring interface retains a different hello timer value, OSPF treats the mismatch as incompatible and tears down the adjacency. Once the neighborship drops, routing information is no longer exchanged, and traffic forwarding between those routers fails. Restoring the default timer values with the no ip ospf hello-interval command causes the adjacency to re-form once the next hello packet is exchanged and full convergence is reached. The dead interval can also be set independently using the ip ospf dead-interval command, but configuring it below the hello interval value will also cause the neighbor relationship to fail, since the router will time out before it can receive the next hello packet. Both the hello and dead intervals must be identical on each side of every OSPF-enabled link to sustain stable neighbor adjacencies and uninterrupted network reachability.

What you'll learn

What's covered

OSPF Hello & Dead Timers

Aligned to

Cisco CCNA
3.4 Configure and verify single area OSPFv2

Key terms

Open Shortest Path First
OSPF
A link-state interior gateway routing protocol that maintains a complete map of the network topology and uses Dijkstra's Shortest Path First algorithm to calculate optimal, loop-free routes. OSPF divides networks into hierarchical areas to improve scalability and supports VLSM and rapid convergence.
Hello Interval
The configurable timer that defines how frequently an OSPF router sends hello packets out of an interface to maintain neighbor adjacencies.
Dead Interval
The configurable timer that defines how long an OSPF router waits without receiving a hello packet before declaring a neighbor down; defaults to four times the hello interval.
OSPF Neighbor Adjacency
A relationship formed between two OSPF routers on the same network segment after successfully exchanging hello packets with matching parameters.
Router
A network device that forwards data packets between networks based on IP addresses.
Routing Protocol
A protocol used by routers to communicate and share routing information to determine the best path for data.

Transcript

Checking the Current Timers

This is the topology that we're going to be working with. These three routers and this switch are all part of the same area for OSPF. Let's go ahead and play around with this interface right here on router 1. This interface is fa0 1 and is connected to this switch, this layer 3 switch, so let's play around with it and see what happens.

I'm going to move this off to the side, and I'm going to start out by doing some show commands. Let's do a show ip interface and then the interface that we want to take a look at, and the interface we're looking at is fa0 1, so I'm going to hit enter on that. Actually, what I want to do is a show ip ospf interface, so let's take a look at that — then we're actually looking at the OSPF information around this.

We can see here it has the address of the interface, and it's part of area zero. It's got a process ID of 10. The network type is broadcast, and if you remember, broadcast is going to be a 10 second, so there's going to be 10 seconds on here, which should be our hello timer. I look further down, and we do have a cost of one — we're going to get more into cost later on — but I see the timer interval configuration is a hello timer of 10 and a dead interval of 40. We do actually have a couple of other timers in here as well; we're not going to get in depth into that, but we've got a hello timer of 10 and a dead interval of 40, and then a few other pieces of information about this interface as well.

The other command that I'm going to do is a show ip ospf neighbor. When I pop that up, we see that it has a dead interval time of 31 seconds. This actually starts by saying 40 seconds and counts down, and once it hits 30, by that point in time it should be communicated to. I did this about every second. Here we can see it counting down — it counts down, and then 30, and then at that point in time it gets a new hello packet and resets it, and then starts counting down again. We see the same thing for this neighbor: 33, 32, 31, and then it received a hello packet. So every 10 seconds.

We've got some other great information here too: the neighbor router ID, whether it's full or a backup designated router — we're going to talk more about that — and the interface that it's on.

Changing the Hello Timer

Now for this command, I'm going to get into the global configuration mode, then get into my interface fa0 1, and we're dash interval, and let's set it for something greater. Let's do 15 seconds. So I'm going to set it for 15 seconds and we'll hit enter right there.

I'm going to do show ip ospf neighbor again, and we can see that now this is counting down. We've got our 59 seconds — remember, the dead interval time is four times the amount of what we had here. So it must have just received an update. It's at 15 seconds, and it's counting down now from a dead interval which is 4 times 15, so that's 60. Let's go ahead and do this again, and it's counting down to 31, so we're already past that point in time when it should have received an update, because the update was every 15 seconds, so that would have been at the 45 second mark. We'll do this again and it's counting down again.

This is the reason why: it's actually getting hello packets back and forth, but the problem is that the two sides of the interface are different, and since the two sides of the interface are different, they're not creating the neighborship anymore. What's going to happen is I've lost that neighborship now, and you can see now my pings are going to time out down here because of that. So these hello timers have to be the same on each connection.

If I wanted to correct this, I could bring up this switch one right here and configure the interface, which is VLAN 9, and configure it with the same hello timer, and then that would bring that back up. To undo this, I'm going to bring this up and I'm just going to put no in front of it, and that will set it back to its defaults, and we should then get connectivity. I'm going to do show neighbor and wait until that hello packet gets sent out again, and now we have neighborship. Then my ping, once it fully converges and gets all the information it needs to, I should get my ping back.

Changing the Dead Interval

There it is, got my ping back. If I wanted the dead interval, then I could just set the dead interval to whatever I wanted. Let's try to set it to 15, so ip ospf dead-interval 15, and then it would only give it 15 seconds. Or maybe I set it to five seconds, and then it would disconnect again, because the dead interval is less than the hello timer. So I'm going to do no ip ospf dead-interval to take that back off.

By the way, if we would have waited with that as well, it would have timed out and then we wouldn't have got our ping either, because that needs to match as well. So that is the timers and how to change them.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →