4-2z Each OSPF-supported router maintains a link state database (LSDB), which describes thetopology of the whole AS. According to the network topology around itself, each router generates alink state advertisement (LSA). Routers on the network exchange LSAs with each other bytransmitting protocol packets. Thus, each router receives the LSAs of other routers and all theseLSAs form the LSDB of the router.z An LSA describes the network topology around a router, whereas an LSDB describes the networktopology of the whole network. Routers can transform the LSDB to a weighted, directed graph,which reflects the real topology of the whole network. All routers get exactly the same weighted,directed graph.z According to the weighted, directed graph, each router uses the shortest path first (SPF) algorithmto calculate the shortest path tree with itself as the root. The tree shows the routes to the nodes inthe autonomous system. External routes are leaf nodes, which are marked with the routers fromwhich they are advertised to record information outside the AS. The routing tables obtained bydifferent routers are different.Furthermore, to enable individual routers to broadcast their local status information (such as availableinterface information and reachable neighbor information) to the whole AS, routers in the AS shouldestablish adjacencies among them. In this case, the route changes on any router will result in multipletransmissions, which are unnecessary and waste the precious bandwidth resources. To solve thisproblem, designated router (DR) and backup designated router (BDR) are defined in OSPF. For detailsabout DR and BDR, see section " DR/BDR".OSPF supports interface-based packet authentication to guarantee the security of route calculation. Inaddition, it transmits and receives packets in multicast (224.0.0.5 and 224.0.0.6).Basic OSPF ConceptsAutonomous SystemA set of routers using the same routing protocol to exchange routing information constitute anAutonomous System (AS).Router IDTo run OSPF, a router must have a router ID. A router ID can be configured manually. If no router ID isconfigured, the system will automatically select an IP address from the IP addresses of the interfaces asthe router ID. A router ID is selected in the following way:z If loopback interface addresses are configured, the system chooses the latest configured loopbackinterface IP address as the router ID.z If no loopback interface is configured, the first configured IP address among the IP addresses ofother interfaces will be the router ID.OSPF PacketsOSPF uses five types of packets:z Hello packet:Hello packets are most commonly used OSPF packets, which are periodically sent by a router to itsneighbors. A Hello packet contains the values of some timers, DR, BDR and known neighbors.z DD packet:When two routers synchronize their databases, they use database description (DD) packets to describetheir own LSDBs, including the summary of each LSA. The summary refers to the header of an LSA