Check OSPF Neighbors
Purpose
Assuming that all the routers are correctly configured for OSPF, you can verify which neighbors are adjacent and what type of LSAs are contained in the OSPF link-state database. In addition, you can examine the set of routes installed in the forwarding table to verify that the routing protocol process (rpd) has relayed the correct information into the forwarding table.
Figure 12 illustrates an example OSPF network topology used in this section.
![]()
The network consists of various types of routers that form adjacencies with neighboring OSPF routers. Once these adjacencies are in place, each router generates and floods LSAs into the network. The LSAs are placed into the link-state database on each router where the shortest path first (SPF) algorithm is calculated to find the best path to each router in the network. The network in Figure 12 should have the following adjacencies and LSA distribution:
- ABR routers
R2,R3,andR4should form adjacencies with routers in all areas to which they are connected (0.0.0.0,0.0.0.1,0.0.0.2, and0.0.0.3). See Check OSPF on an ABR.- Internal routers (
R1,R5, andR6) should form adjacencies with routers inside their local area only. See Check OSPF on a Stub Router and Check OSPF on an ASBR.- Backbone area
0.0.0.0should have Type 1, Type 3, Type 4, and Type 5 LSAs.- NSSA area
0.0.0.1should have Type 1, Type 3, and Type 7 LSAs.- Stub area
0.0.0.2should have Type 1 and Type 3 LSAs.- Area
0.0.0.3should have Type 1, Type 3, Type 4, and Type 5 LSAs.Steps To Take
To verify that routers are adjacent and have the correct exchange of LSAs, follow these steps: