Load balancing distributes network traffic across multiple paths to optimize resource utilization, maximize throughput, minimize response time, and avoid overload of any single link. Routers use this technique when multiple equal-cost paths exist to the same destination.
Types of Load Balancing
- Equal-Cost Multi-Path (ECMP) - Default behavior when multiple routes have identical metric values
- Unequal-Cost Load Balancing - Advanced feature (like EIGRP’s variance command) that allows load sharing across paths with different metrics
- Per-Packet Load Balancing - Deprecated due to packet reordering issues; sends packets round-robin across available paths
- Per-Destination Load Balancing - Default method; uses source/destination IP hash to determine path (maintains packet order)
Load Balancing by Routing Protocol
| Protocol | Default Paths | Maximum Paths | Load Balancing Type |
|---|---|---|---|
| RIP | 4 | 16 | Equal-cost only |
| OSPF | 4 | 16 | Equal-cost only |
| EIGRP | 4 | 32 | Equal and unequal-cost |
| BGP | 1 | 32 | Equal-cost only |
EIGRP Unequal-Cost Load Balancing
EIGRP uniquely supports unequal-cost load balancing through the variance multiplier:
- Variance value multiplied by best route’s FD (Feasible Distance) creates threshold
- Any feasible successor with metric ≤ (variance × best FD) can be used
- Default variance = 1 (equal-cost only)
- Maximum variance = 128
Example: If best route FD = 1000 and variance = 2, routes with FD ≤ 2000 can load balance
Load Balancing Methods
- Process Switching - CPU examines each packet individually (slowest, most accurate)
- Fast Switching - First packet processed, subsequent packets use cache (per-destination default)
- Cisco Express Forwarding (CEF) - Hardware-based switching with load balancing algorithms
CEF Load Balancing Algorithms
- Per-destination - Hash based on destination IP (default)
- Per-source-destination - Hash includes both source and destination IP
- Per-packet - Round-robin distribution (avoid in production - causes packet reordering)
Vocabulary
- Feasible Distance (FD) - EIGRP’s best metric to reach destination network
- Feasible Successor - Backup route that meets feasibility condition (AD < FD of successor)
- Hash Algorithm - Mathematical function converting IP addresses to consistent path selection
- Variance - EIGRP multiplier enabling unequal-cost load balancing
Configuration Examples
|
|
Notes
- Load balancing only occurs when multiple routes exist in routing table - if protocol installs only best route, no load balancing possible
- BGP typically installs single best path by default; use
maximum-pathsto enable ECMP - Unequal-cost load balancing can create suboptimal routing if not carefully planned (traffic may prefer longer paths)
- Per-packet load balancing causes TCP performance issues due to packet reordering - mission-critical applications will suffer
- Load balancing effectiveness depends on traffic patterns - single large flow cannot be split across multiple paths
- Use
show ip routeto verify multiple paths installed; look for multiple next-hop entries - CEF switching required for optimal load balancing performance in modern networks
- Consider link utilization monitoring when implementing load balancing - equal metrics don’t guarantee equal link capacity