In addition to flooding LSAs and discovering neighbors, a third major task of the link state routing
protocol is establishing the link state database. The link state or topological database stores the LSAs as a
series of records. Although a sequence number and age and possibly other information are included in the
LSA, these variables exist mainly to manage the flooding process. The important information for the
shortest path determination process is the advertising router's ID, its attached networks and neighboring
routers, and the cost associated with those networks or neighbors. As the previous sentence implies, LSAs
may include two types of generic information:
The shortest path first (SPF) algorithm is run once for the router link information to establish shortest
paths to each router, and then stub network information is used to add these networks to the routers.
Figure 4.11 shows an internetwork of routers and the links between them; stub networks are not shown
for the sake of simplicity. Notice that several links have different costs associated with them at each end.
A cost is associated with the outgoing direction of an interface. For instance, the link from RB to RC has
a cost of 1, but the same link has a cost of 5 in the RC to RB direction.