OSPF Packet Types

OSPF uses five packet types to establish neighbor relationships, exchange routing information, and maintain network convergence. All OSPF packets share a common 24-byte header and use IP protocol number 89.

1. Hello Packet (Type 1)

Purpose: Discovers neighbors, establishes adjacencies, and maintains neighbor relationships.

Key Functions:

  • Sent every 10 seconds (broadcast/point-to-point) or 30 seconds (NBMA)
  • Contains Router ID, Area ID, timers, and neighbor list
  • Dead interval (default 40 seconds) determines when a neighbor is considered down

Example: Router R1 sends Hello packets on interface Gi0/0 to multicast address 224.0.0.5. If R2 receives the Hello and parameters match (area ID, timers, authentication), they become neighbors.

2. Database Description (DBD/DDP) Packet (Type 2)

Purpose: Exchanges summary information about the link-state database during adjacency formation.

Key Functions:

  • Contains LSA headers (not full LSAs)
  • Uses master/slave relationship for synchronization
  • Sequence numbers ensure reliable exchange

Example: After R1 and R2 become neighbors, they exchange DBD packets. R1 sends headers of all LSAs in its database. R2 compares these with its own database to identify missing or outdated information.

3. Link State Request (LSR) Packet (Type 3)

Purpose: Requests specific LSAs from a neighbor.

Key Functions:

  • Sent after examining DBD packets
  • Requests complete LSAs that are missing or outdated

Example: R2 discovers from R1's DBD packet that R1 has a newer LSA for network 10.1.1.0/24. R2 sends an LSR packet requesting the complete LSA for that network.

4. Link State Update (LSU) Packet (Type 4)

Purpose: Carries complete LSAs to neighbors.

Key Functions:

  • Response to LSR packets
  • Floods new or updated routing information
  • Contains one or multiple LSAs
  • Requires acknowledgment

Example: R1 responds to R2's LSR by sending an LSU packet containing the complete LSA for 10.1.1.0/24. When R1 detects a topology change (interface goes down), it generates a new LSA and floods it via LSU packets to all neighbors.

5. Link State Acknowledgment (LSAck) Packet (Type 5)

Purpose: Acknowledges receipt of LSU packets.

Key Functions:

  • Ensures reliable flooding
  • Contains LSA headers of acknowledged LSAs
  • May acknowledge multiple LSAs in one packet

Example: After receiving R1's LSU packet, R2 sends an LSAck packet confirming receipt. If R1 doesn't receive acknowledgment within the retransmission interval (5 seconds), it resends the LSU.

Packet Flow Example

Neighbor Formation:

  1. Hello → Hello (establish neighbors)
  2. DBD → DBD (exchange database summaries)
  3. LSR → LSU → LSAck (synchronize databases)

Steady State: Hello packets maintain relationships; LSU/LSAck occur only during topology changes.

This efficient packet structure enables OSPF's fast convergence and scalability in enterprise networks.

No comments:

Post a Comment