OSPF Adjacency & Neighbor Forming Process. OSPF Hello Messages, OSPF Database Updates via Link State Requests (LSR & LSU)
This is the second article of our OSPF series which describes how OSPF routers perform neighbor relationship and adjacency. We’ll examine how OSPF discovers neighbors by sending Hello packets through the router interfaces and how it shares Link State Advertisements (LSAs) to form adjacencies and build its topology table. We’ll also examine the contents of OSPF Hello packets (Router ID, Hello/Dead Intervals, Subnet Mask, Router Priority, Area ID, DB & BDR IP Address, Authentication information) and more.
Our first OSPF article covered basic OSPF concepts - OSPF Topology & Routing table, OSPF Areas & Router roles, plus more. It is recommended users read the first article before continuing, to help refresh their OSPF theory.
How OSPF Forms Neighbor Relations
Once OSPF is enabled on a router interface, a Link State Database (LSD) is established and all interfaces running OSPF are added to this table to be used in Link State Advertisements (LSAs), OSPF then the begins neighbor discovery and forming adjacency process.
We’ll now take a closer look at both, neighbor discover and adjacency forming process:
Figure 1. R1 sends an initial OSPF Hello packet. R2 responds with an OSPF Reply Hello packet.
Sending & Receiving OSPF Hello Messages
An OSPF router generates a Hello packet every poll interval -10 seconds for Peer-to-Peer (P2P) networks and 30 seconds for Non-Broadcast-Multiple-Access (NBMA) networks by default- and advertises it through multicast address 184.108.40.206 to all routers connected to its interfaces while it searches for potential OSPF neighbors. The Hello message contains a list of information needed to form an OSPF neighbor relation between two neighboring routers, the following a list of information contained the Hello messages:
- OSPF Router ID. The router’s ID which is configured or automatically selected by OSPF (analyzed below)
- Hello Interval Timer. Frequency upon which Hello packets are sent.
- Dead Interval Timer. Defines how long we should wait for hello packets before we declare the neighbor dead.
- Subnet Mask
- Router Priority. Used to help determine the Designated Router (DR). Higher priority takes precedence. A configured Priority of 0 means the router will not become a DR or BDR.
- List of reachable OSPF neighbors in the network.
- Area ID
- DR & BDR’s IP addresses (if exists)
- Authentication Password (if configured)
Once a neighbor router (R2) running OSPF receives the Hello message, it runs a check on the above list.
The following conditions must be met for two routers to become neighbors: