roopeshsn

OSPF Refresher

Published: Sun May 31 2026

OSPF Packet Types:

  1. Hello
  2. Database Descriptor (DBD or DD)
  3. Link State Request (LSR)
  4. Link State Update (LSU)
  5. Link State Acknowledgment (LSAck)

Hello Packet

  • Type code 1
  • For broadcast and P2P connection types - 224.0.0.5
  • For other connection types - Unicast
Option Bit Name Purpose
DN Bit Down bit The receiving router will not forward the packet if this bit is set
E-bit External Routing Capability Indicates support for AS-External LSAs (Type 5)
NP-bit (N/P bit) NSSA Translation Capability Used in NSSA areas
DC-bit Demand Circuit Support for demand circuits
O-bit Opaque LSA Capability Support for Opaque LSAs

Database Descriptor (DBD or DD) Packet

Bit Flag Purpose
0 MS (Master/Slave) MS=1 - router is Master, MS=0 - router is Slave
1 M (More) M=1 - more DD packets follow, M=0 - this is the last DD packet
2 I (Init) I=1 - first DD packet during ExStart, I=0 - subsequent packets
3-7 Reserved Set to 0

Note: The master will control the DB sync process.

What is DD sequence number?

  • Similar to sequence number in TCP
  • Master will initialize to unique value and subsequent packets will be incremented by 1.
  • Higher router-id will become master

LSR, LSU, LSAck have nothing much!

Adjacency states

  1. Down
  2. Init
  3. Attempt
  4. 2-way
  5. Exstart
  6. Exchange
  7. Loading
  8. Full

Give a thought for below questions.

  1. Will the OSPF packets gets fragmented?
  2. Reasons for neighborship stuck in any of the above states?

LSA Types

  1. Router LSA
  2. Network LSA
  3. Summary LSA
  4. ASBR Summary LSA
  5. AS External LSA
  6. Group Membership LSA
  7. NSSA External LSA

Router LSA - Type 1

  • For Broadcast networks DR/BDR election will happen before flooding of LSAs
  • Router LSA will only be flooded to DR/BDR (224.0.0.6). DR will flood to all other routers (224.0.0.5).

Network LSA - Type 2

  • Created for each Multi-access network by the DR

Summary LSA - Type 3

  • For Inter Areas reachability

ASBR Summary LSA - Type 4

  • Required to find ASBR
  • By ABR

External LSA - Type 5

  • Generated when routes are redistributed into OSPF
  • By ASBR

Area Types

  1. Stub
  2. Totally Stub
  3. NSSA

Stub

  • No Type-4/5
  • Instead a type-3 with a default route will be advertised

Totally Stub

  • No Type-3/4/5

NSSA

  • Type-5 or External LSA is not allowed hence Type-7 LSA will be generated
  • Type-7 to Type-5 translation by ASBR
Last updated: Sun May 31 2026
ospfrouting