Why "Link Aggregation/Port-Channel" cannot achieve load balance theoretical value? Follow
Port Trunking application scenario
Foreword
People often ask, why can't I achieve transmission theoretical value after enabling "Link Aggregation/Port-Channel" load balance? Even, the packet traffic always was sent on port A?
We have to know: port channel load balance is based on the "Hash mechanism" to select which port to transmit packet.
Support Models
ECS4620 series, ECS4510 series, ECS4120 series, ECS4100 series, ECS5520 series, ECS4530 series, ECS2100 series, ECS2110 series, ECS3510 series
Edgecore valid load-balancing hash values are as follows
dst-ip distribution on the destination IP address
dst-mac distribution on the destination MAC address
src-dst-ip distribution on the source and destination IP address (SIP XOR DIP)
src-dst-mac distribution on the source and destination MAC address (SA XOR DA)
src-ip distribution on the source IP address
src-mac distribution on the source MAC address
Default hash value
src-dst-mac
CLI
Setup load balance to src-dst-mac mode:
Console#config
Console(config)#port-channel load-balance ?
dst-ip Selection based on destination IP address
dst-mac Selection based on destination MAC address
src-dst-ip Selection based on source and destination IP address
src-dst-mac Selection based on source and destination MAC address
src-ip Selection based on source IP address
src-mac Selection based on source MAC address
Console(config)#port-channel load-balance src-dst-mac
Console(config)#exit
Show load balance type of switch:
Console#show port-channel load-balance
Trunk Load Balance Mode: Source and destination MAC address
Hands-on
This is general application, client download file from server, we use TestCenter to simulate an experiment via port-channel load-balance “src-dst-mac” and “src-mac”, then compare the differences.
TestCenter Port 4/4
- Simulate file server A and B.
TestCenter Port 4/3
- Simulate 10 clients.
- Test default configuration “src-dst-mac”
- The packet flow is concentrated in one port, load balance result did not meet expectations. (TX: 200 Mbps; RX: 100 Mbps)
- Modify load balance configuration to “src-mac”
- The packet flow is distributed in two ports, load balance appear. (TX: 200 Mbps; RX: 200 Mbps)
Conclusion
The packet load balance depends on chip configuration, three bits (the LSBs) are used to index trunk table to choose one of port.
SIP and DIP criteria are used for IPv4 packets, for other packets the selection falls back to criteria based on the equivalent MAC address.
The usual way to do the load balance is “src-dst-mac”, so to test if the load balance is work, you must have a good SA or DA to XOR.
Of course in normal condition, we don’t have continuous MAC Address situation unless whole lot shipment. If load balance does not work well, you can try different hash to improve result as above experiment.
Relevant knowledge
Comments
0 comments
Please sign in to leave a comment.