Troubleshooting OSPF neighbor/adjacency issues
- January 24, 2024
- Posted by: Lyfey Technologies
- Category: Networking
Before two routers running OSPF protocol can start exchanging routes, they need to establish neighbor and adjacency relationships. Knowing which factors affect the establishment of the relationship can save you time.
For an OSPF adjacency peer to be established, the below requirements should be fulfilled.
1.Matching Area ID: For two connected routers to establish an adjacency, they should be configured with the same area ID. To simulate this, we advertise the network 23.23.23.0/31 into Area 1 instead of Area 0. The adjacency between R2 and R3 fails to come up. Run the command “display ospf error” on Huawei devices and you will see area ID mismatch counters increasing.
2. Matching OSPF timers. Hello and dead OSPF timers must match for adjacency to be established. To simulate this, we change the OSPF timer of GE0/0/1 on R2 to 30 and the peering between R2 and R3 goes down. Run display ospf errors on Huawei devices to see the cause. We observe an increase in Hello timer mismatch.
3. Matching subnet: The interface subnet mask must be the same on both interfaces that are negotiating OSPF adjacency. The subnet mask is exchanged in Hello packets and in case the subnet mask does not match, adjacency will not be formed. Change the prefix length on the device with a wider subnet mask so the prefix length will match with the device that has a narrower mask.
4. Matching MTU: If there is a mismatch on MTU on both sides of the link where OSPF runs, then the OSPF adjacency will not form because the MTU value is carried in the Database Description (DBD) packets and checked on the other side. The peering will be stuck in Exstart/Exchange State, which is a common indicator for MTU mismatch in OSPF.
5. Matching authentication: It is recommended to run OSPF authentication for your network to strengthen network security. However, misconfiguring authentication parameters between two routers will lead to adjacency not coming up.
6. Matching network type flags. An incompatible network can’t form an OSPF neighborship. There are several OSPF network types: Broadcast, Non-Broadcast, Point-to-Point, and Point-to-multipoint. It’s recommended to configure the same network type.
Here is a quick list of which combinations will form adjacencies:
1. Broadcast to Broadcast
Non-Broadcast to Non-Broadcast
Point-to-Point to Point-to-Point
Point-to-Multipoint to Point-to-Multipoint
Broadcast to Non-Broadcast (adjust hello/dead timers)
Point-to-Point to Point-to-Multipoint (adjust hello/dead timers)
7. OSPF Area Types: Area type Can be OSPF standard Area, STUB, NSSA, etc. The OSPF Area type should match to form OSPF neighborship. The area should be configured on all routers within an area. The OSPF adjacency between R1 and R2 goes down when we configure area 1 on R1 as a stub area.
8. Conflicting Router ID. If you configure the same router IDs for two OSPF routers, the adjacency will fail to come up. It is recommended to configure unique router IDs on routers running OSPF. For simulation, we configure the same router ID 2.2.2.2 on routers R1 and R2, the peering between them fails to establish and when we run display ospf error command, we observe an increase in Router ID confusion error packets. You must restart the OSPF process for the adjacency to come up using the new router ID.
[…] If you face any challenges when configuring OSPF in your lab, check out this article on OSPF troubleshooting OSPF troubleshooting guide […]