This article provides troubleshooting guidelines to follow when continuous ospf route flap is observed.
Topology:
[lo0.0/RID:1.1.1.1/32] [lo0.0/RID:2.2.2.2/32] [lo0.0/RID:3.3.3.3/32]
R1-----------10.10.10.0/24-----------R2------------20.20.20.0/24----------R3
R1-----------
-----------R2------------20.20.20.0/24----------R3
|
30.30.30.0/24
R4
R4 advertises the connected network 30.30.30.0/24 through OSPF. The route for this particular network was seen to be flapping in the R1.
The output of "show ospf route | match 30.30.30.0" showed the route installed and uninstalled constantly in the routing table.
user@R1> show ospf route |match 30.30.30.0 |refresh 2 ---(refreshed at 2024-01-15 10:54:21 UTC)--- <<<<<<<<<<< No route found in o/p ---(refreshed at 2024-01-15 10:54:23 UTC)--- 30.30.30.0/24 Intra Network IP 2 ge-0/0/0.0 10.10.10.12 <<<<<<<<<<< Route installed ---(refreshed at 2024-01-15 10:54:25 UTC)--- 30.30.30.0/24 Intra Network IP 2 ge-0/0/0.0 10.10.10.12 ---(refreshed at 2024-01-15 10:54:27 UTC)--- 30.30.30.0/24 Intra Network IP 2 ge-0/0/0.0 10.10.10.12 ---(refreshed at 2024-01-15 10:54:29 UTC)--- 30.30.30.0/24 Intra Network IP 2 ge-0/0/0.0 10.10.10.12 ---(refreshed at 2024-01-15 10:54:31 UTC)--- 30.30.30.0/24 Intra Network IP 2 ge-0/0/0.0 10.10.10.12 ---(refreshed at 2024-01-15 10:54:33 UTC)--- 30.30.30.0/24 Intra Network IP 2 ge-0/0/0.0 10.10.10.12 ---(refreshed at 2024-01-15 10:54:35 UTC)--- ---(refreshed at 2024-01-15 10:54:37 UTC)--- <<<<<<<<<<< Route uninstalled again ---(refreshed at 2024-01-15 10:54:39 UTC)---
You will see "Full SPF runs" count incrementing.
user@R1> show ospf overview |match " Full SPF runs" |refresh 4 ---(refreshed at 2024-01-15 11:41:02 UTC)--- Full SPF runs: 1659 ---(refreshed at 2024-01-15 11:41:06 UTC)--- Full SPF runs: 1660 ---(refreshed at 2024-01-15 11:41:10 UTC)--- Full SPF runs: 1660 ---(refreshed at 2024-01-15 11:41:14 UTC)--- Full SPF runs: 1663 ---(refreshed at 2024-01-15 11:41:18 UTC)--- Full SPF runs: 1664 ---(refreshed at 2024-01-15 11:41:22 UTC)--- Full SPF runs: 1666 ---(refreshed at 2024-01-15 11:41:26 UTC)--- Full SPF runs: 1669 ---(refreshed at 2024-01-15 11:41:30 UTC)--- Full SPF runs: 1672
Check how OSPF neighbors are formed in the R2, by command "show ospf neighbor":
user@R2> show ospf neighbor Address Interface State ID Pri Dead 10.10.10.11 xe-0/0/0.0 Full 1.1.1.1 128 38 20.20.20.12 xe-0/0/1.0 Full 3.3.3.3 128 30 30.30.30.12 xe-0/0/2.0 Full 3.3.3.3 128 38
Looking at the o/p we can see 2 neighbors R3 and R4 have same RID 3.3.3.3 . This will cause the Intra-SPF to be run continuously on the device and hence flap the routes learned from those neighbors.
This issue is caused by using the same router-id on multiple devices, which are forming neighbor/adjacencies with this R2. In OSPF, no two neighbors should have same neighbor router-id. The solution is to configure a unique router-id per neighbor.
Verifying and Monitoring OSPF Configuration