OSPF Load Balancing

April 6, 2022
3 min read

OrhanErgun

Table of Contents

Quick navigation2 sections

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?


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.

OrhanErgun

About the Author

OrhanErgun

He created OrhanErgun.Net 10 years ago and has been serving the IT industry with his renowned and awarded training.

Wrote many books, mostly on Network Design, joined many IETF RFCs, gave Public talks at many Forums, and mentored thousands of his students.  

Today, with his carefully selected instructors, OrhanErgun.Net is providing IT courses to tens of thousands of IT engineers.

Share this Article

Related Articles

IGPMay 17, 2024

IS-IS vs. BGP: Which Routing Protocol Wins for Scalability?

In the world of network routing, choosing the right protocol can make or break the scalability and efficiency of your network. Two heavyweight contenders in this arena are Intermediate System...

Read Article
IGPMay 17, 2024

OSPF vs IS-IS Routing Protocols: A Detailed Comparison

OSPF vs IS-IS Routing Protocols: A Detailed Comparison In the world of network design and implementation, choosing the right routing protocol is crucial for building efficient, scalable, and robust networks....

Read Article
IGPMay 17, 2024

Understanding IS-IS Routing Protocol: A Beginner's Guide

The Intermediate System to Intermediate System (IS-IS) routing protocol might not crowd the limelight as much as its counterparts like OSPF or BGP, but its role in large scale network...

Read Article
IGPMay 8, 2024

BFD vs. OSPF: A Comparison

In the complex landscape of network protocols, understanding the dynamics and functionalities of each component is crucial for optimizing network performance and reliability. Bidirectional Forwarding Detection (BFD) and Open Shortest...

Read Article
IGPApril 17, 2022

IS-IS Routing Ptrotocol

IS-IS is a link-state routing protocol, similar to OSPF. If you are looking for Service Provider grade, MPLS Traffic Engineering support, and extendible routing protocol for easier future migration then...

Read Article
IGPApril 8, 2022

OSPF LSA Types Explained 11 Types of LSA in OSPF!

OSPF LSA Types is the first topic you need to understand if you are trying to understand OSPF routing protocol. There are 11 different types of LSA in OSPF and...

Read Article

Subscribe for Exclusive Deals & Promotions

Stay informed about special discounts, limited-time offers, and promotional campaigns. Be the first to know when we launch new deals!