Diagram illustrating equal-cost load balancing and EIGRP unequal-cost load balancing with routers R1, R2, and R3.

What is Network Load Balancing

Routers use administrative distance (AD) to prioritize routes learned from different routing protocols when multiple paths to a destination exist. AD is a value assigned to each routing protocol, with lower values indicating higher preference (e.g., EIGRP AD is 90, OSPF AD is 110).

If multiple paths exist within the same protocol (same AD), the router uses the protocol-specific metric to select the best path(s). For example, EIGRP uses a composite metric based on bandwidth, delay, reliability, load, and MTU, while OSPF uses cost based on interface bandwidth. If multiple paths have equal metrics, the router installs all such paths in the routing table for equal-cost load balancing.

Routing ProtocolAdministrative Distance
Connected0
Static1
EIGRP (Internal)90
OSPF110
RIP120
EIGRP (External)170

To perform equal-cost load balancing, a router requires multiple paths to the same destination through a single routing protocol, with each path having the same administrative distance (AD) and metric. Protocols like EIGRP, OSPF, and BGP support equal-cost load balancing. For example:

  • EIGRP: Installs up to 4 equal-cost paths by default (configurable up to 32 with maximum-paths).
  • OSPF: Installs up to 4 equal-cost paths based on interface cost (configurable up to 32).
  • BGP: Supports equal-cost multipath (ECMP) for iBGP or eBGP with maximum-paths.

When multiple equal-cost paths are available, the router installs all of them in the routing table and distributes traffic across them using per-destination or per-packet load balancing. To verify equal-cost paths, use the show ip route command:

Router# show ip route 192.168.1.0 Routing entry for 192.168.1.0/24 Known via "eigrp 100", distance 90, metric 307200 Last update from 10.1.1.2 on GigabitEthernet0/0, 00:00:05 ago Last update from 10.1.2.2 on GigabitEthernet0/1, 00:00:05 ago * 10.1.1.2, via GigabitEthernet0/0 * 10.1.2.2, via GigabitEthernet0/1

The router calculates multiple routes to a destination with metrics, and the shortest path is installed in the routing table. If the destination has more than one path with the same administrative distance and a metric value, all least-metric and same routes are installed in the routing table.

Network Topology for Equal-Cost Load Balancing

Below is a diagram showing a router (R1) with two equal-cost paths to a destination network (192.168.1.0/24) via two neighbors (R2 and R3).

A clear diagram illustrating network load Balancing showing Router R1 forwarding traffic to the destination network 192.168.1.0/24 via two equal-cost paths through Router R2 and Router R3.
Network topology showing Router R1 load balancing traffic to 192.168.1.0/24 via two equal-cost paths through R2 and R3.

EIGRP Unequal-Cost Load Balancing

Unlike other routing protocols, EIGRP supports unequal-cost load balancing, allowing paths with different metrics to be used for It. This is configured using the variance command, which specifies a multiplier for the best metric. Paths with metrics up to variance * best metric are included in the routing table, provided they meet the feasibility condition (the advertised distance of the path is less than the feasible distance of the best path).

Configuration Example: Suppose a router has two paths to 192.168.1.0/24:

  • Path 1 (via 10.1.1.2): Metric = 307200
  • Path 2 (via 10.1.2.2): Metric = 614400

To enable unequal-cost load balancing with a variance of 2 (allowing paths with metrics up to 2 * 307200 = 614400), configure:

Router(config)# router eigrp 100 Router(config-router)# variance 2 Router(config-router)# maximum-paths 4

Verification

Router# show ip route 192.168.1.0 Routing entry for 192.168.1.0/24 Known via "eigrp 100", distance 90, metric 307200 Last update from 10.1.1.2 on GigabitEthernet0/0, 00:00:05 ago Last update from 10.1.2.2 on GigabitEthernet0/1, 00:00:05 ago * 10.1.1.2, via GigabitEthernet0/0 (307200/281600) * 10.1.2.2, via GigabitEthernet0/1 (614400/588800)

We can configure EIGRP to install multiple paths even if the metric is unequal. This is the only protocol that supports unequal cost load balancing. The Cisco router uses two types for balancing the network load: per-destination basis and per-packet basis. Balancing the load also depends on the switching mechanism configured on the router interface.

Switching Mechanisms and Load Balancing

The efficiency of load balancing depends on the router’s switching mechanism, which determines how packets are forwarded. Cisco routers support two main methods:

  • Process Switching: The CPU processes each packet individually, consulting the routing table. This is slow and not suitable for high-speed load balancing, as it increases CPU load and latency.
  • Cisco Express Forwarding (CEF): CEF pre-builds a Forwarding Information Base (FIB) and adjacency table, enabling fast, hardware-based forwarding. CEF is the default on most modern Cisco routers and is essential for efficient per-destination and per-packet load balancing.

CEF and Load Balancing:

  • Per-Destination Load Balancing: CEF uses a hash of the source and destination IP addresses to select an outgoing interface, ensuring all packets for a given flow use the same path (default behavior).
  • Per-Packet Load Balancing: CEF alternates packets across available paths, ensuring equal utilization but potentially causing out-of-order packets. Enable with:

Router(config-if)# ip load-sharing per-packet

Verification

Router# show cef interface GigabitEthernet0/0 GigabitEthernet0/0 is up (if_number 2) IP CEF switching enabled IP CEF load sharing: per-destination

Per-destination load balancing

In this type, the router distributes the packets based on the destination address, distributes all packets for a specific destination over the first path, and uses the second path for the second destination on that same network. For most Cisco routers, per-destination load balancing is the default technique.

Per-Packet load balancing

In this type, the router sends one packet for the same destination over the first path, and the second packet for the same destination over the second path, and so on. Per-Packet guarantees equal load across all links.

Troubleshooting Load Balancing

Load balancing issues can arise due to misconfigurations or network conditions. Below are common problems and solutions:

Unequal-Cost Paths Not Used in EIGRP:

  • Problem: Only the best path is used despite configuring variance.
  • Solution: Ensure the alternate path meets the feasibility condition (advertised distance < feasible distance of the best path). Verify with show ip eigrp topology.

Command

Router# show ip eigrp topology 192.168.1.0

Load Balancing Not Occurring:

  • Problem: Traffic uses only one path despite multiple equal-cost paths in the routing table.
  • Solution: Check if CEF is enabled (show cef interface) and ensure load sharing is set to per-destination or per-packet.

Command

Router(config-if)# ip load-sharing per-packet

Out-of-Order Packets with Per-Packet Load Balancing:

  • Problem: Applications experience issues due to packets arriving out of order.
  • Solution: Switch to per-destination load balancing, as per-packet can disrupt sensitive applications like VoIP.

Command

Router(config-if)# no ip load-sharing per-packet

Avatar of Asad Ijaz

Asad Ijaz

NetworkUstad's lead networking architect with CCIE certification. Specializes in CCNA exam preparation and enterprise network design. Authored 2,800+ technical guides on Cisco systems, BGP routing, and network security protocols since 2018. Picture this: I'm not just someone who writes about tech; I'm a certified expert in the field. I proudly hold the titles of Cisco Certified Network Professional (CCNP) and Cisco Certified Network Associate (CCNA). So, when I talk about networking, I'm not just whistling in the dark; I know my stuff! My website is like a treasure trove of knowledge. You'll find a plethora of articles and tutorials covering a wide range of topics related to networking and cybersecurity. It's not just a website; it's a learning hub for anyone who's eager to dive into the world of bits, bytes, and secure connections. And here's a fun fact: I'm not a lone wolf in this journey. I'm a proud member and Editor of Team NetworkUstad. Together, we're on a mission to empower people with the knowledge they need to navigate the digital landscape safely and effectively. So, if you're ready to embark on a tech-savvy adventure, stick around with me, Asad Ijaz Khattak. We're going to unravel the mysteries of technology, one article at a time!"