Sunday, May 27, 2012

OSPF router is not using the adjacent neighbors’ highest loopback as Neighbor ID

AKA, configuring the loopback after creating the OSPF process...

Network Topology (focusing on routers R4 and R5):


I configured ospf on routers R4 & R5 and they formed a neighborship. But when I looked at R4’s neighbors (show ip ospf neigh) I noticed that the neighbor id for R5 is R5’s serial interface (10.1.12.1), not R5’s loopback interface (5.5.5.5)…


(show ip ospf neighbor command on R4 shows R5’s neighbor id as R5’s s0/0 interface (10.1.12.1), not
it’s loopback interface 5.5.5.5)





(show ip protocols on R5 confirms the RID on R5 IS its s0/0 interface ip address)

I was puzzled until I went over the timeline of my configs and remembered that I configured R5’s loopback AFTER I configured ospf. So, R5 choose it’s highest ip address of any non-loopback interface (note, I did not assign a RID nor were there any loopbacks for R5 at the time of configuring ospf)

To fix this I had some choices:
·         Delete and reconfigure the ospf process: R5 (config)# no router ospf 1
·         Manually assign a router id: R5 (config-router)# router id rid-value
·         Restart the ospf process: R5# clear ip ospf process


Originally I was going to restart the ospf process… but then became curious; if I did  assign a router id, would it take and would I still have to restart the ospf process or would the adjacencies tear down automatically?

And the answer is…




I still needed to restart the ospf process (doing a ‘show ip protocols’ confirmed the RID had not changed). After a restart,R5 now had the ‘expected’ RID and R4 showed R5’s loopback as its Neighbor ID.







Prosit!

No comments:

Post a Comment