cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5254
Views
11
Helpful
3
Replies

Portchannel hashing algorithms question

tedauction
Level 1
Level 1

Hello, I have a L3 switch on one end of the port-channel which is using 'src-dst-ip' as hashing algorithm and then a pure L2 switch on the opposite end using src-mac for it's port-channel hashing algorithm.

Is this OK, or should we be using the same algorithms on both ends ?

Thank you.

1 Accepted Solution

Accepted Solutions

Joseph W. Doherty
Hall of Fame
Hall of Fame

"Is this OK, or should we be using the same algorithms on both ends ?"

Maybe, maybe not.

For "optimal" load balancing/sharing, what you normally work toward is having the hashing attributes vary the most.

In ye olden times, Cisco switches had a limited choice of hashing attributes, often not more than using src-x or dst-x.  When limited to such, depending on your topology, having different choices, per flow direction, could make a huge difference.

For example, consider a server interacting on one side of an Etherchannel with many hosts on the other side.  If you were limited to src-mac and dst-mac, from server to hosts you wanted to use dst-mac.  From hosts to server you wanted to use src-mac.  Doing this, generally, provided a difference in a flow's attributes as used by the hashing algorithm.

On most Cisco switches, for some time now, many offer a src-dst-x.  In a case like the prior example, that choice would work equally well from server to hosts or hosts to server.

That said, you might still have some special case where the optimal hashing attribute might not be obvious.  So again, you need to understand your traffic flows, and select the best hashing option.

Do know, some times the Cisco switch doesn't provide a hashing option ideal for you.  For example, between two hosts, MAC and IP are the same, so there will be no distribution of multiple flows, for those two hosts, across an Etherchannel.  However, some of Cisco's higher end switches may provide an option to use source and destination UDP/TCP port numbers as part of the hash.

So again, having different hashing attributes on the two ends of a Etherchannel might be your optimal choice, especially depending on limitations of the switch platform.

BTW, src-dst-IP is often a good choice, when provided, in most situations.  Using IP is often better than using MAC because it may deal better with traffic external to the local L2 domain.

View solution in original post

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Yes, you can use different hashing algorithms on each side of the link if need be.

HTH

balaji.bandi
Hall of Fame
Hall of Fame

Not necessarly required to be same, but good to have consistance config, when you diagnosis the issues :

 

https://www.cisco.com/c/en/us/support/docs/lan-switching/etherchannel/12023-4.html

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Joseph W. Doherty
Hall of Fame
Hall of Fame

"Is this OK, or should we be using the same algorithms on both ends ?"

Maybe, maybe not.

For "optimal" load balancing/sharing, what you normally work toward is having the hashing attributes vary the most.

In ye olden times, Cisco switches had a limited choice of hashing attributes, often not more than using src-x or dst-x.  When limited to such, depending on your topology, having different choices, per flow direction, could make a huge difference.

For example, consider a server interacting on one side of an Etherchannel with many hosts on the other side.  If you were limited to src-mac and dst-mac, from server to hosts you wanted to use dst-mac.  From hosts to server you wanted to use src-mac.  Doing this, generally, provided a difference in a flow's attributes as used by the hashing algorithm.

On most Cisco switches, for some time now, many offer a src-dst-x.  In a case like the prior example, that choice would work equally well from server to hosts or hosts to server.

That said, you might still have some special case where the optimal hashing attribute might not be obvious.  So again, you need to understand your traffic flows, and select the best hashing option.

Do know, some times the Cisco switch doesn't provide a hashing option ideal for you.  For example, between two hosts, MAC and IP are the same, so there will be no distribution of multiple flows, for those two hosts, across an Etherchannel.  However, some of Cisco's higher end switches may provide an option to use source and destination UDP/TCP port numbers as part of the hash.

So again, having different hashing attributes on the two ends of a Etherchannel might be your optimal choice, especially depending on limitations of the switch platform.

BTW, src-dst-IP is often a good choice, when provided, in most situations.  Using IP is often better than using MAC because it may deal better with traffic external to the local L2 domain.