Routers in an OSPF routing domain should first build up full relationships before starting to exchange LSAs and then produce the SPF tree. Two routers can become adjacent if they meet some requirements, including having the same OSPF Hello and Dead interval values inserted in the Hello packets they are exchanging.
OSPF uses many timers, including the Hello timer. The Hello timer is an interval timer that is triggered every HelloInterval seconds and instructs the router to send a Hello packet over a particular interface.
HelloInterval is announced in OSPF Hello messages (Figure 1), and represents the amount of time, in seconds, between two consecutive Hello packets sent over the interface. The OSPF Hello interval may not be the same on all router interfaces.
Figure 1 – OSPF hello packet sent by R2
Additionally, RouterDeadInterval or Dead interval in OSPF is announced in OSPF Hellos transmitted out an interface (Figure 2), and it represents the amount of time in seconds the router wait to receive a Hello packet from a neighbor before the router declares it down. If the router does not receive Hello packets from a neighbor within RouterDeadInterval seconds, the neighbor in question gets marked down.
Figure 2 – OSPF hello packet sent by R2
In the rest of this tutorial, we will be using the network topology in Figure 3.
Figure 3 – The network topology of an OSPF routing domain
Default OSPF Hello and Dead Interval Values
The default OSPF Hello and Dead interval values vary from one OSPF network type to another. The table below lists all OSPF network types along with their corresponding Hello and Dead interval values.
OSPF Network Type | Default Hello Interval | Default Dead Interval |
Point-to-point | 10 | 40 |
Point-to-multipoint | 30 | 120 |
Point-to-multipoint non-broadcast | 30 | 120 |
Broadcast | 10 | 40 |
Non-broadcast | 30 | 120 |
Notice that the default Dead interval is four times the default Hello interval.
To illustrate the data in the table, we configure our OSPF routing domain as follows:
Router | Interface | IP Address | OSPF Network Type |
R1 | GigabitEthernet 0/2 | 10.0.12.1/24 | Point-to-point |
GigabitEthernet 0/4 | 10.0.14.1/24 | Point-to-multipoint | |
R2 | GigabitEthernet 0/1 | 10.0.12.2/24 | Point-to-point |
GigabitEthernet 0/3 | 10.0.23.2/24 | Point-to-multipoint non-broadcast | |
GigabitEthernet 0/4 | 10.0.24.2/24 | Broadcast | |
R3 | GigabitEthernet 0/2 | 10.0.23.3/24 | Point-to-multipoint non-broadcast |
GigabitEthernet 0/4 | 10.0.34.3/24 | Non-broadcast | |
R4 | GigabitEthernet 0/1 | 10.0.14.4/24 | Point-to-multipoint |
GigabitEthernet 0/2 | 10.0.24.4/24 | Broadcast | |
GigabitEthernet 0/3 | 10.0.34.4/24 | Non-broadcast |
Here are the configurations applied to the routers:
Router R1
Router(config)# hostname R1 R1(config)# R1(config)# interface GigabitEthernet0/2 R1(config-if)# ip address 10.0.12.1 255.255.255.0 R1(config-if)# ip ospf network point-to-point R1(config-if)# no shutdown R1(config-if)# R1(config-if)# interface GigabitEthernet0/4 R1(config-if)# ip address 10.0.14.1 255.255.255.0 R1(config-if)# ip ospf network point-to-multipoint R1(config-if)# no shutdown R1(config-if)# R1(config-if)# router ospf 1 R1(config-router)# router-id 1.1.1.1 R1(config-router)# network 10.0.12.1 0.0.0.0 area 0 R1(config-router)# network 10.0.14.1 0.0.0.0 area 0
Router R2
Router(config)# hostname R2 R2(config)# R2(config)# interface GigabitEthernet0/1 R2(config-if)# ip address 10.0.12.2 255.255.255.0 R2(config-if)# ip ospf network point-to-point R2(config-if)# no shutdown R2(config-if)# R2(config-if)# interface GigabitEthernet0/3 R2(config-if)# ip address 10.0.23.2 255.255.255.0 R2(config-if)# ip ospf network point-to-multipoint non-broadcast R2(config-if)# no shutdown R2(config-if)# R2(config-if)# interface GigabitEthernet0/4 R2(config-if)# ip address 10.0.24.2 255.255.255.0 R2(config-if)# ip ospf network broadcast R2(config-if)# no shutdown R2(config-if)# R2(config-if)# router ospf 1 R2(config-router)# router-id 2.2.2.2 R2(config-router)# neighbor 10.0.23.3 R2(config-router)# network 10.0.12.2 0.0.0.0 area 0 R2(config-router)# network 10.0.23.2 0.0.0.0 area 0 R2(config-router)# network 10.0.24.2 0.0.0.0 area 0
Router R3
Router(config)# hostname R3 R3(config)# R3(config)# interface GigabitEthernet0/2 R3(config-if)# ip address 10.0.23.3 255.255.255.0 R3(config-if)# ip ospf network point-to-multipoint non-broadcast R3(config-if)# no shutdown R3(config-if)# R3(config-if)# interface GigabitEthernet0/4 R3(config-if)# ip address 10.0.34.3 255.255.255.0 R3(config-if)# ip ospf network non-broadcast R3(config-if)# no shutdown R3(config-if)# R3(config-if)# router ospf 1 R3(config-router)# router-id 3.3.3.3 R3(config-router)# neighbor 10.0.23.2 R3(config-router)# neighbor 10.0.34.4 R3(config-router)# network 10.0.23.3 0.0.0.0 area 0 R3(config-router)# network 10.0.34.3 0.0.0.0 area 0
Router R4
Router(config)# hostname R4 R4(config)# R4(config)# interface GigabitEthernet0/1 R4(config-if)# ip address 10.0.14.4 255.255.255.0 R4(config-if)# ip ospf network point-to-multipoint R4(config-if)# no shutdown R4(config-if)# R4(config-if)# interface GigabitEthernet0/2 R4(config-if)# ip address 10.0.24.4 255.255.255.0 R4(config-if)# ip ospf network broadcast R4(config-if)# no shutdown R4(config-if)# R4(config-if)# interface GigabitEthernet0/3 R4(config-if)# ip address 10.0.34.4 255.255.255.0 R4(config-if)# ip ospf network non-broadcast R4(config-if)# no shutdown R4(config-if)# R4(config-if)# router ospf 1 R4(config-router)# router-id 4.4.4.4 R4(config-router)# neighbor 10.0.34.3 R4(config-router)# network 10.0.14.4 0.0.0.0 area 0 R4(config-router)# network 10.0.24.4 0.0.0.0 area 0 R4(config-router)# network 10.0.34.4 0.0.0.0 area 0
Examples 1, 2, 3, 4, and 5 show the default Hello and Dead interval values for all OSPF network types.
R1# show ip ospf interface gigabitEthernet 0/2 GigabitEthernet0/2 is up, line protocol is up Internet Address 10.0.12.1/24, Area 0, Attached via Network Statement Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State POINT_TO_POINT Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 omitted output
Example 1 – OSPF timers for a point-to-point OSPF-enabled interface
R1# show ip ospf interface gigabitEthernet 0/4 GigabitEthernet0/4 is up, line protocol is up Internet Address 10.0.14.1/24, Area 0, Attached via Network Statement Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 omitted output
Example 2 – OSPF timers for a point-to-multipoint OSPF-enabled interface
R2# show ip ospf interface gigabitEthernet 0/3 GigabitEthernet0/3 is up, line protocol is up Internet Address 10.0.23.2/24, Area 0, Attached via Network Statement Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 omitted output R2# show running-config interface gigabitEthernet 0/3 Building configuration... Current configuration : 165 bytes ! interface GigabitEthernet0/3 ip address 10.0.23.2 255.255.255.0 ip ospf network point-to-multipoint non-broadcast duplex auto speed auto media-type rj45 end
Example 3 – OSPF timers for a non-broadcast point-to-multipoint OSPF-enabled interface
R2# show ip ospf interface gigabitEthernet 0/4 GigabitEthernet0/4 is up, line protocol is up Internet Address 10.0.24.2/24, Area 0, Attached via Network Statement Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 2.2.2.2, Interface address 10.0.24.2 Backup Designated router (ID) 4.4.4.4, Interface address 10.0.24.4 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 omitted output
Example 4 – OSPF timers for a broadcast OSPF-enabled interface
R3# show ip ospf interface gigabitEthernet 0/4 GigabitEthernet0/4 is up, line protocol is up Internet Address 10.0.34.3/24, Area 0, Attached via Network Statement Process ID 1, Router ID 3.3.3.3, Network Type NON_BROADCAST, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 4.4.4.4, Interface address 10.0.34.4 Backup Designated router (ID) 3.3.3.3, Interface address 10.0.34.3 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 omitted output
Example 5 – OSPF timers for a non-broadcast OSPF-enabled interface
Why Adjusting the Hello and Dead Intervals?
A Higher Hello interval causes OSPF adjacencies to take a long time to get built up. Therefore, lowering the Hello timer’s interval speeds up the process of forming full OSPF neighbor relationships. However, that would generate more OSPF routing traffic.
To sum up, the shorter the hello interval, the faster network topology changes will be noticed.
On the other hand, the higher the Dead interval, the slower the OSPF convergence after a failure. On a non-broadcast network, the dead timer is 120 seconds. If an OSPF node’s interface, connected to a non-broadcast network segment, fails, all its neighbors on that segment will wait 120 seconds before considering the router down and updating their LSDBs based on this change. To circumvent this issue, we need to decrease the Dead interval.
Finally, it is likely to improve convergence if a lower dead interval is defined. However, it may result in additional routing fluctuation because the likelihood of not receiving hellos within a short period of time increases.
Configuring the Hello and Dead Intervals
Configuring The Hello Interval
The OSPF Hello interval is the time period between two hello packets that the Cisco IOS software sends on the interface, and is announced in the hello packets.
To set the Hello interval’s value for a particular interface, use the ip ospf hello-interval scnds command in interface configuration mode, where scnds defines the interval in seconds.
The value ranges from 1 to 65535. In a particular network segment, the Hello interval should be the same on all OSPF-enabled interfaces connected to that network for the routers to build up OSPF adjacencies.
The following example configures the Hello interval in subnet 10.0.14.0/24 to 5 seconds:
Router R1
R1(config)# interface gigabitEthernet 0/4
R1(config-if)# ip ospf hello-interval 5
Router R4
R4(config)# interface gigabitEthernet 0/1
R4(config-if)# ip ospf hello-interval 5
The verify our configuration, we use the show ip ospf interface command, as you see in Example 6.
R1# show ip ospf interface gigabitEthernet 0/4 GigabitEthernet0/4 is up, line protocol is up Internet Address 10.0.14.1/24, Area 0, Attached via Network Statement Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5 omitted output
Example 6 – OSPF timers on R1’s GigabitEthernet 0/4 interface
Note that the Dead interval is four times the Hello interval configured by the ip ospf hello-interval command. Therefore, you can adjust the Dead interval by adjusting the Hello time period. Finally, to restore the default Hello interval, use the no ip ospf hello-interval command.
Configuring The Dead Interval
The OSPF Dead interval is announced in OSPF hello packets. It is the amount of time during which the router waits to receive at least one hello packet from a neighbor before considering that neighbor down.
To configure the Dead interval for a particular interface, use the ip ospf dead-interval scnds command in interface configuration mode, where scnds is a time period in seconds that ranges from 1 to 65535.
Like the Hello interval, the Dead interval value should be the same for all OSPF-enabled interfaces connected to the current network segment. In this example, we set the Dead interval in subnet 10.0.23.0/24 to 60 seconds.
Router R2
R2(config)# interface gigabitEthernet 0/3 R2(config-if)# ip ospf dead-interval 60
Router R3
R3(config)# interface gigabitEthernet 0/2 R3(config-if)# ip ospf dead-interval 60
To verify our configuration, we use the show ip ospf interface command in enable mode (Example 7).
R3# show ip ospf interface gigabitEthernet 0/2
GigabitEthernet0/2 is up, line protocol is up
Internet Address 10.0.23.3/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
Timer intervals configured, Hello 30, Dead 60, Wait 60, Retransmit 5
omitted output
Example 7 – OSPF timers on R3’s GigabitEthernet 0/2 interface
Finally, to restore the default Dead interval on a specific interface, use the no ip ospf dead-interval command without indicating the current configured value.
Configuring OSPF Fast Hello Packets
OSPF fast hello packets are normal OSPF Hello packets, which are sent many times per second with a dead interval of 1 second. The hello interval advertised in fast hello packets is set to 0, as you see in Figure 4.
Figure 4 – Fast OSPF hello sent by R4 to R2
One disadvantage of the OSPF fast hello feature is that there is no guarantee that the hello packets will be sent at the rate you have configured if the router’s CPU is overloaded.
To enable fast hellos, use the ip ospf dead-interval minimal hello-multiplier mltplr, where mltplr is the number of hello packets to be sent every second. The value is an integer that ranges from 3 to 20. Additionally, the command sets the dead interval to 1 second.
The following example enables OSPF fast hello packets on subnet 10.0.24.0/24, sets the dead interval to 1 second, and instructs R2 and R4 to generate 10 hello packets every second (every 100ms).
Router R2
R2(config)# interface gigabitEthernet 0/4 R2(config-if)# ip ospf dead-interval minimal hello-multiplier 10
Router R4
R4(config)# interface gigabitEthernet 0/2 R4(config-if)# ip ospf dead-interval minimal hello-multiplier 10
To verify the dead interval and fast hello interval, we use the show ip ospf interface command (Example 8).
R2# show ip ospf interface gigabitEthernet 0/4 GigabitEthernet0/4 is up, line protocol is up Internet Address 10.0.24.2/24, Area 0, Attached via Network Statement Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1 Topology-MTID Cost Disabled Shutdown Topology Name 0 1 no no Base Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 4.4.4.4, Interface address 10.0.24.4 Backup Designated router (ID) 2.2.2.2, Interface address 10.0.24.2 Timer intervals configured, Hello 100 msec, Dead 1, Wait 1, Retransmit 5 omitted output
Example 8 – OSPF timers on R2’s GigabitEthernet 0/4 interface
When you activate fast OSPF hellos on a particular network segment, the hello multiplier may not be the same on all router interfaces because OSPF nodes ignore the hello interval values embedded in the hello packets exchanged in that segment. However, the dead interval must be consistent on the segment.
In this example, we set the hello-multiplier for R2’s G0/4 interface.
R2(config)# interface gigabitEthernet 0/4 R2(config-if)# ip ospf dead-interval minimal hello-multiplier 5
As shown in Example 9, router R2 still forms full OSPF neighbor relationship with router R4 even the hello-multiplier values configured on the interfaces connecting them are different.
R2# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 4.4.4.4 1 FULL/DR 923 msec 10.0.24.4 GigabitEthernet0/4 3.3.3.3 0 FULL/ - 00:00:49 10.0.23.3 GigabitEthernet0/3 1.1.1.1 0 FULL/ - 00:00:39 10.0.12.1 GigabitEthernet0/1
Example 9 – Displaying R2’s OSPF neighbors
If you liked this tutorial, share it on Linkedin, please.
Related Lessons to OSPF Hello and Dead Interval
- OSPF
- OSPF Router ID
- OSPF Null Authentication
- OSPF Plain Text Authentication
- OSPF Default Route
- Basic OSPF Configuration Lab for CCNA
- OSPF Configuration
- OSPF Passive Interface
- OSPF Virtual Link
- OSPF Stub Area
- OSPF LSA Types
- OSPF Graceful Restart
- OSPF Totally Stubby Area
- OSPF Reference Bandwidth
- OSPF Cost
- OSPF DR/BDR Election
- OSPF Hello and Dead Interval
- OSPF Metric
- OSPF MD5 Authentication
- OSPF HMAC-SHA Cryptographic Authentication
- OSPF Multi-Area
- OSPF TTL Security Check
- OSPF Graceful Shutdown
- Route Redistribution between OSPF and RIP
- OSPF Network Types
- OSPF Totally NSSA Area
- OSPF NSSA Area
- OSPF Summarization
- OSPF Route Filtering
- OSPF Type 5 LSA Filtering
- OSPF ABR Type 3 LSA Filtering
- OSPF Prefix Suppression
- OSPF Path Selection
- OSPF LSA Throttling
- OSPF SPF Throttling
- OSPF Incremental SPF
- OSPF Non-Broadcast Network Type
- OSPF Point-to-Point Network Type
- OSPF Broadcast Network Type
- OSPF Point-to-Multipoint Network Type
- OSPF vs RIP
- OSPF LSA Group Pacing
- OSPF LSA Flood Pacing
- OSPF LSA Retransmission Pacing
- Troubleshooting OSPF Neighbor Adjacency
- Troubleshooting OSPF Route Installation
- Troubleshooting OSPF Route Advertisement
- OSPF Stub Router
Conclusion
I hope this blog post helps you learn something.
Now I’d like to turn it over to you:
What did you like about this tutorial?
Or maybe you have an excellent idea that you think I need to add.
Either way, let me know by leaving a comment below right now.