Re: EtherChannel load-balancing

From: ESECCIE (e.s.e.ccie@gmail.com)
Date: Wed Jul 25 2007 - 16:09:45 ART


Hi Kirit,
Maybe this info don't apply to your question about how the etherchannel
works in 3550 & 3560, but I think that this is a good info for the 6500:

EARL7 - Hash Algorithm - X^17+X^4+1 - supports L2 (SA (or) DA (or)
SA/DA) & L3 (SA (or) DA (or) SA/DA) & L4 (SA (or) DA (or) SA/DA) (or) MPLS
tag based load balancing

It's a complicated 17th-degree polunomila algorithm that was implemented in
Hardware. It's only mentioned in CAFE HW Specs.(ENG-15114). The way it
worksis: The switch takes the IP or MAC address(depends on the HW Rev.) and
applies the algorithm to it and generates a 3-bit hash value. This is done
separately or both Source and Destination addresses.
The hash values are combined in Exclusive-OR way to generate a unique 3-bit
value. Based on this value, one of the 8-ports are chosen. Before this is
done, anotherregister(dsel_reg) will be set based on the number of ports in
a channel. For example, if only 2-ports are in a channel, the dsel register
is set in such a way that the alternate hash values are applied to each port
of a channel. If you look at the following command, by varying the number of
ports of a channel, you will get a clear picture as how dsel_reg will be
set.

Note:
 The way the traffic is distributed among the bundle is, the earl computes
rbh (result bundle hash) value in the range 0..7 for every flow based on the
config (mac addres or ip or port numbers, destination only or source only or
src xor destn). The ports are setup with a mask which indicates which values
it would accept for transmission.

so if you had 8 ports, each port would accept one value.
       1, 2, 4, 8, 10 etc.
if you had 4 ports, each port would accept two values. mask would be
           11, 22, 33, 44
if you had 2 ports, each port would accept four values
            AA, 55

When you have odd number of ports like 3, 5 or 7, some ports will have to
takeup extra values than other ports.
       3 ports : the distribution would be port 1 - 3 values,
                                                            port 2 - 3
values,
                                                            port 3 - 2
values
       5 ports : the distribution would be 2, 2, 2, 1, 1
So, in essense perfect load balancing even with randomized addresses can be
achieved only if you have 2,4 and 8 port channels.
For other port channels the load balancing would be :

For 6 port channel the load balancing would be 2:2:1:1:1:1
For 3 port channel the load balancing would be 3:3:2
For 5 port channel the load balancing would be 2:2:2:1:1
For 6 port channel the load balancing would be 2:2:1:1:1:1
For 7 port channel the load balancing would be 2:1:1:1:1:1:1

For Native IOS:

esc-6513#show interfaces port-channel 1 etherchannel
Age of the Port-channel = 00d:00h:08m:58s
Logical slot/port = 14/3 Number of ports = 2
GC = 0x00010001 HotStandBy port = null
Passive port list = Gi9/1 Gi9/3
Port state = Port-channel L3-Ag Ag-Inuse

Ports in the Port-channel:

Index Load Port EC state
------+------+------+------------
  0 55 Gi9/1 on <---for eg, we have a 2-port channel
here and '55' is 4-bits used.
  1 AA Gi9/3 on and 'AA' is 4-bits used. so, the
load balancing will be 4:4 (ie equal)

Time since last port bundled: 00d:00h:01m:38s Gi9/3
Time since last port Un-bundled: 00d:00h:02m:22s Gi9/3

For CatOS:

In this eg, I have a 3-port channel, as you can see port 1 takes 3 values,
port 2 takes 3 values and port 3 takes
3 values. So, the load balancing would be 3:3:2

esc-c6509-c (enable) show agport
--- 13/1 ---
old_mem_cnt = 0; path_cost = 2; path_vlan_cost = 2
trunk_id = 768, time_stamp = 109395971, agifindex = 799
chnl_list = 1/1-2,2/1
agport_list = 1/1-2,2/1
bndlctrl: prtcnt = 3, num_map = e0, dist_req = 2, dist_port = 0
mod port bndl_port bndl_sel bndl_sel* act_flag no_bits
1 1 0 e0 e0 2 3
1 2 1 1c 1c 2 3
2 1 2 03 03 2 2
0 0 0 00 00 0 0
0 0 0 00 00 0 0
0 0 0 00 00 0 0
0 0 0 00 00 0 0
0 0 0 00 00 0 0

Regards
ESE

----- Original Message -----
From: <kirit4144@gmail.com>
To: <ccielab@groupstudy.com>
Sent: Wednesday, July 25, 2007 2:54 PM
Subject: EtherChannel load-balancing

> Hi Group:
>
> Does anyone have good document or link which describes how load-balancing
> works in EtherChannel?
>
> Also, is there any functionality (for load-balancing) difference between
> 3550 and 3560 that we should be aware of?
>
> Appreciate your help!
>
> Thanks,
> Kirit
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sat Aug 18 2007 - 08:17:42 ART