05-17-2022 12:12 AM
Hello,
Suppose I have two switches connected back to back as shown in the attached picture and If I generate exactly 1 gig of traffic from PC 1, how will the traffic flow? will it get load balanced or it will pass through a particular interface? I have configured etherchannel on both the switches.
Solved! Go to Solution.
05-17-2022 08:36 AM
If your traffic is a single "flow" it will be sent across only one link.
Even if multiple flows, whether those flows will be sent across one or multiple links depends on the LB algorithm being used and the corresponding attributes of your traffic. (NB: most LB algorithms only use MAC or IPs, so usually all traffic from a single host, will be directed to same link.)
LB is deterministic, same traffic attributes will always use the same link (for a specific number of links).
(BTW, the usual LB implementation don't well/equally balance non-binary number of links.)
(Also BTW, devices on each end of Etherchannel don't need to use the same LB algorithm, and sometimes they shouldn't. Again, depends on LB algorithm being used and attributes of traffic, in each direction.)
Etherchannel does not consider link loading, for example, if one link is at 100% usage while another is a 0% usage, a new traffic flow will be directed to the link based, again, on its attributes and LB algorithm being used. I.e. another flow could be directed to the already 100% busy link.
Because Etherchannel doesn't consider link loading, a dual Etherchannel often provides only a 50% effective bandwidth boost (over a single link), not 100% as might otherwise be expected.
Mention was made, by another poster, the default LB is always src-dest-IP (which, BTW, if supported, whether default, or not, often a good choice). Probably true on all "newer" switch platforms. It's not true for all "old" switch platforms, and I recall (?) it might not be configurable, at all, on some routers.
Lastly, for just bandwidth needs, if you need more than 4 links in an Etherchannel, especially if optical, might be time to consider jumping up to the next higher bandwidth media (if available). However, Etherchannel, perhaps more so than providing extra bandwidth, provides additional redundancy. (For example, in your example, rather than using g0/0 and g0/1 for Etherchannel ports, perhaps g0/0 and g0/23 or g0/0 and g1/0. G0/23 or g1/0 might have the second port on a different ASIC, different buffer resource, different line card, different switch stack member, etc.)
05-17-2022 12:24 AM - last edited on 03-10-2023 03:47 AM by Translator
Hello
If a single incitation is made by default scr/dest ip LB method used and calculated to a specific interface, if multiple initiations are made again the etherchannel will make a calculation and choose an interface.within that aggregation, preferably the alternate link
sh etherchannel-summary
sh etherchannel load-balance
05-17-2022 01:48 AM
So does that mean if the initiation is done at 1st time it will get load balanced and if the initiation is made again and again it will use alternate link?
05-17-2022 03:00 AM
check the LB algorithm works : (some time Virtiual Lab may have different results)
https://www.cisco.com/c/en/us/support/docs/lan-switching/etherchannel/12023-4.html
05-17-2022 04:29 AM
Hello,
Not necessarily. Depending on the load balance method used as @paul driver showes how you can check this. This is let switch so the method you choose is for the device. Furthermore some models have more options than others.
Let’s say you have 2 links like in your example etherchanneled together. All the clients on the left side trying to reach a server on the right side. If the load balance method is “destination IP” then every client will only use the same link of the ether channel since every client will be going to the same “destination IP”. The load balance method runs a hash and that hash in this case is run on the destination ip of the traffic. It being the same, the same link gets used not utilizing the other. Now when traffic goes to another ip and not the server it could use the other link. But again if that hash runs (since it only has 2 options for links) it could still choose that saturated link. So you need to know how most traffic flows in your network to make a good determination of load balancing method.
https://www.ciscopress.com/articles/article.asp?p=2348266&seqNum=3
Hope that helps
-David
05-17-2022 06:43 AM
The original post describes an environment with an EtherChannel with 2 links and asks a question "If I generate exactly 1 gig of traffic from PC 1, how will the traffic flow? will it get load balanced or it will pass through a particular interface?" We can not answer that question without knowing something about the destination (and about the load balancing algorithm chosen). If there is a single source and a single destination it is likely that all traffic will use one link and the other link would not be used. If there is a single source and multiple destinations it is likely that some traffic will use one link while other traffic uses the other link.
05-17-2022 08:02 AM
Hey Paul,
My response was geared more towards the second question the OP had under that about if traffic is generated once it will load balance over one link and the next time traffic is generated it will use another link. I was just pointing out that it depends on the load balancing method used. To answer the first question, from what I understand, traffic flow is per link and it will usually use the same link for the same type of traffic flow no matter the load balancing method. For instance if the same entity (IP, MAC, or port #) tried to reach a single other entity (IP, MAC, or port #) it will always use the same link for traffic flow based on the hash. (which is why its important to know your network and traffic flow).
Also to your comment of "we cannot answer without knowing something about the destination (and about the load balancing algorithm chosen)". I think that depends. If the load balancing algorithm is just something like src-ip or src-mac the destination is irrelevant.
And I absolutely agree with your statement of "If there is a single source and a single destination it is likely that all traffic will use one link and the other link would not be used." since I made a comment about it in my above post about using a destination IP load-balancing algorithm and devices going to the same IP.
-David
05-17-2022 03:30 AM
OK
one PC meaning in each traffic from PC there are
same source MAC
same source IP
different source L4 port
different destination MAC
different destination IP
different destination L4 port
SO if ether channel hash select source mac and source ip then there are big chance that all traffic will take same path "select same ethercahnnel port"
and that why we either include L4 port or change hash to include destination mac not source mac.
05-17-2022 06:37 AM
Hello
The default LB is usually fine, you can check if you wish by initiating a couple of extended pings (scr/des ip) and then checking the physical interfaces counters within the PC.
05-17-2022 06:49 AM
I would add one thing to the load balancing decision. It depends on your traffic pattern. If the port channel is a link to another switch/router with a lot of different destinations then the default based on destination works great. If the port channel goes to something that is handling a lot of requests (like a NAS or other kind of server), destination based load balancing doesn't work very well. In the case source based load balancing would be better. Destination based works well for most cases, so that makes good sense as the default method.
05-17-2022 08:36 AM
If your traffic is a single "flow" it will be sent across only one link.
Even if multiple flows, whether those flows will be sent across one or multiple links depends on the LB algorithm being used and the corresponding attributes of your traffic. (NB: most LB algorithms only use MAC or IPs, so usually all traffic from a single host, will be directed to same link.)
LB is deterministic, same traffic attributes will always use the same link (for a specific number of links).
(BTW, the usual LB implementation don't well/equally balance non-binary number of links.)
(Also BTW, devices on each end of Etherchannel don't need to use the same LB algorithm, and sometimes they shouldn't. Again, depends on LB algorithm being used and attributes of traffic, in each direction.)
Etherchannel does not consider link loading, for example, if one link is at 100% usage while another is a 0% usage, a new traffic flow will be directed to the link based, again, on its attributes and LB algorithm being used. I.e. another flow could be directed to the already 100% busy link.
Because Etherchannel doesn't consider link loading, a dual Etherchannel often provides only a 50% effective bandwidth boost (over a single link), not 100% as might otherwise be expected.
Mention was made, by another poster, the default LB is always src-dest-IP (which, BTW, if supported, whether default, or not, often a good choice). Probably true on all "newer" switch platforms. It's not true for all "old" switch platforms, and I recall (?) it might not be configurable, at all, on some routers.
Lastly, for just bandwidth needs, if you need more than 4 links in an Etherchannel, especially if optical, might be time to consider jumping up to the next higher bandwidth media (if available). However, Etherchannel, perhaps more so than providing extra bandwidth, provides additional redundancy. (For example, in your example, rather than using g0/0 and g0/1 for Etherchannel ports, perhaps g0/0 and g0/23 or g0/0 and g1/0. G0/23 or g1/0 might have the second port on a different ASIC, different buffer resource, different line card, different switch stack member, etc.)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide