31 OSPF C ONFIGURATIONOSPF OverviewIntroduction to OSPF Open Shortest Path First (OSPF) is an Interior Gateway Protocol based on the linkstate developed by IETF. At present, OSPF version 2 (RFC2328) is used, which isavailable with the following features:■ Applicable scope: It can support networks in various sizes and can supportseveral hundreds of routers at maximum.■ Fast convergence: It can transmit the update packets instantly after thenetwork topology changes so that the change is synchronized in the AS.■ Loop-free: Since the OSPF calculates routes with the shortest path treealgorithm according to the collected link states, it is guaranteed that no looproutes will be generated from the algorithm itself.■ Area partition: It allows the network of AS to be divided into different areas forthe convenience of management so that the routing information transmittedbetween the areas is abstracted further, hence to reduce the networkbandwidth consumption.■ Equal-cost multi-route: Support multiple equal-cost routes to a destination.■ Routing hierarchy: OSPF has a four-level routing hierarchy. It prioritizes theroutes to be intra-area, inter-area, external type-1, and external type-2 routes.■ Authentication: It supports the interface-based packet authentication so as toguarantee the security of the route calculation.■ Multicast transmission: Support multicast address to receive and send packets.Process of OSPF RouteCalculationThe routing calculation process of the OSPF protocol is as follows:■ Each OSPF-capable router maintains a Link State Database (LSDB), whichdescribes the topology of the whole AS. According to the network topologyaround itself, each router generates a Link State Advertisement (LSA). Therouters on the network transmit the LSAs among them by transmitting theprotocol packets to each others. Thus, each router receives the LSAs of otherrouters and all these LSAs compose its LSDB.■ LSA describes the network topology around a router, so the LSDB describes thenetwork topology of the whole network. Routers can easily transform the LSDBto a weighted directed graph, which actually reflects the topology architectureof the whole network. Obviously, all the routers get a graph exactly the same.■ A router uses the SPF algorithm to calculate the shortest path tree with itself asthe root, which shows the routes to the nodes in the autonomous system. Theexternal routing information is the leave node. A router, which advertises theroutes, also tags them and records the additional information of the