Assume you have either of the following setups. A single router (R3) with multiple links, either to the same upstream router (R2) or to 2 different upstream routers(R2+R4). And you want to load-share traffic across both links outbound (direction from left to right). Obviously the routing table needs multiple outgoing links as next-hops to perform the desired balancing. The command maximum-paths specifies how many paths or next hops are allowed per prefix in the routing table for a specific routing protocol, else default behavior dictates only the best route from each routing protocol which are candidate for insertion into the routing table.
Since the links terminate on the same router (R3) you have the following options:
- Per-Destination Load-Sharing using Fast Switching
- Per-Source-Destination Load-Sharing using CEF
- Per-Packet Load-Balancing using Process Switching
- Per-Packet Load-Balancing using CEF
You need to be aware that IOS makes switching decisions based on the configuration of the inbound interface first. If CEF is configured on an inbound interface, the packets will be CEF switched regardless of the configuration on the outbound interface. CEF is ONLY used if enabled on the inbound interface. If CEF is not configured on the inbound interface, the configuration of the exit interface determines the switching method. The following table illustrates the different behaviors:
|Inbound Configuration||Outbound Configuration||Switching Method Used|
Refer to the following article, for more info about the Switching Types and how to enable each.