Interface table – Compiles all interfaces that have been configured to participate in OSPF. The directly connected subnets associated with these interfaces are included in the type 1 router LSA that the router injects into the OSPF LSDB. An interface configured as a passive interface is still listed in the OSPF interface table although no neighbor relationships are established on this interface.
Neighbor table – Used to keep track of all OSPF neighbors. Neighbors are added to the table upon receipt of hello packets whereas they are removed when the OSPF dead timer for a neighbor expires or when the associated interface goes down.
Link-State Database (LSDB) – The main data structure OSPF uses to store all its network topology information. The LSDB contains topology information for the areas that a router participates in. It also contains condensed information about the paths that are available to reach networks and subnets in other areas or other autonomous systems. It is one of the most important data structures to gather information from when troubleshooting OSPF.
Routing Information Base (RIB) – The RIB includes information for the best routes to each individual prefix in the OSPF network with their associated path costs. This information is derived after executing the SPF algorithm. When the information in the LSDB changes, only a partial recalculation might be necessary. Routes might be added or deleted from the RIB without the need for a full SPF recalculation. Based on the RIB, OSPF will attempt to install its routes into the routing table.
OSPF is designed in a hierarchical fashion, which basically means that you can separate the larger internetwork into smaller internetworks called areas. All OSPF networks MUST contain Area 0 and all areas MUST directly connect to Area 0. This is depicted in the slide where both Area 1 and Area 2 are directly connected to the Backbone Area, Area 0. There is one exception to this rule where a virtual link can be established but it should only be used for a temporary solution (i.e. merging two different company networks). Details of virtual links are not covered in this course.
OSPF has special restrictions when multiple areas are involved. If more than one area is configured, one of these areas has be to be area 0. This is called the backbone. When designing networks it is good practice to start with area 0 and then expand into other areas later on.
The backbone has to be at the center of all other areas, i.e. all areas have to be physically connected to the backbone. The reasoning behind this is that OSPF expects all areas to inject routing information into the backbone and in turn the backbone will disseminate that information into other areas.
Utilizing multiple areas is typically a good design for OSPF. Creating OSPF in a hierarchical design has numerous benefits that include:
– Decreasing routing overhead
– Speeding up convergence
– Confines network instability to single areas of the network
Note: While it makes OSPF more efficient, it does not make configuring OSPF easier.
Hello packets are utilized by OSPF routers to recognize each other in order to share information. Each interface participating in OSPF sends hello packets multicast periodically to 224.0.0.5. The entries in the figure with an “^” much match between adjacent routers or a neighbor relationship will NOT be established. These include Hello and dead intervals, Area ID, Authentication password (if used) and Stub area flag.
Neighbors
Neighbors are two or more routers that have an interface in a common network, such as two routers connected on a point-to-point serial link.
Adjacency
An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates. OSPF is really picky about sharing routing information, unlike EIGRP that directly shares routes with all of its neighbors.
Instead, OSPF directly shares routes only with neighbors that have also established adjacencies.
Link State Advertisement
A Link State Advertisement (LSA) is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers.
There are several ways to verify proper OSPF configuration and operation. Some of the commands are as follows:
show ip protocols: This command is useful in debugging routing operations. Information in the Routing Information Sources field of the show ip protocols output can help you identify a router suspected of delivering bad routing information.
show ip route or show ip route ospf: Displays the current state of the routing table
show ip ospf interface: Displays general information about Open Shortest Path First (OSPF) routing processes.
show ip ospf neighbor: Displays OSPF-neighbor information on a per-interface basis.
OSPF is great if you configure it properly. Now let’s look at other ways to do that.
Notice from the output of the “show ip route” command, the default administrative distance (AD) of OSPF is 110. The AD for an external (E2) OSPF route is 170 as shown in the output of the show ip route command.
The show ip ospf command is great for troubleshooting OSPF as it has a significant amount of valuable information in the output. Things such as timer settings, Link State Advertisement (LSA) information, area information, etc.
Another good command for troubleshooting OSPF is the show ip ospf neighbor command. As you can see from the output on the slide, fields that are displayed are as follows:
ID – Router ID of the OSPF neighbor
Priority – OSPF priority of the OSPF neighbor
State – Displays the state of the OSPF router. Is it a DR, BDR, etc.
Dead Time – Expected time before Cisco IOS software will declare the neighbor dead.
Address – Actual address of the interface the OSPF router is assigned.
Interface – Interface the neighbor is learned on.
To display information on Open Shortest Path First (OSPF)-related events, such as adjacencies, flooding information, designated router selection, and shortest path first (SPF) calculation, use the debug ip ospf events command in privileged EXEC mode.
To display general IP debugging information and IP security option (IPSO) security transactions, use the debug ip packet command in privileged EXEC mode.
By issuing the debug ip ospf adj command, you can capture the authentication process and DR/BDR entries.