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.
OSPF Hello & Dead 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.
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.
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.
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 →