cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18918
Views
0
Helpful
4
Replies

LACP - Hashing Algorithms

Nicholas Beard
Level 1
Level 1

Hi all,

I am looking for some help regarding LACP, and in particular its associated hashing algorithms.  I realise there are algorithms based on source/destination MAC and source/destination IP which seem pretty understandable for Layer 2 and Layer 3.  However, it is the underlying algorithm that load balances that traffic type that I would like to understand in greater detail.

Example

If I used LACP for a server and aggregated 4 NIC's at gigabit speeds within a Layer 2 switch, how would traffic destined to and from that server be load balanced?  It is the XOR operation that I am particularly confused about.  As an example, if the server (192.168.1.1) was talking to another server (192.168.1.46) a 2-Bit XOR would be used.  Converting the IP addresses to binary would mean 001 (1) and 110 (6) i think.  The 4 NIC etherchannel would mean a 2 BIT XOR and therefore would mean the 01 and 10 would be used to create an index of 11.  So i believe that would mean Link 3 would be used?  Im guessing therefore, that traffic to and from these IP Addresses would always use Link 3 of the channel.

What i'm looking for here is to better understand when i would need to change the algorithm to load balance traffic more effectively; and also if LACP is even worthwhile being used for server purposes outside of Virtualisation. 

Would the default algorithm be suitable in a single server environment where multiple desktops connect to a single server?

Hope this makes sense!

Thanks

Nick

2 Accepted Solutions

Accepted Solutions

Philip Ratzsch
Level 1
Level 1

Nick,

You're correct in that it's entirely possible to have arrangements wherein some of the links in the port-channel are never actually used.  The trick to getting full use of the port-channel is knowing what the traffic is going to be and chosing the correct load-balancing algorithm.  In the 6500s for example (and other devices as well, I imagine) there is also an option to factor in the TCP port to try to get a more even mix.  As you pointed out, if the XOR comes to the same result every time, the traffic will go over the same link everytime since that XOR result is used a look-up into the physical links.  A mechanism that may work is to assign a secondary IP to the server, one IP being even, the other being odd and having the server round-robin the IPs when sending traffic.  Just a thought, your mileage may vary.

View solution in original post

> but for application servers is this really a necessity?

There are probably some uses where it is - if your application happens to be media-heavy and has to talk to a SAN or something.  At a certain point it makes more sense to throw a 10G NIC into the server than use a port-channel.  When you have a port-channel it kind of becomes like a bank office (at least here in the states); just because you have six windows, doesn't mean there are six people being helped.  When you have a 10G pipe, you actually get 10G of bandwidth (more or less) but when you have say, a 4G port-channel you can't count on 4G of bandwidth necessarily.

I'm not a server expert, but you may want to look into LACP modes, and how they can be implemented on your server.  It's my understanding that a server can be set to at least send it's traffic over the links in sequence (mode 4, if I'm remembering correctly).  That wouldn't necessarily help with return traffic to the server, but you may be able to get a more even distribution out from the server.

>Can you suggest a good tool or feature[clip]

I personally can't, no.  Depending on your control/knowledge with regard to the server, you may be able to make that call yourself (eg, the server is always talking to the same two IPs, so use src-dst-ip).  I'm sure there's something out there that will help with that but I'm unaware of anything.

View solution in original post

4 Replies 4

Philip Ratzsch
Level 1
Level 1

Nick,

You're correct in that it's entirely possible to have arrangements wherein some of the links in the port-channel are never actually used.  The trick to getting full use of the port-channel is knowing what the traffic is going to be and chosing the correct load-balancing algorithm.  In the 6500s for example (and other devices as well, I imagine) there is also an option to factor in the TCP port to try to get a more even mix.  As you pointed out, if the XOR comes to the same result every time, the traffic will go over the same link everytime since that XOR result is used a look-up into the physical links.  A mechanism that may work is to assign a secondary IP to the server, one IP being even, the other being odd and having the server round-robin the IPs when sending traffic.  Just a thought, your mileage may vary.

Thanks for the response Philip; I guess im over complicating things.  With gigabit connectivity would there really be a requirement for a server to operate at greater speeds.  For example, would a domain controller really require anything greater than 1Gbps.  I can understand the requirement for Virtualisation where you may be pushing large amounts of traffic through the adapter, but for application servers is this really a necessity?

Can you suggest a good tool or feature that would adequately confirm bandwidth passing through a servers adapter over a defined period.  Would something like PRTG perform this type of monitoring?

> but for application servers is this really a necessity?

There are probably some uses where it is - if your application happens to be media-heavy and has to talk to a SAN or something.  At a certain point it makes more sense to throw a 10G NIC into the server than use a port-channel.  When you have a port-channel it kind of becomes like a bank office (at least here in the states); just because you have six windows, doesn't mean there are six people being helped.  When you have a 10G pipe, you actually get 10G of bandwidth (more or less) but when you have say, a 4G port-channel you can't count on 4G of bandwidth necessarily.

I'm not a server expert, but you may want to look into LACP modes, and how they can be implemented on your server.  It's my understanding that a server can be set to at least send it's traffic over the links in sequence (mode 4, if I'm remembering correctly).  That wouldn't necessarily help with return traffic to the server, but you may be able to get a more even distribution out from the server.

>Can you suggest a good tool or feature[clip]

I personally can't, no.  Depending on your control/knowledge with regard to the server, you may be able to make that call yourself (eg, the server is always talking to the same two IPs, so use src-dst-ip).  I'm sure there's something out there that will help with that but I'm unaware of anything.

Thanks for your help Philip it has been greatly received.

I'll rate the post now for you.

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:

Review Cisco Networking products for a $25 gift card