OSPF Hello Protocol and Packets Explained

OSPF is an advanced routing protocol. Unlike traditional distance vector routing protocols, which share routing information with everyone, OSPF first builds neighborship and then shares routing information only with neighbors.

An OSPF router uses the OSPF hello protocol to discover neighbors, establish adjacencies, and maintain relationships with other OSPF routers. The OSPF hello protocol periodically sends OSPF hello packets out of each enabled OSPF interface and in environments that support multicast. Hello packets are also known as hello messages.

It sends hello messages to the address It is a multicast address. It belongs to OSPF. Only OSPF-running routers listen to this address. Based on network type and topology, it uses different time intervals to send Hello packets. In broadcast and point-to-point networks, it sends Hello packets every 10 seconds. In non-broadcast and point-to-multipoint networks, it sends them every 30 seconds.

A Hello packet contains all the information that another OSPF router needs to decide whether it forms a neighborship with the sending router. The receiving router compares the hello packet's parameters with locally configured parameters. If both parameters match, it replies with its hello packet. Upon receiving this hello packet, the sending router sends another hello packet as acknowledgment. The receiving router also sends an acknowledgment hello packet to confirm the acknowledgment hello packet. At this stage, both routers are neighbors.

Let us take an example to understand these steps in detail.

The following image shows a network having two routers. OSPF is running on both. When we start this network, both routers send hello packets from all OSPF running interfaces and hope to receive OSPF Hello packets from other routers connected to those interfaces.

use of hello packets

R1's hello packet reaches R2. It contains all the necessary parameters R2 needs to build neighborship.

R2 matches the hello packet's parameters with its parameters. These parameters are known as the OSPF neighborship requirement. The following tutorial explains these parameters.

If the parameters match, R2 replies with a hello packet. The packet reaches R1. R1 sends another hello packet to acknowledge R2. At this stage, both routers become neighbors.

Routers do not stop sending hello packets. They keep sending them after an interval known as the hello interval. Routers use these hello packets to verify each other. If a router doesn't receive a hello packet from its neighbor after a specific time known as the dead interval, it removes the neighbor from the neighbor list. This way, OSPF routers use hello packets to build and maintain the neighborship.

hello interval

Key points:-

  • OSPF uses the hello protocol to send hello packets.
  • OSPF uses hello packets to build and maintain neighborship.
  • Hello packets use IP protocol type 89.
  • Hello packets are sent to multicast IP address
  • Only OSPF-speaking routers listen to IP address
  • A hello packet includes everything an OSPF router needs to build and maintain neighborship.

ComputerNetworkingNotes CCNA Study Guide OSPF Hello Protocol and Packets Explained