OSPF protocol : OSPF Packet Types

Today I am going to talk about the OSPF packet types. As many of you know already that OSPF packet shared OSPF header of 24 bytes. This header permits the getting router to authenticate and proceed the packets. 

Here in this article, We are going to discuss about the packet types in OSPF  Below are the different packet types in OSPF:

  1. Hello packet
  2. Database Descriptor packet
  3. Link State Request packet
  4. Link State Update packet
  5. Link State Acknowledgment packet

Let's talk about the OSPF packets one by one which I described above. Start with the Hello packet format first.

Fig 1.1- OSPF Packet Header

Hello Packet in OSPF
Hello packets are known OSPF packet Type 1. These packets are multicast periodically to the multicast address on all interfaces and unicast on virtual-links. The multicast address is as you guys know about it in the case of OSPF  It enables dynamic detection of neighbors and keep neighbor associations. On broadcast and NBMA networks, Hello packets are used to select/elect DR and BDR.

  1. Network Mask- Subnet mask of the advertising OSPF interface. For unnumbered point-to-point interfaces and virtual-links, it is set to (4-bytes)
  2. Hello Interval- Interval at which Hello packets are advertised. By default, 10 seconds for point-to-point link and 30 seconds for NBMA networks/Broadcast links (2-bytes)
  3. Options- The local router advertises its capabilities in this field. (1-byte)
  4. RTR PRI- The Priority of the local router. It is used for DR/BDR election. If set to 0, the router is ineligible for the election. (1-byte)
  5. Router Dead Interval- The Dead Interval as requested by the advertising router. By default, 40 seconds for point-to-point link and 120 seconds for NBMA networks/Broadcast links (4-bytes)
  6. Designated Router- The IP address of the current DR. Set to if no DR is elected yet. (4-bytes)
  7. Backup Designated Router- The IP address of the current BDR. Set to if no BDR is elected yet. (4-bytes)
  8. Neighbor- The Router IDs of all OSPF routers from whom a valid Hello packet have been seen on the network.

Database Descriptor packet
For link-state routing protocol, it is required that the link-state databases for all routers stay harmonized. Th harmonization leads as soon as the adjacency is made between neighbors. OSPF uses Database Descriptor (DBD) packets for this purpose.

The DBD packets are OSPF packet Type 2. The OSPF router summarizes the local database and the DBD packets carry a set of LSAs fitting to the database. When a neighbor sees an LSA that is more topical than its own database copy, it desires this newer LSA from the neighbor.

  1. Interface MTU- Contains the MTU value of the outgoing interface. For virtual-links, this field is set to 0x0000. (2-bytes)
  2. Options- Same as Options field in a Hello packet (1-byte)
  3. I- Initial Bit. Indicates this is the first in the series of DBD packets (1-bit)
  4. M- More bit. Indicates whether the DBD packet is the last in the series of packets. Last packet has a value of 0, while all previous packets have a value of 1. (1-bit)
  5. MS- Master/ Slave bit. Master=1, Slave=0 (1-bit)
  6. DD Sequence Number- Used to sequence the collection of DBD packets. The initial value should be unique. The sequence number then increments by 1 until the complete database description has been sent.(4-bytes)
  7. LSA Header- This field contains the LSA headers describing the local router's database. (variable length)

During the DBD packet interchange, a Master/ Slave relationship is recognized between the neighbors. The router with the uppermost Router ID develops the Master and begins DBD packet exchange. The Interface MTU should match on neighbors otherwise FULL adjacency is not reached.

Link State Request packet
As many of you already know that the Link State Request (LSA) packet is an OSPF packet Type 3. After DBD packets interchange procedure, the router may locate it does not have an up-to-date database. The LSA packet is used to appeal fragments of neighbor database that is more up-to-date.

  1. LS Type- Type of LSA requested (4-bytes)
  2. Link State ID- Depends upon the type of LSA (4-bytes)
  3. Advertising Router- Router ID of the requesting router (4-bytes)

Link State Update packet
Link State Update (LSU) packets are OSPF packet Type 4. These packets apply the submerging of LSA  Each LSA comprises routing, metric and topology data to define a serving of OSPF network. The local router presents LSA within an LSU packet to its neighboring routers. In addition, the local router promotes the LSU packet with data in reply to an LSR packet.

Link State Acknowledgment packet
Link State Acknowledgment (LSAck) packets are OSPF packet Type 5. OSPF needs acknowledgment for the delivery of each LSA. Multiple LSAs can be approved in a single LSAck packet.