11-24-2008 02:35 PM - edited 03-06-2019 02:38 AM
hi every body!
I understand that links in ether channel are are numbered from 0 through 7 . If they are 4 links in etherchannel, they would be numbered as L0,L1,L2,L3.
My question is how etherchannel decides which link will get what number?
For example if we have two switches connected to each other by ports f0/1,f0/2,f0/3 and f0/4 on both sides, which ports would be designated by etherhchannel as L0, L1 ,L2,L3?
Does etherchannel base its own numbering on port number?
thanks a lot!
Solved! Go to Solution.
11-26-2008 01:00 PM
Hello Sarah,
I don't know what I see in your etherchannels is that lowered numbered ports get lower indexes but in our case we usually connect the links in a symmetric way between chassis:
3/6 --- 3/6
3/7 --- 3/7
using manual configuration between switches, LACP with multi NIC servers
So I cannot demonstrate if there is a bundle owner / designated switch that provides a reference but if you read about LACP you can see that it has this concept and then the links are used from the lowest index on the best device.
LACP allows you to assign priorities to the member links
lacp port-priority 33000
see
As a matter of fact, the switches assign indexes to the ports that are member links and this is important to know.
Hope to help
Giuseppe
11-25-2008 02:52 PM
Sarah,
I don't follow you. Here is an output from a 3560 switch etherchannel. I don't see the "link number" you are mentioning:
sh ether de
Channel-group listing:
----------------------
Group: 23
----------
Group state = L2
Ports: 3 Maxports = 8
Port-channels: 1 Max Port-channels = 1
Protocol: -
Ports in the group:
-------------------
Port: Fa0/16
------------
Port state = Up Mstr In-Bndl
Channel group = 23 Mode = On/FEC Gcchange = -
Port-channel = Po23 GC = - Pseudo port-channel = Po23
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 08d:20h:31m:30s
Port: Fa0/17
------------
Port state = Up Mstr In-Bndl
Channel group = 23 Mode = On/FEC Gcchange = -
Port-channel = Po23 GC = - Pseudo port-channel = Po23
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 08d:20h:31m:41s
Port: Fa0/18
------------
Port state = Up Mstr In-Bndl
Channel group = 23 Mode = On/FEC Gcchange = -
Port-channel = Po23 GC = - Pseudo port-channel = Po23
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 08d:20h:31m:41s
Port-channels in the group:
---------------------------
Port-channel: Po23
------------
Age of the Port-channel = 08d:20h:31m:55s
Logical slot/port = 2/23 Number of ports = 3
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel Ag-Inuse
Protocol = -
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/16 On/FEC 0
0 00 Fa0/17 On/FEC 0
0 00 Fa0/18 On/FEC 0
Time since last port bundled: 08d:20h:31m:49s Fa0/18
__
Edison.
11-26-2008 06:57 AM
Thanks for your reply Edison.
Let me quote David Hucaby's cisco press book ccnp bcsn, page# 165, 2nd last paragraph.
"For example an etherchannel consisting of two links bundled together requires a 1 -bit index. If the index is 0,link0 is selected, if the index is 1, link 1 is selected."
Based on the above excerpt , I believe
" links in the bundled are numbered 0 through 7"
But the output you send me does not show any such numbering. I am confused now!
11-26-2008 07:43 AM
Could be output in the book be taken from a CatOS device?
__
Edison.
11-26-2008 07:45 AM
nope!The author makes it clear all the switches mentioned in the book are cisco ios switches as bcmsn only test cisco ios switches not cat os
11-26-2008 07:44 AM
Hello Sarah,
the bits needed are N where 2^N is the number or links if even.
if M the number of links is odd they use 2^N so that 2^N = 2*(M+1).
see the following:
RT-TO-CRN-SF-E-1#sh ethercha 2 det
Group state = L3
Ports: 2 Maxports = 8
Port-channels: 1 Max Port-channels = 1
Protocol: -
Minimum Links: 0
Ports in the group:
-------------------
Port: Gi3/6
------------
Port state = Up Mstr In-Bndl
Channel group = 2 Mode = On Gcchange = -
Port-channel = Po2 GC = - Pseudo port-channel = Po2
Port index = 0 Load = 0x55 Protocol = -
Age of the port in the current state: 223d:15h:05m:27s
Port: Gi3/7
------------
Port state = Up Mstr In-Bndl
Channel group = 2 Mode = On Gcchange = -
Port-channel = Po2 GC = - Pseudo port-channel = Po2
Port index = 1 Load = 0xAA Protocol = -
Age of the port in the current state: 223d:15h:05m:27s
Port-channels in the group:
----------------------
Port-channel: Po2
------------
Age of the Port-channel = 223d:15h:06m:09s
Logical slot/port = 14/2 Number of ports = 2
GC = 0x00000000 HotStandBy port = null
Passive port list = Gi3/6 Gi3/7
Port state = Port-channel L3-Ag Ag-Inuse
Protocol = -
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
>>> 0 55 Gi3/6 On 4
>>> 1 AA Gi3/7 On 4
Time since last port bundled: 223d:15h:05m:28s Gi3/7
RT-TO-CRN-SF-E-1#
and the load balancing results are:
RT-TO-CRN-SF-E-1#sh int gi3/6 | inc packets input
19316740348 packets input, 7645373105779 bytes, 0 no buffer
RT-TO-CRN-SF-E-1#
RT-TO-CRN-SF-E-1#sh int gi3/6 | inc packets output
56388153914 packets output, 31869177098092 bytes, 0 underruns
RT-TO-CRN-SF-E-1#
RT-TO-CRN-SF-E-1#sh int gi3/7 | inc packets input
13559583829 packets input, 6899192766728 bytes, 0 no buffer
RT-TO-CRN-SF-E-1#sh int gi3/7 | inc packets output
41856191802 packets output, 29354515790563 bytes, 0 underruns
RT-TO-CRN-SF-E-1#
The book says that the member links are indexed from 1 to M as needed and the result of the load balancing algorithm (whatever is in use) associates a flow to a link outbound for transmission.
Edit:
this is a C6500 with sup720 3B
the links need to be indexed internally the show commands may or may reflect this depending on platform and IOS
Hope to help
Giuseppe
11-26-2008 08:26 AM
Thanks for your reply Giuseppe!
Towards the end of output,you sent ,we can see:
index load port Ecstate etc
My question is how etherchannel assigns the index to ports? For example in the output etherchannel assigns 0 to Gi3/6 and 1 to Gi3/7
i understand that how the bits from source mac or whatever load balancing method is configured, are used for hashing algorithm which in turn determine the link to be used.
For example if hashing algorithm yields 00 , then link 0 is used etc. The only thing , i want to know how etherchannel decides which port/link will get what i.e 0,1 in the bundle.
thanks alot!
11-26-2008 08:48 AM
Hello Sarah,
interfaces are already associated with several numbers/indexes:
ifindex: SNMP number for the port
STP port id: priority:port-number (ifindex I guess)
then also the bundle negotiation protocols if used can label/identify the links.
For lacp is stated that the two system-ids are compared and the winner decides what links are used starting from its lowest numbered link.
I don't know if PAGP has the same criteria or relays on STP choices/numbering or even ifindex.
in our case:
RT-TO-CRN-SF-E-1#sh snmp mib ifmib ifind g3/6
GigabitEthernet3/6: Ifindex = 12
RT-TO-CRN-SF-E-1#sh snmp mib ifmib ifind g3/7
GigabitEthernet3/7: Ifindex = 13
RT-TO-CRN-SF-E-1#
RT-TO-CRN-SF-E-1#sh snmp mib ifmib ifind po1
Port-channel1: Ifindex = 140
RT-TO-CRN-SF-E-1#
you can expect lower numbered ports to get a lower index but the reference can change depending on the configuration (manual, PAGP, LACP).
From a practical point of view this is not important.
RT-TO-CRN-SF-E-1#sh spanning-tree int po1
Vlan Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0001 Root FWD 3 128.1665 P2p
VLAN0005 Desg FWD 3 128.1665 P2p
VLAN0006 Root FWD 3 128.1665 P2p
we see that STP port number differs from ifindex.
Hope to help
Giuseppe
11-26-2008 11:18 AM
thanks for your reply! I understand that various protocols such as stp assign thier own port number to interfaces. Likewise Etherchannel also assigns number called index to ports in etherchannlel. The index could range from 0 to 7.
My question was how does etherchannel assig the index to links in etherchannel for example a four-link etherchannel number the links as L0,L1,L2'L3 ?
My hunch is etherchannel assigns these number to links in the order they are configured for etherchannel. For example if I configure the following ports for etherchannel in strictly same order they are listed:
f0/4,f0/3,f0/2,f0/1.
Then f0/4 would have index" 0",f0/3 have index" 1",f0/2 have the index "2", f0/1 have the index "3".
Am I correct?The good idea would be to implement the above on real switches which I unfortunately can't do, and let the results speak for themselves.
Thanks alot!
11-26-2008 01:00 PM
Hello Sarah,
I don't know what I see in your etherchannels is that lowered numbered ports get lower indexes but in our case we usually connect the links in a symmetric way between chassis:
3/6 --- 3/6
3/7 --- 3/7
using manual configuration between switches, LACP with multi NIC servers
So I cannot demonstrate if there is a bundle owner / designated switch that provides a reference but if you read about LACP you can see that it has this concept and then the links are used from the lowest index on the best device.
LACP allows you to assign priorities to the member links
lacp port-priority 33000
see
As a matter of fact, the switches assign indexes to the ports that are member links and this is important to know.
Hope to help
Giuseppe
11-26-2008 07:46 PM
Thanks for your reply Giuseppe!
I understand that how lacp assigns role to end points(switches). Switch with lower system priority, decides the make-up of etherchannel.
The port priority is used to decide which port should participate etherchannel, default is 32768 which can be modified .
Lacp uses these( system priority, port priority)to decide:
1)Which switch becomes the " master" to decide the make-up of etherchannel
2)which port should participate in the formation of etherchannel.
My question was about index ,how are these indexes assigned to ports in etherchannel?
Do they get assigned on "first- come -first serve" basis?
If I configure the ports in this order f0/2,f0/4,f0/3, would it result :
f0/2 index=0
f0/4 index=1
f0/3 index =2
thanks a lot!
The link you forwarded, does not hint anything as to how index is assigned to port in etherchannel .
I read numerous cisco documents but still out of luck!
11-30-2008 05:15 AM
Thanks for your reply Edison!
As Giuseppe pointed out the show commands may or may not show the index depending upon platform/ios.
Actuallly, I was refering to "index" which can be seen at end of the output,you sent to me.
I should have worded my question better .
Thanks a lot!
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: