OSPF routers in the same area will all have the same link-state database and run the same SPF algorithm. The records in this database are used by the SPF algorithm to determine the network topology and to compute the shortest path to a destination. The characteristics of the link-state database are as follows:
The link-state database is the data source to compute the network routes, which must be computed again after any change or potential change in the networks topology as this might have caused the routes to change. Each OSPF router will construct a routing table with itself as the center of the network. A topology that represents the network is extracted from the records contained within the link-state database.
The SPF algorithm is then used to compute the shortest path from the local OSPF router to each destination within the network. As these computations are run and the shortest path determined, this information is put into a routing table. From these computations the router derives the next router (hop) that must be used in order to reach the destination. This information is used by the router in order to route packets on to their destination.
There are many factors that can effect the results of these calculations such as, Type of Service (TOS) and externally derived routes.
OSPF Routing Hierarchy
One of most important features within the OSPF protocol is its capability to use a hierarchical routing structure. There are two characteristics that you must keep in mind when considering how OSPF operates within this type of hierarchical structure.
The following sections discuss types of OSPF routers, hierarchical network design techniques, Autonomous System, areas, and routing within a hierarchical structure. This information will be presented in how they all interact to bring an OSPF network together.
Types of OSPF Routers
The hierarchical routing structure used by OSPF is designated by four different types of routers. Each has a unique role and set of defining characteristics within the hierarchy. Figure 4-18 shows a typical OSPF network with multiple areas containing the different types of OSPF routers.
The sections that follow provide the general descriptions for the four different types of OSPF routers.
Internal Routers (IRs)
Internal Routers (IRs) are routers whose directly connected networks all belong to the same OSPF area. These types of routers will have a single link-state database because they only belong to one area.
Area Border Routers (ABRs)
ABRs are attached to multiple OSPF areas, so there can be multiple ABRs within a network. ABRs will have multiple copies of the link-state database because of this. The router will run one database for each area that will be summarized, and then it will be presented to the backbone for distribution to other areas. Routers located on the border of one or more OSPF areas and connects those areas to the backbone network are known as ABRs. ABRs are considered members of both the OSPF backbone and the attached areas. The ABRs therefore maintain routing tables describing both the backbone topology and the topology of the other areas. Remember that an ABR only sends summarized information to the backbone area, and in order to be considered an ABR the router must be connected to the backbone.
Autonomous System Border Routers (ASBRs)
ASBRs are connected to more than one Autonomous System and exchange routing information with routers in another autonomous system. ASBRs advertise the exchanged external routing information throughout their autonomous system. Every router within an autonomous system will know how to get to each ASBR with its AS. ASBRs run both OSPF and another routing protocol, such as RIP or BGP. ASBRs must reside in a non-stub OSPF area.
Backbone Routers (BRs)
BRs typically have an interface to the backbone area and two other OSPF areas. Backbone Routers do not have to have ABRs. Routers that only have interfaces connecting them to the backbone are also considered BRs.
Hierarchical Network Design Techniques
When considering how to design your OSPF network, remember the following factors that are supported by OSPF and currently accepted network design theories: