cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2871
Views
8
Helpful
6
Replies

Etherchannel loadbalance use Source or Destination Mac

mahesh18
Level 6
Level 6

                   Hi Everyone,

Here is info

3650

3560 user connect there PC.

It has default gateway to Vlan 30.

It has SVI vlan 30.

It has uplink to 3750

3750.

It has uplink to 4500.

It has also same default gateway to Vlan 30.

4500 Layer3.

It has no SVI  Vlan 30 but it has link to vlan 30 via firewall  that goes to another 4500

Second 4500 Layer 3

It has SVI Vlan 30.

We have many 3750 switches that has uplink to 4500.

****************************************

I am making etherchannel between 3750 and 4500 Layer 3

3750 uses source-mac for load balance.

4500 uses source and destination IP and mac for load balance.

My question is on 4500L3 should i choose destination IP or Mac for ether channel load balance as  it goes to few different 3750 switches?

I read If source MAC load-balancing is in use, these frames will be forwarded down only one member link, because the outcome of the hash function will always be the same

Thanks

Mahesh

3 Accepted Solutions

Accepted Solutions

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Hash algorithm should be chosen to provide the most "random" distribution based on what the hash algorithm "sees" in the flow of frames or packets.

If the gateway was on the 4500 and the 3750 was L2, from the 4500 gateway, best distribution of an attribute might be dest MAC or dest IP (both assume destination is different hosts).  From L2 3750 to L3 4500, best distribution of an attribute might be src MAC or src IP.  (Dest MAC would be same, gateway's; dest IP might be okay if not something like the same IP, e.g. a server.)

View solution in original post

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Here is what i understood from above post 

From 3750 to 4500 Ether channel  source mac is ok  as this is default on 3750  but  from 4500 L3 to 3750 L2  i should choose load balance

based on  dest MAC as i have different 3750 switches. Right?

Maybe, maybe not - as I'm a bit confused by how you've described you topology; which is also why I provided a generic answer in my prior post.  If you had understood my posting, it (hopefully) should have answered your question, but since you've marked my posting not helpful, I assume I wasn't clear, so I try to further clarify.

Regardless of what the topology is, normally what you're trying to accomplish is the best distribution of different flows across an Etherchannel.

To accomplish best distribution you try to identify the attribute or attributes of the frame or packet that changes most often as the packets transit the Etherchannel.  Unfortunately not all Cisco devices support a hashing algorithm you really need.

Let's first assume the Cisco devices only support src or dest MAC hashing. If there was an Etherchannel between a gateway interface and multiple host clients, frames between a gateway and host will contain both their MACs.  Whether it's the src or dest mac depends on the direction of the traffic.  Traffic from gateway to host will have gateway's MAC as src MAC and host's MAC as destination MAC; converse for traffic from host to gateway.

Assuming there's only one gateway and many hosts, and also assuming the multiple hosts all send about the same volume of traffic to/from the gateway, we would chose for traffic from gateway toward hosts dest MAC hashing, because the src MAC would be the same in all frames.  I.e., if we chose src MAC, all traffic would only use one link.

For traffic from hosts to gateway, we chose the converse, src MAC, as the destination MAC, again, is always the same.

Again, what we're choosing is the attribute, or attributes, of the frame or packet that changes the most often.

In the foregoing example, we had to insure either the src MAC or dest MAC was correctly selected to correspond to what changed most often in the frame.  To simply this choice, later devices now often allow usage of multiple attributes, such as src and dest MAC.  Such a choice would work just as well in either direction because part of that combination changes.

Also again, I want to emphasis you need to understand your traffic.  For example, let's say one of your hosts is a server that's actually transferring 99% of all traffic.  In this case, doing the forgoing would likely cause half of your hosts to contend against this one very busy host on a dual Etherchannel link; even if you selected the "right" hash algorithm.

Knowing you're using MACs for the hash, you might find if you locally assigned an odd numbered MAC to the busy server host and even numbered MACs to all your other hosts, your effective load balancing would improve.  (NB: lot of work to maintain this, though.)

Another example of needing to understand your traffic consider traffic between two routers.  As the routers' MAC are always the same, if your device only supports MAC hashing, you'll derive no performance benefit from your Etherchannel (you'll benefit from redundancy).  For a case like this, you'll probably want some form of IP hashing.

Or, if you had a lot of traffic between two specific hosts, crossing an Etherchannel, MACs don't change, IPs don't change, now you hope you have a device that also supports IP Port hashing (of course, this assumes ports vary in multiple concurrent flows).

Back to your original question, what's not clear is what you traffic looks like that would cross the Etherchannel.  You've described a gateway for SVI 30, so traffic to/from that gateway tells us what MAC NOT to use as part of a single attribute Etherchannel hash, but just having multiple downstream switches tells us little more about what attribute or attributes are changing in the frames and packets.  Identify those changing attribute or attributes, and use those in your hash algorithm choice.

View solution in original post

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Basically from Gateway switch has few etherchannel bundles that goes to few downstream switches.

Say L3 switch has 4 etherchannel and these 4 got to 4  different downstream switches .

Okay, well first realize, with 4 etherchannels, each, might use different hash for optimal performance.  I believe you generally can't have different hash options on the same device, but both sides don't need to agree (and often shouldn't), so one downstream 3750 might have a different hash choice than another downstream 3750.

"Classical" L2 hashing might use dest MAC from gateway to multiple clients, and src MAC from multiple clients to gateway. (Note: or src and dest MAC).

Yet doing that might not provide optimal load balancing.  Suppose some or all of the downstream hosts are servers, one perhaps very busy.  Using any combination of MACs, all the traffic between the gateway and that host will only use one path.  If supported, perhaps from the gate to the hosts we, instead, use src IP (remember this isn't the gateway's IP), and from the hosts dest IP, will better balance traffic to/from server host.

So, what you need to consider, end-to-end data streams between hosts, what attribute(s) of the frame and/or packet change the most, what's the traffic distribution between different hosts, what hash algorithms are supported, then pick the best possible.

Also again, from just:

So etherchannel bundle is between layer 3 and layer 2 (3750 switch).

It carries all type of data.

There's not enough information.

PS:

BTW, if you're beginning to realize, Etherchannel isn't ideal for increasing performance, you're right!  It can be difficult to select the best hash.  Ideal choice may change over time, short or long term (or even both).  Single flow is limited to individual link capacity.  If one link is "pegged" and other "empty", hash can (statically) send new flow to "pegged" link.

View solution in original post

6 Replies 6

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Hash algorithm should be chosen to provide the most "random" distribution based on what the hash algorithm "sees" in the flow of frames or packets.

If the gateway was on the 4500 and the 3750 was L2, from the 4500 gateway, best distribution of an attribute might be dest MAC or dest IP (both assume destination is different hosts).  From L2 3750 to L3 4500, best distribution of an attribute might be src MAC or src IP.  (Dest MAC would be same, gateway's; dest IP might be okay if not something like the same IP, e.g. a server.)

Hi Joseph,

Here is what i understood from above post

From 3750 to 4500 Ether channel  source mac is ok  as this is default on 3750  but  from 4500 L3 to 3750 L2  i should choose load balance

based on  dest MAC as i have different 3750 switches. Right?

Thanks

Mahesh

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Here is what i understood from above post 

From 3750 to 4500 Ether channel  source mac is ok  as this is default on 3750  but  from 4500 L3 to 3750 L2  i should choose load balance

based on  dest MAC as i have different 3750 switches. Right?

Maybe, maybe not - as I'm a bit confused by how you've described you topology; which is also why I provided a generic answer in my prior post.  If you had understood my posting, it (hopefully) should have answered your question, but since you've marked my posting not helpful, I assume I wasn't clear, so I try to further clarify.

Regardless of what the topology is, normally what you're trying to accomplish is the best distribution of different flows across an Etherchannel.

To accomplish best distribution you try to identify the attribute or attributes of the frame or packet that changes most often as the packets transit the Etherchannel.  Unfortunately not all Cisco devices support a hashing algorithm you really need.

Let's first assume the Cisco devices only support src or dest MAC hashing. If there was an Etherchannel between a gateway interface and multiple host clients, frames between a gateway and host will contain both their MACs.  Whether it's the src or dest mac depends on the direction of the traffic.  Traffic from gateway to host will have gateway's MAC as src MAC and host's MAC as destination MAC; converse for traffic from host to gateway.

Assuming there's only one gateway and many hosts, and also assuming the multiple hosts all send about the same volume of traffic to/from the gateway, we would chose for traffic from gateway toward hosts dest MAC hashing, because the src MAC would be the same in all frames.  I.e., if we chose src MAC, all traffic would only use one link.

For traffic from hosts to gateway, we chose the converse, src MAC, as the destination MAC, again, is always the same.

Again, what we're choosing is the attribute, or attributes, of the frame or packet that changes the most often.

In the foregoing example, we had to insure either the src MAC or dest MAC was correctly selected to correspond to what changed most often in the frame.  To simply this choice, later devices now often allow usage of multiple attributes, such as src and dest MAC.  Such a choice would work just as well in either direction because part of that combination changes.

Also again, I want to emphasis you need to understand your traffic.  For example, let's say one of your hosts is a server that's actually transferring 99% of all traffic.  In this case, doing the forgoing would likely cause half of your hosts to contend against this one very busy host on a dual Etherchannel link; even if you selected the "right" hash algorithm.

Knowing you're using MACs for the hash, you might find if you locally assigned an odd numbered MAC to the busy server host and even numbered MACs to all your other hosts, your effective load balancing would improve.  (NB: lot of work to maintain this, though.)

Another example of needing to understand your traffic consider traffic between two routers.  As the routers' MAC are always the same, if your device only supports MAC hashing, you'll derive no performance benefit from your Etherchannel (you'll benefit from redundancy).  For a case like this, you'll probably want some form of IP hashing.

Or, if you had a lot of traffic between two specific hosts, crossing an Etherchannel, MACs don't change, IPs don't change, now you hope you have a device that also supports IP Port hashing (of course, this assumes ports vary in multiple concurrent flows).

Back to your original question, what's not clear is what you traffic looks like that would cross the Etherchannel.  You've described a gateway for SVI 30, so traffic to/from that gateway tells us what MAC NOT to use as part of a single attribute Etherchannel hash, but just having multiple downstream switches tells us little more about what attribute or attributes are changing in the frames and packets.  Identify those changing attribute or attributes, and use those in your hash algorithm choice.

Hi Joseph,

Thanks for so detailed information.

Basically from Gateway switch has few etherchannel bundles that goes to few downstream switches.

Say L3 switch has 4 etherchannel and these 4 got to 4  different downstream switches .

So etherchannel bundle is between layer 3 and layer 2 (3750 switch).

It carries all type of data.

Regards

Mahesh

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

Basically from Gateway switch has few etherchannel bundles that goes to few downstream switches.

Say L3 switch has 4 etherchannel and these 4 got to 4  different downstream switches .

Okay, well first realize, with 4 etherchannels, each, might use different hash for optimal performance.  I believe you generally can't have different hash options on the same device, but both sides don't need to agree (and often shouldn't), so one downstream 3750 might have a different hash choice than another downstream 3750.

"Classical" L2 hashing might use dest MAC from gateway to multiple clients, and src MAC from multiple clients to gateway. (Note: or src and dest MAC).

Yet doing that might not provide optimal load balancing.  Suppose some or all of the downstream hosts are servers, one perhaps very busy.  Using any combination of MACs, all the traffic between the gateway and that host will only use one path.  If supported, perhaps from the gate to the hosts we, instead, use src IP (remember this isn't the gateway's IP), and from the hosts dest IP, will better balance traffic to/from server host.

So, what you need to consider, end-to-end data streams between hosts, what attribute(s) of the frame and/or packet change the most, what's the traffic distribution between different hosts, what hash algorithms are supported, then pick the best possible.

Also again, from just:

So etherchannel bundle is between layer 3 and layer 2 (3750 switch).

It carries all type of data.

There's not enough information.

PS:

BTW, if you're beginning to realize, Etherchannel isn't ideal for increasing performance, you're right!  It can be difficult to select the best hash.  Ideal choice may change over time, short or long term (or even both).  Single flow is limited to individual link capacity.  If one link is "pegged" and other "empty", hash can (statically) send new flow to "pegged" link.

Hi Joseph,

I agree with you on above post.

Etherchannel load balancing is not always a good idea depending your Network topology.

Regards

Mahesh

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: