4. Functional Summary
A separate copy of OSPF's basic routing algorithm runs in each area.
Routers having interfaces to multiple areas run multiple copies of
the algorithm. A brief summary of the routing algorithm follows.
When a router starts, it first initializes the routing protocol data
structures. The router then waits for indications from the lower-
level protocols that its interfaces are functional.
A router then uses the OSPF's Hello Protocol to acquire neighbors.
The router sends Hello packets to its neighbors, and in turn
receives their Hello packets. On broadcast and point-to-point
networks, the router dynamically detects its neighboring routers by
sending its Hello packets to the multicast address AllSPFRouters.
On non-broadcast networks, some configuration information is
necessary in order to discover neighbors. On all multi-access
networks (broadcast or non-broadcast), the Hello Protocol also
elects a Designated router for the network.
The router will attempt to form adjacencies with some of its newly
acquired neighbors. Topological databases are synchronized between
pairs of adjacent routers. On multi-access networks, the Designated
Router determines which routers should become adjacent.
Adjacencies control the distribution of routing protocol packets.
Routing protocol packets are sent and received only on adjacencies.
In particular, distribution of topological database updates proceeds
A router periodically advertises its state, which is also called
link state. Link state is also advertised when a router's state
changes. A router's adjacencies are reflected in the contents of
its link state advertisements. This relationship between
adjacencies and link state allows the protocol to detect dead
routers in a timely fashion.
Link state advertisements are flooded throughout the area. The
flooding algorithm is reliable, ensuring that all routers in an area
have exactly the same topological database. This database consists
of the collection of link state advertisements received from each
router belonging to the area. From this database each router
calculates a shortest-path tree, with itself as root. This
shortest-path tree in turn yields a routing table for the protocol.