All-Access Pass to our Courses just Started!
Dozens of courses, thousands of hour videos, many vendors and technologies!
Send an email to [email protected] for more information

OSPF Load Balancing

Safe Article

OSPF Load Balancing is to place multiple next-hops into the Routing and Forwarding table for a given IP destination prefix. In this post, we will look at OSPF Load Balancing, OSPF Load Sharing, OSPF ECMP, OSPF UCMP, where we should use it, where we shouldn’t use it, and what can be dangerous if we have OSPF Load balancing will be explained.

OSPF Equal Cost Load Balancing – OSPF ECMP

What is OSPF Equal Cost Load Balancing let’s have a look at the below topology and let’s try to understand?

OSPF ECMP

In the above topology, the 192.168.0.0/24 network is connected to Router D.

As a link-state routing protocol, OSPF routers in the network would know that the 192.168.0.0/24 subnet is connected to Router D.

And they would run SPF/Dijkstra algorithm to calculate the shortest path to this destination.

In the above topology, Interface costs are shown.

When we look at Router A to 192.168.0.0/24 subnet, we have two paths. A-B-D and A-C-D.

Both of the paths’ total cost is 10+10 = 20.

Thus, Router A can do load balancing for that destination prefix.

When OSPF has two paths, we don’t need to enter manually any command, it installs the next hops into the routing table automatically.

So, in the above topology, Router A installs both Router B and Router C into its routing table as the next hops for the destination subnet 192.168.0.0/24.

This is called OSPF ECMP – OSPF Equal Cost Multipath, OSPF Load Balancing, or OSPF Load Sharing, basically all are the same thing.

It is called ECMP, because both paths’ total cumulative costs are equal, which is 20 in the above topology.

OSPF Unequal Cost Multi Path

This time, let’s have a look at OSPF UCMP, Unequal Cost Multi-Path.

OSPF doesn’t normally support UCMP. In the IEFT there was a Draft for it but never got implemented.

Today, if you have an OSPF network and want to use available paths but their cumulative costs are not the same, you can do PBR – Policy-Based routing, you can deploy RSVP or Segment Routing Traffic Engineering to push the traffic to the non-shortest paths as well.

Otherwise, if cumulative costs are not the same, only the shortest path is used.

Did you find the article helpful?

Share Now

Share on facebook
Share on twitter
Share on whatsapp
Share on telegram

Frequently Asked Questions About OSPF Load Balancing

Related Courses