Open Shortest Path First (OSPF) Adjacency process
OSPF routers exchange several packet types while forming an adjacency and synchronizing the LSDB.
| Number | Message Type | Full Name | Purpose | Neighbor State Used |
|---|---|---|---|---|
| 1 | Hello | Hello Packet | Discover neighbors, negotiate parameters, and maintain the adjacency (Keepalive). | Init / 2-Way |
| 2 | DBD | Database Description | The “catalog” or summary of the network map to check what the neighbor is missing. | Exstart / Exchange |
| 3 | LSR | Link State Request | The “order form” used to request specific network data discovered in the DBD. | Loading |
| 4 | LSU | Link State Update | The “delivery truck” that carries the actual, detailed LSA network data. | Loading |
| 5 | LSAck | Link State Acknowledgment | The “receipt confirmation”. Confirms that an LSU arrived safe and sound. | Loading / Full |
Neighbor state must reach FULL before the LSDB is considered synchronized.
1. OSPF packet
Section titled “1. OSPF packet”Version: OSPFv2 or OSPFv3
Type:
1- Hello
2- DBD Database Descriptor
3- LSR Link State Request
4- LSU Link State Update (LSA Link State Advertisements are inside LSUs)
5- Link State Acknowledgment
Router ID: Of the advertising router, and interface
Authentication Type:
0 - No password
1 - Plain text password
2 - MD5 authentication
2. Hello packets
Section titled “2. Hello packets”- OSPF discover each other and form adjacencies via Hello packets.
- They send Hello packets out each interface where OSPF is enabled (except passive interfaces)
- Multicast to 224.0.0.5
- Sent every 10 seconds by default (even when the adjacency is already formed, to make sure the router is still up)
2. Hello packets content
Section titled “2. Hello packets content”- Router ID: 32 bit number that uniquely identifies each OSFP router.
- Hello Interval How often router sends Hello packets.
- Dead Interval: How long a router waits to hear from a neighbor before declaring it out of service. Default 4x Hello Interval.
- Neighbors: A list of adjacent OSPF routers that this router has received a Hello packet from.
- Area ID: The area configured for that interface
- Router priority: An 8 bit number used to select DR and BDR and BSR IPv4 addres: if known
- Authentication Flag: Authentication details if configured.
- Stub Area Flag: If the area is a stub area.
3. Neighbor State Summary
Section titled “3. Neighbor State Summary”1. Down
The initial state, no hello packets have been received from the neighbor.
2. Init
The router has received a packet form the neighbor, but bidirectional communication is not yet established.
3. 2-way
Bidirectional communication is confirmed because the local router sees its own Router ID listed in the neighbor’s Hello packet. On broadcast networks (like Ethernet), the Designated Router (DR) and Backup Designated Router (BDR) election happens during this state.
4. Exstart
Two-way traffic established; DR/BDR election occurs.
5. Exchange
Sharing LSA headers via DBD packets.
-
- Loading Requesting missing LSAs (LSR) and receiving them (LSU).
-
- Full LSDBs are 100% identical; full adjacency.
4. Neighbor requirements
Section titled “4. Neighbor requirements”- Area numbers must match
- Interfaces must be in the same subnet
- OSPF process must not be shutdown
- OSPF Router IDs must be unique
- Hello and Dead timers must match
- Authentication settings must match
- IP MTU settings must match
- OSPF network type must match
5. Important LSA types
Section titled “5. Important LSA types”- Router LSA
- Network LSA
- AS-External LSA