To address the need for high availability and scalability, networks often use multiple parallel links. To provide aggregate bandwidth greater than that available with a single link, parallel links are used. Load balancing occurs when traffic destined to a network is forwarded over multiple parallel paths.
Routers prefer routes learned through protocols with lower administrative distance. For load balancing to work, the parallel routes are learned through a single routing protocol. This protocol should have the least administrative distance among all the routing protocols running on the router.
These multiple routes to a destination are compared by their metrics, and the shortest path is installed in the routing table. If there is more than one path with the same least metric value, all least-metric routes are installed in the routing table. Some protocols, such as Enhanced Interior Gateway Routing Protocol (EIGRP), can be configured to install multiple paths. This may occur even if the paths are not of equal metric.
To determine the number of routes that be installed based on the value configured for the protocol, issue the maximum-paths command. The maximum number of parallel paths installed is Cisco IOS Software and protocol dependent.
Once multiple paths are installed, routers will load balance on the paths on a per-packet or per-destination basis. A router load balancing on a per-packet basis uses the parallel paths in a round-robin fashion, only forwarding a single packet on a path before moving on to the next one. A router load balancing on a per-destination basis uses the parallel routes in a round-robin fashion, but forwards an entire destination-based flow in each pass. Per-packet or per-destination load balancing is dependent on the switching mechanism configured on the interface.
Interfaces configured for process switching load balance on a per-packet basis. Interfaces configured for fast or optimum switching load balance on a per-destination basis. Meanwhile, interfaces configured for Cisco Express Forwarding (CEF) can load balance on a per-packet basis or per-source-destination basis.