Analogy: A static route is a permanent sign on the road — if the road closes, the sign still directs you there. OSPF is Waze: all routers report link status to each other and recalculate the route within seconds.
1. DOWN to INIT: a one-way Hello has been received. 2. 2-WAY: both routers see each other and, on Ethernet, DR and BDR are elected by priority and router ID. 3. EXSTART/EXCHANGE: database descriptors are swapped and MTU must match. 4. LOADING to FULL: the link-state databases are in sync. Router ID comes from manual configuration, then the highest loopback, then an active interface. Area, subnet, timers and authentication must match.
Four things that must match between neighbors
- Same Area (e.g., Area 0) and same network/Subnet Mask on the link.
- Same Hello and Dead Interval (default 10 / 40 seconds).
- Same Authentication setting, if present.
- Unique Router ID — chosen by manual router-id, otherwise by the highest Loopback, otherwise by an active interface.
- In a shared Ethernet network, DR and BDR are elected by Priority (default 1) and in case of a tie, by the highest Router ID — they centralize the exchange of updates.
Verification — How to check that it actually works
Common Errors (and what to check)
- Incorrect Wildcard Mask — /24 = 0.0.0.255, /30 = 0.0.0.3. Incorrect mask ⇒ interface does not enter OSPF at all (Nbrs 0/0).
- MTU mismatch between neighbors — Adjacency gets stuck in EXSTART/EXCHANGE. Check with show interfaces and align to 1500.
- Duplicate Router ID between two routers — Adjacency does not come up. Manually configure router-id and then clear ip ospf process.
- Different Area on both sides of the link, or different Hello/Dead Timers — No neighbor at all.
- Different Subnet Mask on the same link (e.g., /24 vs. /30) — OSPF refuses to form adjacency.
- ACL or Authentication blocking Hello in one direction — Neighbor stuck in INIT.
- Forgot passive-interface towards users — Hello sent to the user network, noise and security risk.