cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2220
Views
3
Helpful
21
Replies

lacp port count - best practice

p11l
Level 1
Level 1

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!

21 Replies 21

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 %


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

@p11l 

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

"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.)

 

M02@rt37
VIP
VIP

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:

  • Hash result 0 → Link 1
  • Hash result 1 → Link 2
  • Hash result 2 → Link 3
  • Hash result 3 → Link 4

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.

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Joseph W. Doherty
Hall of Fame
Hall of Fame

"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.

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.

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.

"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.

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

"There is no 1."

Laugh, but you can have a LACP of just one link.  Not very useful.  ; )

 

For what lacp with one link!!!!!!!!!

There is no need and this lead to suspended state.

MHM


@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.

Screenshot (252).png

do you see 1 in table ?????

MHM


@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.