OSPF basics: build a map, then choose a route
A friendly first look at Hellos, the LSDB and SPF—and why a topology map is not the same as a routing table.
The big picture
Imagine each router describing its own local roads. OSPF exchanges those descriptions so routers in an area can build a consistent topology map. Each router then calculates its own best paths from its own position.
Three different jobs
Hello packets discover and maintain neighbors. Link-state advertisements describe topology or reachability. SPF is the calculation that uses the map to find shortest paths. A Hello packet is not an LSA.
LSDB versus routing table
The link-state database stores the information used to calculate routes. The routing table contains selected routes. Two routers can agree on the map and still choose different next hops because they stand in different places.
Cost, not hop count
A two-link path with costs 10 + 10 beats a direct link with cost 30 when comparing otherwise equivalent intra-area paths. OSPF does not simply count routers. Interface costs are directional; check both ends when troubleshooting.
Try it
Change link costs in the playground. First make the direct path best, then create equal-cost paths. Explain the result before moving the next slider.
Remember
Neighbors help routers exchange the map. The map helps SPF find paths. The resulting routes still have to compete with other route sources according to the router’s routing-table rules.
Protocol reference: RFC 2328 (OSPFv2). NSSA reference: RFC 3101.