Enhance your Career in Networking With IPinBits!!!​

OSPF Packets: Lets have a close look at OSPF packets

OSPF uses the following 5 packets(Click on the buttons, to view in details) between two routers to form and maintain the adjacency, topology table and routing table.

Let’s check what the use of each packet and what are the packet contents:


  • Hello packets are used to discover the OSPF Neighbors, initially Hello packets are sent as multicast packets on address, in search of Neighbors. But once the hello’s are exchanged on multicast address, routers send it as unicast on specific peer address on which they receive hello’s.
  • It discovers, maintains the neighbor adjacency.
  • Hello packets contains few mandatory parameters which needs to be same on both the routers to bring the neighborship:

Hello interval, Dead interval, area id, password (in case authentication is configured), stub area flags (if stub areas are configured)

Let’s open the OSPF header and Hello packet in details and check what’s inside it.

OSPF uses its own header: Header contains the following fields in it.

  • Version: For Ipv4 OSPF header will have version 2, for OSPFV3(ip6) is 3.
  • Message type: 1 is hello, 2 is for DBD, 3 is LSR, 4 is LSU, 5 is LSACK.
  • packet length: Indicates length of OSPF header.
  • the area id: Has to be same on both routers, indicates which area the router belongs to. (Area 0 is backbone area)
  • authentication: In case we want to securely established OSPF neighborship, we can authenticate the routers using plain text, md5, needs to be same.
  • Checksum: To check if the OSPF header is corrupt or not.

Inside the Hello packet we have the following parameters which are necessary in order to OSPF to function properly.


Network mask: Also known as the subnet mask, it should match on both routers.

Options: OSPF uses various Bit’s to indicate multiple option like Stub, external routers, if router is configured as NSSA and so on. More detailed explanation of all the OSPF Bits in separate blog.

Hello/Dead Interval: This are the timers which indicate how frequently hello packets are sent and when should I consider the neighbor to be dead. Default Hello timer is 10sec and Dead is 40sec, but this are configurable, but should be same on all devices for neighborship.

DR/BDR: On multi-access Network, OSPF chooses DR and BDR to reduce the LSA overheads within the area, DR/BDR is like hub and spoke topology, everything goes via DR (HUB). Initially before election each router assumes itself as DR and BDR but eventually after hello messages are exchanged, the router with the highest OSPF priority becomes DR (in case priority is same election goes on Router-ID). More on DR/BDR election in another blog. There are two separate fields in OSPF hello packet one for DR and one for BDR both are indicated by Router-ID.

Router Priority: As discussed above, router priority is used in election of DR/BDR, by default its 1 on all the routers, to make Forceful DR we set it as 255, and for forceful DR other we can set it as 0.

Active Neighbor: This field contains the list of all the active Neighbors with their RID.

Related blog posts