Category Archives: L2 Ether-Channel

Ether-channel on ESXI

https://kb.vmware.com/s/article/1004048

EtherChannel: This is a link aggregation (port trunking) method used to provide fault-tolerance and high-speed links between switches, routers, and servers by grouping two to eight physical Ethernet links to create a logical Ethernet link with additional failover links. For additional information on Cisco EtherChannel, see the EtherChannel Introduction by Cisco.
LACP or IEEE 802.3ad: The Link Aggregation Control Protocol (LACP) is included in IEEE specification as a method to control the bundling of several physical ports together to form a single logical channel. LACP allows a network device to negotiate an automatic bundling of links by sending LACP packets to the peer (directly connected device that also implements LACP). For more information on LACP, see the Link Aggregation Control Protocol whitepaper by Cisco.

Note: LACP is only supported in vSphere 5.1, 5.5 and 6.0 using vSphere Distributed Switches (VDS) or the Cisco Nexus 1000v.

EtherChannel vs. 802.3ad: EtherChannel and IEEE 802.3ad standards are very similar and accomplish the same goal. There are a few differences between the two, other than EtherChannel is Cisco proprietary and 802.3ad is an open standard.
For more information on EtherChannel implementation, see the Understanding EtherChannel Load Balancing and Redundancy on Catalyst Switches article from Cisco.

https://kb.vmware.com/s/article/2034277

Advertisements

Ether-Channel Load Balancing

The EtherChannel load-balancing method uses a Cisco-proprietary hashing algorithm. The algorithm computes values in the range of 0-7 that it assings to ports in the EtherChannel and uses these values as a basis to determine which port is used to forward particular traffic. The table below demonstrates how many values will be designated to each port, depending on the number of links in the EtherChannel:

LBMethod

The XOR operation is done on the last 3 bits of the source and destination address which would then correspond to a value of 0 – 7, which is in turn assigned to one of the ports in the channel. If you have 8 ports in the channel, then you get a 1 to 1 ratio of values assigned to ports. If you have less than 8 ports in the channel then you start to get ports with multiple values assigned.

For instance, if you have 4 ports in the channel, each port would be assigned 2 values. If you have 3 ports in the channel, you would get a 3-3-2 ratio.

I can give a brief explanation of the XOR operation. With XOR or exclusive-or, you take two binary numbers, perform a XOR, and get either a 1 or 0 depending on the binary values. Basically XOR will only give a 1 when you have binary values of 1 and 0 that the operation is being performed on.

So when comparing bit streams, in this case, last 3 of source and destination, when you have two 1s you get a 0, two 0s you get a 0, and 1 and 0 you get a 1.

Here is an example:

Source IP: 192.168.1.1
Dest IP : 192.168.1.2

Source last 3 in binary: 001
Dest last 3 in binary: 010

The switch does a bit-by-bit comparison, which corresponds, from left to right, to: 011. For a port value of 3.

Now lets say we have 2 ports in the channel, this would correspond to 4 values being assigned to each port. The first port would have values of 0,2,4,6 and the second port values of 1,3,5,7.

So with our value calculated above of 3, this traffic would flow over the 2nd port in the channel.

So the number of ports in the channel will determine the ratio of values assigned to each port. So with a 2 port channel, we will have 4 values assigned to each port, for a 4-4 ratio.

So lets call the 2 ports A and B. The values are assigned in order from port A to B, and then to A and B again. ( I don’t recall how Cisco chooses which port is A and B at the moment.) So A will be assigned 0, then B will be assigned 1, then A 2, and B 3, and so on and so forth, until no more values are remaining.

With a 3 port channel, you will have a 3-3-2 ratio of values assigned. So lets say we have ports A, B, and C. A will be assigned 0, B assigned 1, and C assigned 2, then A 3, B 4, C 5, A 6, B 7.

Here is a table:
etherchan

The balancing is done based on flows, not based on packets. We will go back to this later on.

Etherchannel can have up to 8 ports, so number of links like 3, 5, 6 and 7 would never have equal distribution. Here is why and this is point where we are not able to influence:
test123321

#“test etherchannel load-balance interface port-channel 5 ip 1.1.1.1 1.1.1.2”
#Output:
Computed RBH: 0x3
Would select Te2/2 of Po5

#show interfaces port-channel 5 etherchannel
Ports in the Port-channel:
Index Load Port EC state No of bits
——+——+————+——————+———–
0 55 Te2/1 Active 4
1 AA Te2/2 Active 4

We need to look at the bolded values (55 or AA). It is time for math. 55 is 0101 0101 in binary. It means that for interface te2/1 bits 0, 2, 4 and 6 are set. So RBH value of 0, 2, 4, and 6 belongs to te2/1. Our RBH value is 0x3, so the chosen port would be te2/2. Let’s check it out. AA is 1010 1010 in binary, so for te2/2 bits 1, 3, 5 and 7 are set, than RBH value of 1, 3, 5, and 7 belongs to port te2/2.

Value Computation:
Hexa

Note: That other platform has different has size. In Nexus line card,
M1 – 3bit and F1 – 8bit.

We have a maximum of 8 ports configured in a ether-channel / port-channel. for load balacing scenario you can refer the below mentioned table.

We can create multiple channel on different platform, Maximum channel will depend on the platform you’re using/

http://packetpushers.net/understand-etherchannel-load-balancing-catalyst-switches/
https://learningnetwork.cisco.com/message/199965#199965
Etherchannel Loadbalancing on Catalyst Switches
https://supportforums.cisco.com/t5/network-infrastructure-documents/quot-etherchannel-loadbalancing-on-catalyst-switches-quot/ta-p/3107786
https://supportforums.cisco.com/t5/lan-switching-and-routing/what-is-the-maximum-number-of-physical-link-we-can-bind-to-a/td-p/2511882
https://www.cisco.com/c/en/us/support/docs/lan-switching/etherchannel/12023-4.html
https://www.packetmischief.ca/2012/07/24/doing-etherchannel-over-3-5-6-and-7-link-bundles/

CEF Polarization

routepolar

Solution:
Is the switch on the other side of the connection configured the same way? You may want to try some of the different modes of load-balancing. With src-dst-ip, the switch may put a lot of the traffic on one port if it sees the same IP because traffic is being forwarded to a router or encapsulated. You may want to try src-mac on one of these switches and monitor it for a while to see how it behaves.

https://www.experts-exchange.com/questions/26609413/Etherchannel-load-balancing-not-working-properly.html

https://www.cisco.com/c/en/us/support/docs/ip/express-forwarding-cef/116376-technote-cef-00.html#anc5

https://books.google.com.ph/books?id=3AzhqVn8iFYC&pg=PA57&lpg=PA57&dq=etherchannel+polarization+issue&source=bl&ots=RiL_kKB3mu&sig=WKMm2d5RKUg7RD3PEywbqcFTpB4&hl=en&sa=X&ved=0ahUKEwjKpcWP36fWAhVDkZQKHQBKCzUQ6AEIYTAI#v=onepage&q=etherchannel%20polarization%20issue&f=false