How does EtherChannel load balancing work, and why is one link often busier than the others?
Show the answer
Say this first
It does not spread packets round robin. Each switch hashes fields of every frame, such as MACs, IPs or
layer 4 ports, into a bucket that maps to one member, so a flow always uses one link and stays in order.
The spread is only as good as the variety in the hashed fields: hash on MACs toward a single router and
nearly everything lands on one link. Each side hashes its own outbound traffic, so I set the method on
both ends; Catalyst sets it globally with port-channel load-balance.
Go deeper
Choosing inputs
| Method | Good when |
|---|---|
src-mac, dst-mac, src-dst-mac | Many hosts talk across a pure layer 2 bundle |
src-dst-ip | Routed traffic, or few MACs but many IPs |
Layer 4 options (src-dst-port, or mixed IP and port on newer platforms) | Few hosts with many sessions, such as server to backup target |
Defaults vary by platform, and many Catalyst switches default to a MAC-based method, so check and change it.
DSW1(config)# port-channel load-balance src-dst-ipDSW1# show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
DSW1# test etherchannel load-balance interface port-channel 1 ip 10.10.0.10 10.20.0.10
Would select Gi1/0/48 of Po1Why 2, 4 or 8 links
Many Catalyst ASICs hash into 8 buckets. With 2, 4 or 8 members each gets an equal share. With 3 members the split is 3:3:2; with 5 it is 2:2:2:1:1.
Polarization
If every layer in a design uses the same hash on the same fields, the second layer receives only flows that already hashed one way, and some of its links sit idle. Use different inputs at different layers, or a per-switch hash seed where the platform offers one.
They will ask next
One backup job saturates one member while the other is idle. Can hashing fix it?
Not for a single flow: one TCP session always maps to one link, so it tops out at one member's speed. Run parallel streams with a layer 4 hash, or move to faster links.
Traps
- Expecting a 2 x 10G bundle to give one TCP session 20 Gbps.