Routing and Switching

Etherchannel and the XOR operation

The key to understanding the Etherchannel XOR operation is knowing what the XOR is all about and binary conversion; hexadecimal to binary here (remember the 8 4 2 1 )- think nibbles.

XOR is a bitwise operator called “EXCLUSIVE OR (^)”, it is used to compare two numbers. A result bit is 1 if exactly one of the corresponding bits in the operands is 1. That is, both bits must not be 1; it has to be 0 & 1 to obtain 1. If both bits are 1, 0 is obtained as the result.

Consider this example; 124 XOR 99

124 = 0 1 1 1 1 1 0 0

99 = 0 1 1 0 0 0 1 1 gives

0 0 0 1 1 1 1 1 which in decimal is 127.

The algorithm can use source IP address, destination IP address, or a combination of source and destination IP addresses, source and destination MAC addresses, or TCP/UDP port numbers.

Assuming a packet is sent from to, and the etherchannel algorithm has been configured to use source and destination IP addresses, the following result is obtained:

The maximum number of links that can be bundled is 8 and only the last three bits is used in the hashing. In our example, 1 from the source IP and 6 from the destination IP contains the bits that will be used, and will be converted to binary.

1 = 0001

6 = 0110

If two links are bundled only the last bit is used in the algorithm

1 XOR 0 = 1 so the first link is used

If four links are bundled the rightmost two bits are used

01 XOR 10 = 11 the third link is used.

If 8 links are bundled all the bits are used in the algorithm

001 XOR 110 = 111 the seventh link is used.


One thought on “Etherchannel and the XOR operation

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s