We have already discussed lot about basic information and configuration of ether-channel in part I and II, today we will briefly discuss about how does load-balancing works in ether-channel.
Most of us thinks that traffic sent across ether-channel is distributed equally among all ports participating in ether-channel or bonding.But this is not true, In Cisco, load-balancing is quite different on different platforms, because ether-channel use load-balancing algorithm to determine the port to sent the traffic out based on one of several criteria . Like,
As we have discussed earlier etherchannel only support up to eight active ports, amount of Traffic sharing or balancing is depend upon No of active ports are participating in etherchannel,Most of us thinks that traffic sent across ether-channel is distributed equally among all ports participating in ether-channel or bonding.But this is not true, In Cisco, load-balancing is quite different on different platforms, because ether-channel use load-balancing algorithm to determine the port to sent the traffic out based on one of several criteria . Like,
- source ip address= src-ip
- destination ip address= dst-ip
- source and destination ip address= src-dst-ip
- source mac address= src-mac
- destination mac=dst-mac
- source and destination mac address= src-dst-mac
- source port =src-port
- destination port= dst-port
- source and destination port=src-dst-port
- By default Layer 2 packets are distributed on XOR computation of source and destination MAC address.
- Layer 3 packets based on XOR source and destination IP address:
- 2 ports = traffic share will be 50%:50% on each port.
- 3 ports = traffic share will be 37,5%:37,5%:25% on each port.
- 4 ports = traffic share will be 25%:25%:25%:25% on each port.
- 5 ports = traffic share will be 25%:25%:25%:12,5%:12,5% on each port.
- 6 ports = traffic share will be 25%:25%:12,5%:12,5%:12,5%:12,5% on each port.
- 7 ports = traffic share will be 25%:12,5%:12,5%:12,5%:12,5%:12,5%:12,5% on each port.
- 8 ports= traffic share is 12,5%:12,5%:12,5%:12,5%:12,5%:12,5%:12,5%:12,5% on each port.
According to above diagram, Assume that the load-balancing method is based on src-ip,
First port in the ether-channel will be Link 0 and second port in the ether-channel will be Link 1.
two link in the ether-channel can be represent in one binary bit. the load-balancing algorithm create an index that associate with lonk 0 with binary bit 0 and link 1 with a bit 1.
When traffic passed through the ether-channel , the algorithm will convert the source ip address into binary hash and it will compare against the Index table already created.
For example purpose we will take two different source ip addresses.
192.168.0.1 = 11000000.10101000.00000000.00000001
192.168.0.2 = 11000000.10101000.00000000.00000010
-------------------------------------------------------------------------
Currently we used two ports in etherchannel hence only two links are used in indext, link 0 and link 1. so last binary bit of source ip 192.168.0.1 end with 1, hence it will used link 1,
And second source ip address 192.168.0.2 , binary bit end with 0, hence it will used link 0.
If we used four ports in the etherchannel, then its will used 2-bit index will used,hence last bit of ip address should be consider like
link 0=00,
link 1=01,
link 2=10,
link 3=11
To check which type of load balancing type is currently used in etherchannel.
Cat3500#show etherchannel load-balance EtherChannel Load-Balancing Configuration: src-dst-ip
for now i am going to stop here, will discussed detail about hashing types and balancing method in different platform will be soon in near future.
No comments:
Post a Comment