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 ECMPWhat is OSPF Equal Cost Load Balancing let's have a look at the below topology and let's try to understand?
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.