cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2162
Views
15
Helpful
24
Replies

Load balancing in link aggregation

badalam_nt
Level 1
Level 1

Is it possible to use load balancing per packet inside link aggregation ?

24 Replies 24

Jon Marshall
Hall of Fame
Hall of Fame

Petru

When you say link aggregation are you referring to etherchannel ?

If so to my knowledge it is done per packet but the same src/dst pair will always use the same link within the channel because of the algorithm used.

Jon

adamclarkuk_2
Level 4
Level 4

Hi

Jon is right. There are other methods you can use (not just src mac/ip) but they are hardware dependent, here is a link which explains what can be done on what hardware/software and is dependent on how many links are in the Port-Channel:-

hxxp://www.cisco.com/en/US/tech/tk389/tk213/technologies_tech_note09186a0080094714.shtml#topic1

What I'm interested to know is if an end-to-end communication between 2 PCs can benefit of the increased link capacity.

Ex: PC1 <-> SW1 <-> SW2 <-> PC2

Link PC1 - SW1 is 1Gb/s

Link PC2 - SW2 is 1Gb/s

2 100Mb/s links between SW1 <-> SW2, combined in etherchannel

And I fear that load balancing cannot be done per packet, but only per destination, so all packets between PC1 and PC2 will pass through the same physical link.

Hence for a single end-to-end communication, aggregation does not add any benefit.

Per packet would mean that for a same destination first packet will go on link1, second packet on link2 etc.

Petru

You are correct in that communication between the same 2 PC's will use the same link within the etherchannel. So you don't get any additional throughput for this communication.

But it is still load-balancing per packet ie. the etherchannel does not have a concept of a flow in the same way a router would.

So each packet is analysed in isolation but the algorithm used will always choose the same link if the input if the same.

Jon

Thanks Jon.

Just one more question, as I miss the difference compared to router behavior (sorry for limited knowledge and weird questions - I'm in the learning process):

So we can't use Process switching here to load balance the packets between PC1 and PC2 on the 2 links from the etherchannel?

Where can I find the algorithm used in such a case with etherchannel link?

In a router we can load balance the packets from the same src-dst pair if we use CEF or Process Switching AND also use load balancing per packet method.

So that's why I was wondering why not possible to do the same in etherchannel case?

Petru

"sorry for limited knowledge and weird questions - I'm in the learning process"

No need to apologize, NetPro is here for people to learn as well as fix problems.

With a router bear in mind that 2 links are seen as 2 separate links. This is not the case with etherchannel. Logically it is just one link. It may help rather than me going on to have a look at this document which explains how Cisco load-balance across etherchannel links. Have a read and then if you have further questions please come back -

http://www.cisco.com/en/US/tech/tk389/tk213/technologies_tech_note09186a0080094714.shtml

Jon

To quote:

"EtherChannel frame distribution uses a Cisco-proprietary hashing algorithm. The algorithm is deterministic; if you use the same addresses and session information, you always hash to the same port in the channel."

I understand that I could have a TCP connection between PC1 and PC2 on link1 and another TCP connection between PC1 and PC2 on link2, if the result of the hashing algorithm will provide 2 different values.

Am I right?

It depends on which load-balancing method you are using. Most switches support a combination of src/dst mac and src/dst IP address. These would not change between PC1 & PC2 so they would use the same link.

Jon

Hello Jon,

my understanding is that the load balancing is flow based:

what can change are the criteria to decide what link is used but given a flow it will use always the same path and this is not per frame load balancing

It is flow based for efficiency reasons: the switch needs a simple rule to decide out what link to send a frame/packet.

Hope to help

Giuseppe

Giuseppe

From the doc i posted -

"The algorithm is deterministic; if you use the same addresses and session information, you always hash to the same port in the channel. This method prevents out-of-order packet delivery."

The above suggests that each packet is run through the algorithm and that it is then matched to a link within the etherchannel. So it analyses each packet in isolation but obviously with the same src/dst the result will be the same link to send it across.

But happy to be proved wrong. Do you have documentation that states it is flow based.

Jon

Hello Jon,

actually you mean that a detailed forwarding entry is not built but each frame is processed on the fly through the hash algorythm.

This is an important detail of the forwarding process in the anatomy of the switch that can imply a little additional latency when sending the frame out a bundle (I've never tried to test this and it should be difficult to measure).

This approach saves resources on TCAM tables.

From a user perspective it is still a "flow based" load balancing

I just wanted to note that talking of per packet load balancing could be misleading from a user traffic point of view.

Hope to help

Giuseppe

Jon, and if I'm taking into consideration TCP source and dst ports, then hashing could provide different values.

I agree with what you quote from that doc regarding MAC and IP addresses, but there there they didn't mention anything about ports, whereas in that Cisco doc the ports could be used for balancing algorithm.

Hi

If you look at the link I posted earlier you will see the command to select the algorithm you want :-

Issue the port-channel load-balance {src-mac | dst-mac | src-dst-mac | src-ip | dst-ip | src-dst-ip | src-port | dst-port | src-dst-port} global configuration command in order to configure load balancing

Jump down to the Cisco IOS section

hxxp://www.cisco.com/en/US/tech/tk389/tk213/technologies_tech_note09186a0080094714.shtml#topic1#

Adam, thanks for that link.

It is actually based on that link that I draw the conclusion that the communication between PC1 and PC2 can be load balanced over the 2 links from the etherchannel.

But the messages from all you is that it is not like that. So I'm puzzled, wondering actually what do I miss?

As TCP ports are part of the algorithm I find normally that the communication between PC1 and PC2, supposing multiple TCP connections are open and active, could be load balanced between the 2 links.

Is there a flaw in my logic?

PS: And one out-of-topic question, saw it countless times on all forums. What is the reason the links are given with hxxp instead of normally with http ?

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco