02-17-2025 04:40 AM
Hello together,
I visited some Cisco courses and in my last one I heared for the first time that there is a best practice with lacp.
I should be aggregate 1, 2, 4 or 8 ports into one channel.
3, 5,6,7 works not "so good" like the obove one.
Can please someone explain me why it is like it is and where I can find additional information about this?
Thanks!
02-17-2025 04:50 AM - edited 02-17-2025 04:51 AM
Hello
I assuming this relate to the load balancing ratios of the portchannel
The links between each switch having an even number of links to spread the traffic more equally over the PC than having a odd number of links
example:
1= 100%
2=50%
4=25%
8= 12.5 %
02-17-2025 04:55 AM
This is related to below table.
Odds ports have perfect distribution while even does not.
Number of Ports in the EtherChannel | Distribution across the links |
2 | 50%:50% |
3 | 37,5%:37,5%:25% |
4 | 25%:25%:25%:25% |
5 | 25%:25%:25%:12,5%:12,5% |
6 | 25%:25%:12,5%:12,5%:12,5%:12,5% |
7 | 25%:12,5%:12,5%:12,5%:12,5%:12,5%:12,5% |
8 | 12,5%:12,5%:12,5%:12,5%:12,5%:12,5 |
02-17-2025 06:32 AM - edited 02-17-2025 06:52 AM
"Odds ports have perfect distribution while even does not."
Suspect you meant the converse and, traditionally, it's power of 2s, not all even numbers (e.g. #6, in your table.)
02-17-2025 05:12 AM - edited 02-17-2025 05:12 AM
Hello @p11l
This best practice recommendation is based on how LACP distributes traffic across member links in a bundle.
LACP uses a hashing algorithm to determine which link in the bundle will carry each frame. The hashing mechanism commonly uses fields like source/destination MAC address, source/destination IP address, or Layer 4 port numbers.
Most platforms use a modulo operation to distribute traffic across available links. When you have 2, 4, or 8 links, the modulo operation distributes traffic evenly since these numbers align well with binary hashing mechanisms (powers of 2).
For example, with 4 links, the hash function distributes traffic like this:
If you use 3, 5, 6, or 7 links, the modulo operation does not distribute traffic as evenly. Some links will carry more traffic than others, leading to suboptimal load balancing.
02-17-2025 06:47 AM - edited 02-17-2025 06:50 AM
"I should be aggregate 1, 2, 4 or 8 ports into one channel.
3, 5,6,7 works not "so good" like the obove one."
Other replies explain why and show distributions, but those, I recall, are based on the traditional modulo using a value of 8. Some later platforms, I recall, now use a modulo of 256, which would do better for non power of 2 link numbers, but they would still have a higher usage expectation.
BTW, also keep in mind, the usage expectations can vary very much from actual link utilization as the latter depends on the attributes being used and the nature of the transit traffic. Further, depending on concurrent flows, your average overall utilization may be much lower than you expect. For example, for two random concurrent flows across two links, your expectation is an additional 1.5x bandwidth not double.
02-17-2025 07:16 AM
Oh, since OP is titled "lacp port count - best practice", I'll also add although LACP is "sold" as a way to increase bandwidth, possibly just as important, if not more so, it's also very useful for providing redundancy.
For additional bandwidth, especially if you need more than 4 links, if possible, you should consider higher bandwidth capable links.
02-17-2025 07:23 AM
While LACP (or port channels of any sort) increase the effective overall bandwidth, it is important to note that a single conversation traversing a port channel will never get more bandwidth than that of a single physical link.
02-17-2025 09:52 AM
"While LACP (or port channels of any sort) increase the effective overall bandwidth, it is important to note that a single conversation traversing a port channel will never get more bandwidth than that of a single physical link."
100% correct.
Further, to my knowledge, Cisco doesn't support any dynamic load balancing. For example, with two links, and one active flow completing consuming one link's bandwidth, and another not being used at all, a new flow may be directed to the fully utilized link.
So, again, for such reasons, even though, for example, dual links offer double the aggregate bandwidth, it's often to difficult to impossible to obtain it in all cases.
Again, LACP can be very useful to avoid many single points of failure. It also often has very fast recovery time, minimizing the impact of a link failure.
02-17-2025 09:39 AM
There is no 1.
2'4'8 >> this come from all hash is use binary OR/XOR/AND this give use almost good load balance.
MHM
02-17-2025 09:56 AM
"There is no 1."
Laugh, but you can have a LACP of just one link. Not very useful. ; )
02-17-2025 10:04 AM
For what lacp with one link!!!!!!!!!
There is no need and this lead to suspended state.
MHM
02-17-2025 11:39 AM
@MHM Cisco World wrote:
For what lacp with one link!!!!!!!!!
There is no need and this lead to suspended state.
Actually, as I've written, when I wrote they're not very useful, that would be in context of normal operations. Besides the possibly of a single link being the case in a remaining link failure situation, as noted by @paul driver , I've defined single link LACP when converting two operational dual links from non Etherchannel to Etherchannel while attempting to minimize network operational impact.
If it's not obvious, what I've done, in the case of dual L2 links between a pair of devices, I identify the link currently being blocked by STP, shut it down, convert it to a single link Etherchannel, then no shut it. I then shut down the non converted link, make it a member link, and no shut it. Impact should be a single STP converge event. So, it's not zero impact, but minimal impact.
I've also been in the situation, I setup a dual link Etherchannel, but second link isn't yet patched in. So, configuration is for two member links, but only one active until the second is patched in.
02-17-2025 12:02 PM
do you see 1 in table ?????
MHM
02-17-2025 01:20 PM - edited 02-17-2025 01:40 PM
@MHM Cisco World wrote:
do you see 1 in table ?????
No, I don't. But why would I, as the LB ratio isn't applicable for 1 link?
Big difference between LB ratios, which doesn't apply to 1 link, and assuming you cannot run Etherchannel on 1 link!
Also that table's values doesn't apply to modulo 256.
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