Showing results for 
Search instead for 
Did you mean: 

On-Line LACP Hashing Calculator


Does anyone know of an on-line calculator which can be used to predict which member of an LACP channel will carry the packet, given source / destination MAC address (or IP address or TCP port)?

I've found tutorials on how to perform the XOR/modulo calculation, e.g.

but I'm imagining that someone has built a Web-based calculator to automate this process



Stuart Kendrick


3 Replies 3

Bilal Nawaz
VIP Alumni
VIP Alumni

Hello Stuart, I haven't come across one myself (would be handy for sure), It just depends on your configured balancing and IP's or MAC's.

You can work out from the switch what the hash will do with your traffic - which path the flow's will take by doing:

show etherchannel load-balance hash-result interface PoX ip x.x.x.x y.y.y.y

This command can almost be your calculator (not so much online though) or you could do the same for mac addresses too.


Bilal-HQ-C6509# show etherchannel load-balance hash-result interface po1 ip
Computed RBH: 0x1
Would select Gig3/2 of Po1
See here for more details:

Hope this helps

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hi Bilal,

That's helpful, thank you.

A peer on another discussion forum suggests the following:

'I doubt that you can  find one [an LACP calculator] due to the fact that LAG hashing is hardcoded in switch  controller and therefore is chipset specific (even the same vendor can  use multiple different ones).

"Hash can be computed  based on MAC address, IP address or L4 port (at least those are  available in modern Broadcom chipsets) so there are plenty of  possibilities.

"And since every chipset vendor considers its design as confidential, it  will be hard to discover unless you'll find someone that has programmers  documentation to a particular chip.

Your view?


Hello Stuart, It is true... You can't really be confident and say, this port in this etherchannel will be selected, unless you know the values and hashes to be able to work it out- (too much work ). And I'd also add that it depends on the vendors 'hash' that they use to calculate the values.

Not all vendors have the same hash. And ports have different field values associated too which can make it unpredictable.

EtherChannel reduces part of the binary pattern that the addresses in the frame form to a numerical value that selects one of the links in the channel in order to distribute frames across the links in a channel. EtherChannel frame distribution uses a Cisco-proprietary hashing algorithm. The 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.

The Cisco-proprietary hash algorithm computes a value in the range 0 to 7. With this value as a basis, a particular port in the EtherChannel is chosen. The port setup includes a mask which indicates which values the port accepts for transmission. With the maximum number of ports in a single EtherChannel, which is eight ports, each port accepts only one value. If you have four ports in the EtherChannel, each port accepts two values, and so forth.

Hope this helps.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: