How do OSPF-enabled routers build adjacencies and exchange their routing tables?
OSPF-enabled routers build adjacencies by sending Hello packets out through all OSPF-enabled interfaces. If these routers share a command link and agree on parameters set within their Hello packets then they become neighbors. If these parameters differ then the routers do not become neighbors and communication stops. OSPF routers form adjacencies with certain routers. These routers are determined by the layer 2 (data link) media type and as soon as the adjacencies are formed each router sends LSAs (Link State Advertisements) to all adjacent routers. The LSAs describe the state of each router’s links. There are multiple LSA types and a route that receives an LSA from a neighbor records the LSA in a link-state database and floods a copy of the LSA to all its other neighbors. When all databases are complete – then each router uses the SPF (Shortest-Path First) algorithm to calculate a loop-free topology and builds its routing table based on this topology. It is important to note that the