Tuesday, October 20, 2015

Etherchannel load balancing decision


                                  Ether Channel as most of you know allows multiple physical Ethernet links to combine into one logical channel. Advantage is not only it allows load sharing of traffic among the links in the channel but  redundancy in the event that one or more links in the channel fail.




How the traffic flows over the physical links bundled is the key topic.Ether channel uses a hash algorithm to achieve this task. Hash algorithm computes a value in the range 0 to 7 and this result  is called a Result Bundle Hash (RBH). Only on this value a particular port is chosen. Hashing algorithm is deterministic; if you use the same addresses and session information, you always hash to the same port in the channel. This method prevents out of order packet delivery.

Below table displays the ratio value each port accepts. Maximum ports than can be bundled is  8.


Number of Ports in the EtherChannel
Load Balancing
8
1:1:1:1:1:1:1:1
7
2:1:1:1:1:1:1
6
2:2:1:1:1:1
5
2:2:2:1:1
4
2:2:2:2
3
3:3:2
2
4:4


Ether-channel load balancing can use MAC addresses, IP addresses, or Layer 4 port numbers and you should be very careful while choosing one. Once applied this implies to all the ether-channels on the switch.Below command can be used to check the load balancing method used on the switch.

sh etherchannel load-balance

Lets take few examples analyzing traffic and what method suits best for load balancing to work effectively.

1. Users are sending files to same file share.
   If destination MAC address is used then it results in the choice of the same link in the channel each time.
   It is good to used source MAC or IP address for better load sharing.

2. Communication is between two hosts with different port numbers
    In this scenario use of IP address or MAC will result in overloading one link in the bundle. Load balancing     can be achieved only when port numbers are used.

Identifying the physical interface from a bundle for a particular flow  is very useful when troubleshooting issues in a switched environment. Few days back i came across a issue which explains the importance of finding the physical interface from a bundle. Ether channel is built between two 65xx switches and each physical interface is terminated on different module(2 and 3). A layer 3 VLAN is configured on the switches with HSRP. Few host machines on the same segment became unreachable from standby switch. Upon further troubleshooting we identified any traffic flowing on physical  interface in module 2 of the bunlde was unreachable where as the one's flowing on interface in module 3 were reachable.We tried replacing the GBIC,cable etc but the result remained the same until we reseated module-2.


Command to check which physical interface from the bundle the algorithm selects is model specific and listed in URL mentioned in further reading.





Further Reading:
http://www.cisco.com/c/en/us/support/docs/lan-switching/etherchannel/116385-technote-etherchannel-00.html

No comments:

Post a Comment