bit index and ether channel

Answered Question
May 22nd, 2008

Hi every body!

I have some confusion about ether channel.

Let say we have two switches: sw1 and sw2.

sw1 and sw2 connected by ether channel.

Ether channel consisits of 3 links which are numbered as L0,L1,L2,

We are using "source and destination ip for load balancing across links in ether channel. Assume host 1.1.1.1 is on sw1, while host 1.1.1.2 is on sw2.

Suppose host 1.1.1.1 send packet to 1.1.1.2 . Since 3 links are being used in ether channel,we use 2-bit index.

Moreover XOR operation would be performed on the right most two of ip addresses i.e

1.1.1.1 "01" would be the binary for digit one "1" in the last octet.

similarly 1.1.1.2 " 10" would be the binary for digit "2" in the last octet.

Now we perform XOR operation on 01

10

-------

1 1

Binary " 11" corresponds to decimal "3"

SO link L3 should be used when 1.1.1.1 sends packet to 1.1.1.2 , but the last link is L2 . Does it mean the links in ether channel should be multiples of "2"?

Am i right?

thanks alot!


Correct Answer by Giuseppe Larosa about 8 years 9 months ago

Hello Sarah,

my opinion is that in a 3 links etherchannel traffic flows that match the '11' pattern are associated to one of the existing links like it would be a circular buffer.

The reason for this is that for forwarding efficiency a clear rule has be used for all traffic flows: so traffic flows where the EXOR of the two least significant bits of source and destination ip address lead to "11" should be associated to link 00 (for example).


hope to help

Giuseppe


Correct Answer by Giuseppe Larosa about 8 years 9 months ago

Hello,

this is part of the problem when dealing with etherchannels: you cannot be sure that traffic will be really load balanced.


With 3 member links you could expect one link to carry 2*25% = 50% of load because using a two bit exor provides 4 possible values : 00-01-10-11 and the last should be mapped to the first link as 00.


As an example from our production network :


SW-RM-TLD066-SF-7#

SW-RM-TLD066-SF-7#sh int gi3/8 | inc packets output

2613764 packets output, 208665458 bytes, 0 underruns

SW-RM-TLD066-SF-7#sh int gi3/9 | inc packets output

1634501 packets output, 148927183 bytes, 0 underruns

SW-RM-TLD066-SF-7#sh int gi3/10 | inc packets output

520445 packets output, 77374046 bytes, 0 underruns

SW-RM-TLD066-SF-7#


SW-RM-TLD066-SF-7#sh ethercha sum

Flags: D - down P - in port-channel

I - stand-alone s - suspended

R - Layer3 S - Layer2

U - in use f - failed to allocate aggregator

u - unsuitable for bundling

w - waiting to be aggregated

d - default port



Number of channel-groups in use: 2

Number of aggregators: 2


Group Port-channel Protocol Ports

------+-------------+-----------+-----------------------------------------------

1 Po1(SU) LACP Gi3/8(P) Gi3/9(P) Gi3/10(P)


where these three links are members of a channel-group negotiated with LACP and on the other side there is a multiple NICs server.



all the ports have come up together and the load-balance protocol i s IPv4 sa exor ipv4 da:



SW-RM-TLD066-SF-7# sh ethercha load-balance

EtherChannel Load-Balancing Configuration:

src-dst-ip


EtherChannel Load-Balancing Addresses Used Per-Protocol:

Non-IP: Source XOR Destination MAC address

IPv4: Source XOR Destination IP address

IPv6: Source XOR Destination IP address

SW-RM-TLD066-SF-7#


here the details:


Port: Gi3/10

------------


Port state = Up Mstr Assoc In-Bndl

Channel group = 1 Mode = Active Gcchange = -

Port-channel = Po1 GC = - Pseudo port-channel = Po1

Port index = 1 Load = 0x00 Protocol = LACP


Flags: S - Device is sending Slow LACPDUs F - Device is sending fast LACPDUs.

A - Device is in active mode. P - Device is in passive mode.


Local information:

LACP port Admin Oper Port Port

Port Flags State Priority Key Key Number State

Gi3/10 SA bndl 32768 0x1 0x1 0x41 0x3D


Partner's information:


Port Flags State Priority AdminKey DevID Age OperKey PortNum PortState

Gi3/10 SA bndl 255 0x0 0000.8726.02af 10s 0x11 0x3 0x3D


Age of the port in the current state: 42d:06h:11m:33s


Port-channels in the group:

---------------------------


Port-channel: Po1 (Primary Aggregator)


------------


Age of the Port-channel = 44d:09h:56m:03s

Logical slot/port = 11/1 Number of ports = 3

Port state = Port-channel Ag-Inuse

Protocol = LACP

Port security = Disabled


Ports in the Port-channel:


Index Load Port EC state No of bits

------+------+------+------------------+-----------

0 00 Gi3/8 Active 0

2 00 Gi3/9 Active 0

1 00 Gi3/10 Active 0


Time since last port bundled: 42d:06h:11m:09s Gi3/9

Time since last port Un-bundled: 42d:06h:11m:39s Gi3/9


SW-RM-TLD066-SF-7#


of course it depends also by the traffic characteristics but of an etherchannel you can trust the redundancy capabilities


Sorry for the long output but I think it can be interesting.


hope to help

Giuseppe

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.

Hi Sarah


I think your confusion may arise due to the way you worded your post.


You wrote "Ether channel consisits of 3 links which are numbered as L0,L1,L2,"


I would write this as "an Ether channel consisits of 3 physical ports, say Fa0/1, Fa0/2 & Fa0/3.


Then as I understand it, when 1.1.1.1 sends traffic to 1.1.1.2 over a 3 port Ether Channel a 2 bit XOR is performed on the two least significant bits (the right most bits), which for the IP address 1.1.1.1 is "01" and for the IP address 1.1.1.2 is "10".


As you said the result of this XOR is "11" or decimal value 3. This means that the traffic between these two IP addresses would use the third port in the Ether Channel or port Fa0/3.



HTH


Best Regards,


Michael

sarahr202 Fri, 05/23/2008 - 07:57

Thanks lot for your reply. If you say xor 11 indicates to use port 3, so xor 01 means port 1 must be used right? how about if xor is 00 which means port 0 should be used which is not in ether channel.So what will happen now ?

Correct Answer
Giuseppe Larosa Fri, 05/23/2008 - 06:19

Hello,

this is part of the problem when dealing with etherchannels: you cannot be sure that traffic will be really load balanced.


With 3 member links you could expect one link to carry 2*25% = 50% of load because using a two bit exor provides 4 possible values : 00-01-10-11 and the last should be mapped to the first link as 00.


As an example from our production network :


SW-RM-TLD066-SF-7#

SW-RM-TLD066-SF-7#sh int gi3/8 | inc packets output

2613764 packets output, 208665458 bytes, 0 underruns

SW-RM-TLD066-SF-7#sh int gi3/9 | inc packets output

1634501 packets output, 148927183 bytes, 0 underruns

SW-RM-TLD066-SF-7#sh int gi3/10 | inc packets output

520445 packets output, 77374046 bytes, 0 underruns

SW-RM-TLD066-SF-7#


SW-RM-TLD066-SF-7#sh ethercha sum

Flags: D - down P - in port-channel

I - stand-alone s - suspended

R - Layer3 S - Layer2

U - in use f - failed to allocate aggregator

u - unsuitable for bundling

w - waiting to be aggregated

d - default port



Number of channel-groups in use: 2

Number of aggregators: 2


Group Port-channel Protocol Ports

------+-------------+-----------+-----------------------------------------------

1 Po1(SU) LACP Gi3/8(P) Gi3/9(P) Gi3/10(P)


where these three links are members of a channel-group negotiated with LACP and on the other side there is a multiple NICs server.



all the ports have come up together and the load-balance protocol i s IPv4 sa exor ipv4 da:



SW-RM-TLD066-SF-7# sh ethercha load-balance

EtherChannel Load-Balancing Configuration:

src-dst-ip


EtherChannel Load-Balancing Addresses Used Per-Protocol:

Non-IP: Source XOR Destination MAC address

IPv4: Source XOR Destination IP address

IPv6: Source XOR Destination IP address

SW-RM-TLD066-SF-7#


here the details:


Port: Gi3/10

------------


Port state = Up Mstr Assoc In-Bndl

Channel group = 1 Mode = Active Gcchange = -

Port-channel = Po1 GC = - Pseudo port-channel = Po1

Port index = 1 Load = 0x00 Protocol = LACP


Flags: S - Device is sending Slow LACPDUs F - Device is sending fast LACPDUs.

A - Device is in active mode. P - Device is in passive mode.


Local information:

LACP port Admin Oper Port Port

Port Flags State Priority Key Key Number State

Gi3/10 SA bndl 32768 0x1 0x1 0x41 0x3D


Partner's information:


Port Flags State Priority AdminKey DevID Age OperKey PortNum PortState

Gi3/10 SA bndl 255 0x0 0000.8726.02af 10s 0x11 0x3 0x3D


Age of the port in the current state: 42d:06h:11m:33s


Port-channels in the group:

---------------------------


Port-channel: Po1 (Primary Aggregator)


------------


Age of the Port-channel = 44d:09h:56m:03s

Logical slot/port = 11/1 Number of ports = 3

Port state = Port-channel Ag-Inuse

Protocol = LACP

Port security = Disabled


Ports in the Port-channel:


Index Load Port EC state No of bits

------+------+------+------------------+-----------

0 00 Gi3/8 Active 0

2 00 Gi3/9 Active 0

1 00 Gi3/10 Active 0


Time since last port bundled: 42d:06h:11m:09s Gi3/9

Time since last port Un-bundled: 42d:06h:11m:39s Gi3/9


SW-RM-TLD066-SF-7#


of course it depends also by the traffic characteristics but of an etherchannel you can trust the redundancy capabilities


Sorry for the long output but I think it can be interesting.


hope to help

Giuseppe

sarahr202 Fri, 05/23/2008 - 07:52

First of all, thanks alot for the detailed reply.But I am still fuzzy about one thing.

AS can be seen from my post, ether channel consists of " 3" links. In ether channel, links are bundled as L0,L1,L2.

XOR output "00" corresponds to link L0

01 corresponds to link L1

10 corresponds to link L2

11 corresponds to link L3

In our case , xor output is 11 which corresponds link L3, but the last link in our ether channel is L2, so what will happen now , xor output "11" indicate link L3 should be used which does not exist in ether channel?

thanks alot!

Correct Answer
Giuseppe Larosa Mon, 05/26/2008 - 03:30

Hello Sarah,

my opinion is that in a 3 links etherchannel traffic flows that match the '11' pattern are associated to one of the existing links like it would be a circular buffer.

The reason for this is that for forwarding efficiency a clear rule has be used for all traffic flows: so traffic flows where the EXOR of the two least significant bits of source and destination ip address lead to "11" should be associated to link 00 (for example).


hope to help

Giuseppe


Actions

This Discussion