Sub topic 15
Verifying Neighbors, Interfaces, Database, and Routes
This chapter assumes you can configure basic OSPF (router ID, ip ospf per interface, areas) and know the neighbor states from Down to Full. Here you use four show commands to confirm that OSPF is working, in the order that finds problems fastest.
The verification order
Work from the bottom up. Each layer depends on the one before it.
show ip ospf neighbor
show ip ospf interface brief
show ip ospf database
show ip route ospf1. Interfaces
show ip ospf interface brief lists every interface running OSPF. Check these columns:
- Area: the interface is in the area you intended.
- Cost: matches your design, such as the manual cost of 20 on Gi0/1.
- State:
P2P,DR,BDR, orDROTHER. AWAITstate means the router is still waiting to learn the DR. - Nbrs F/C: fully adjacent neighbors over total neighbors found.
A passive interface still appears here. It advertises its network but has zero neighbors, which is correct.
2. Neighbors
show ip ospf neighbor shows the neighbor ID, priority, state, dead time, address, and interface.
| State shown | Meaning |
|---|---|
| `FULL/ -` | Fully adjacent on a point-to-point link (no DR role) |
| `FULL/DR` or `FULL/BDR` | Adjacent with the DR or BDR |
| `2WAY/DROTHER` | Normal between two non-DR routers on a broadcast segment |
| `INIT`, `EXSTART`, `EXCHANGE` | Stalled. Look for a mismatch or an MTU problem |
2WAY/DROTHER is not an error. A neighbor missing from the list means Hellos are not being exchanged at all.
3. Database
show ip ospf database groups LSAs by area and type: Router Link States (Type 1), Net Link States (Type 2), Summary Net Link States (Type 3), and so on. Each router in the area should have one Type 1 LSA. If one is missing, the router is not Full with the rest of the area. Also compare the Age and Seq# fields across routers. A sequence number that climbs quickly means an unstable link is re-originating the LSA.
4. Routes
show ip route ospf lists routes OSPF installed. Codes tell you the route type:
O: intra-areaO IA: inter-areaO E1andO E2: external
The bracketed [110/cost] shows administrative distance 110 and the total path cost. If the database holds an LSA but the route is absent, look for a better route from another source, or for a next hop that is not reachable.
Reading a result
Suppose R1 shows a neighbor in FULL/ - on Gi0/0 and the database lists three Type 1 LSAs, but show ip route ospf lacks 192.168.1.0/24, which hangs off R1's own passive Gi0/2. R1's own connected network never appears as an OSPF route on R1, so check it from another router instead. That router should show O 192.168.1.0/24.
Exercise
A broadcast segment has three routers. Router B shows 2WAY/DROTHER for router C and FULL/DR for router A. Is anything wrong?
Show answer
No. Two routers that are neither DR nor BDR stay in 2-Way with each other and only become Full with the DR and BDR. This is normal.
Exercise
The database shows a Type 1 LSA from 3.3.3.3, but show ip route ospf has no route to the networks that router advertises. Which two causes do you check first?
Show answer
A better route from another source (lower administrative distance) is installed instead, or the next hop toward 3.3.3.3 is unreachable.