06-06-2017 08:01 AM - edited 03-05-2019 08:39 AM
I have a Router R5 who is connected to a Layer2 Switch. Over this Layer2 Switch R5 builds neighborships to two other OSPF-enabled Router; R1 and R2. So R5 has two OSPF neighbors behind the same interface:
R5#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 1 FULL/DR 00:00:04 172.16.0.1 GigabitEthernet0/0
10.10.10.2 1 FULL/BDR 00:00:04 172.16.0.2 GigabitEthernet0/0
Assume that R1 and R2 announces the same Prefix with the same OSPF metric, then R5 will do a load-balancing to this subnet over both routers:
R5#sh ip route 10.10.10.4
Routing entry for 10.10.10.4/32
Known via "ospf 500", distance 110, metric 3, type inter area
Last update from 172.16.0.1 on GigabitEthernet0/0, 00:00:20 ago
Routing Descriptor Blocks:
* 172.16.0.2, from 10.10.10.2, 00:00:20 ago, via GigabitEthernet0/0
Route metric is 3, traffic share count is 1
172.16.0.1, from 10.10.10.1, 00:00:20 ago, via GigabitEthernet0/0
Route metric is 3, traffic share count is 1
This is true, as long maximum-paths is two or higher. When I now configure maximum-paths to 1, then just one route is in the routing table:
R5#sh ip route 10.10.10.4
Routing entry for 10.10.10.4/32
Known via "ospf 500", distance 110, metric 3, type inter area
Last update from 172.16.0.2 on GigabitEthernet0/0, 00:00:04 ago
Routing Descriptor Blocks:
* 172.16.0.2, from 10.10.10.2, 00:00:04 ago, via GigabitEthernet0/0
Route metric is 3, traffic share count is 1
This is all easy to understand. So now my question: What is the Tie-Breaker, that the route over 172.16.0.2 is chosen and not the route over 172.16.0.1? Is the Tie-Breaker the (higher) next-hop IP address, the (higher) ospf-router ID or something else? Is this defined by the RFC?
06-06-2017 09:59 AM
Hi
The ospf router id is the tie breaker for ospf selection. It will prefer the lowest router-id, you can execute clear ip ospf process [press Yes] ("if it is not on production you can execute it" otherwise don't, because it will reset the relationship with the other OSPF routers). So you will see that your router will prefer the path with router-id 10.0.0.1
:-)
06-06-2017 09:59 AM
Years ago, I bumped into 6 equal cost routes with max paths set to the default of 4. At that time, it looked to me final result was determined early on in the OSPF route selection process and it acted as being inconsistent. I expected it may have (then) depended on arrival sequence of LSA info. I considered it a bug, but instead of chasing issue with Cisco, I just increased max paths to 6.
Hopefully, what Julio notes now holds true.
06-07-2017 12:04 AM
I agree with you. I made some tests with 15.2(4)M7 (CISCO7206VXR in a GNS3 Simulator)
When I restart the OSPF process on R1 or R2, then R5 will use the other router as next-hop. It looks like R5 uses the next-hop, that he knows longer.
When I restart the OSPF process on R5, than he use always this route
* 172.16.0.2, from 10.10.10.2, 00:00:30 ago, via GigabitEthernet0/0
and not
* 172.16.0.1, from 10.10.10.1, 00:00:32 ago, via GigabitEthernet0/0
I restarted the process on R5 multiple times and each time he took the same route.
06-07-2017 03:35 AM
I see, R1 and R2 area on the same area 0 but the prefix is on different area, is that correct?
06-07-2017 03:42 AM
Yes, R1 and R2 are ABR's
172.16.0.0/24 (R1, R2 and R5) is in one standard non-backbone area.
R1, R2 and some other routers behind them, also the router from where 10.10.10.4/32 is coming, are in area 0
06-07-2017 04:38 AM
Thank you, currently you have an equal loadbalancing, if maximun-path is applied it should prefer the higher router-id, try to configure on R1 router-id 11.11.11.11 (instead 10.10.10.1) then clear ospf process on R1 and R5.
May I know your configurations?
09-10-2019 01:57 PM
That is not the tie breaker
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide