On this post, I will try to show how OSPF behaves when there are two equal cost paths towards a destination. To demonstrate this, I have prepared my usual topology.

On this topology all routers are running OSPF but our focus is on the router J32 which is circled at the bottom and our destination network is 172.40.1.0/24 Since we have set the reference bandwidth to 10G and each links are 1G a single link OSPF cost is 10. Now let’s see how J32 device reaches this destination network.

We can see that metric towards this destination is 40 and OSPF lists both routes but are we really using them? Let's check the forwarding table. The important thing here is also that if one of the path's metric was higher, we wouldn't see it here in the list. We only see the paths if they have equal paths.

Bingo! we have installed both next hops on the forwarding table which actually means J32 router should load balance the flows towards this destination. How the load balancing algorithm works is out of the scope of this post.

Now we will play a bit with the cost of the links to demonstrate that OSPF installs only the best path.

I am just increasing the metric to 20 from 10 which should make the total cost equal to 50 on the north PATH#1

Related

Worked for more than 10 years as a Network/Support Engineer and also interested in Python, Linux, Security and SD-WAN, currently living in the Netherlands and works as a Network Support Engineer.
// JNCIE-SEC #223 / RHCE / PCNSE