12-02-2013 08:25 AM - edited 03-07-2019 04:53 PM
Hi All,
I have a doubt and problem is that I found different and different point of view with regard to this topic so I am not sure which is correct.
I have a port channel bundled with two 1Gbps fastethernet.
Stp cost of the port channel is 3.
If I add a new 1Gbps interface, will the cost change?
Thanks.
Solved! Go to Solution.
12-02-2013 09:58 AM
Hi,
this is a c6509-E (SUP 720-3B), 12.2(33)SXI9, rapid-PVST:
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) PAgP Gi1/1(P) Gi1/2(P) Gi1/3(P)
Gi1/4(P) Gi1/5(P) Gi1/6(P)
6 Po6(SU) LACP Gi6/42(P) Gi6/43(P) Gi6/44(P)
19 Po19(SU) LACP Gi4/13(P) Gi4/14(P)
All the channels show a cost of 3:
#show spanning-tree interface po1 cost
VLAN0174 3
#show spanning-tree interface po6 cost
VLAN0125 3
1#show spanning-tree interface po19 cost
VLAN0076 3
HTH
Rolf
[EDIT]:
Same result on a much older model: c6500 (SUP II), 12.2(18)SXF13, PVST.
Here we have 2Gbps and 4Gbps-Channels, all with a cost of 3.
12-02-2013 08:33 AM
Hi Fabio,
I have a port channel bundled with two 1Gbps fastethernet.
Stp cost of the port channel is 3.
If I add a new 1Gbps interface, will the cost change?
Yes, the cost will change. The STP cost is computed from the bandwidth, and on EtherChannels, the bandwidth of the Port-channel interface is automatically updated to the sum of bandwidths of the active member interfaces. With two 1Gbps Ethernet interfaces, the total bandwidth is currently set to 2,000,000, and the STP cost is computed accordingly. If a third GigE is added to the EtherChannel and becomes active, the total bandwidth will change to 3,000,000 and the STP will recalculate the cost.
If you want to prevent this recomputation, simply set the STP cost statically on the Port-channel interface using the spanning-tree cost command on both switches interconnected with this EtherChannel.
Best regards,
Peter
12-02-2013 09:12 AM
Hi,
Thanks for the reply.
Here now we have
Port channel with 2 x 1Gbps links cost 3
tenGigabitEthernet cost 1
I agree with you that adding links on the port channel will change the stp cost but at the same time I am assuming that a port channel with 5 Links can not have the same cost of tenGigabitEthernet interface. Based on this is valid the statement
Do you agree?
-- just for reference, even if I have different value ---
1 Gbps | 4 | 20,000 |
N X 1 Gbps | 3 | 10,000 |
10 Gbps | 2 | 2,000 |
Moreover, I have RSTP and I think that the only case in whcih there will be recalculation is when a link go into the forwading states. This is the only case in whcih there is a change notification. Correct me if I am wrong.
12-02-2013 08:38 AM
Fabio
In addition to Peter's post see this table -
Bandwidth | Old STP value | New Long STP value |
10 Mbps | 100 | 2,000,000 |
100 Mbps | 19 | 200,000 |
1 Gbps | 4 | 20,000 |
N X 1 Gbps | 3 | 10,000 |
10 Gbps | 2 | 2,000 |
100 Gbps | N/A | 200 |
1 Tbps | N/A | 20 |
10 Tbps | N/A | 2 |
You can see that any mumber of 1Gbps links will be a cost of 3. Notice also how when you get to the higher bandwidth interfaces there is a need to go to the newer STP long value.
Jon
12-02-2013 09:07 AM
Hi Jon,
I have some doubt with regard to the above table.
For a 10Gb/s I have a STP of 1 here.
12-02-2013 09:17 AM
Fabio
I have always seen the cost of 10Gbps to be 2 in all the docs i have read.
Jon
12-02-2013 09:19 AM
Hi Jon,
Thanks for the reply but I am testing on a real machine here.
No static stp cost is set.
12-02-2013 09:32 AM
What model of switch is it ?
Jon
12-02-2013 09:34 AM
WS-C6509-E (R7000)
12-02-2013 09:35 AM
Hi,
For a 10Gb/s I have a STP of 1 here.
I think this was the cost for all speeds >= 1 Gbps in the original 802.1D standard.
With 802.1D-1998 the cost for 10 Gbps was defined as 2 and in 802.1D-2004 as 2.000.
I am testing on a real machine here.
What kind of machine is that? (already answered while I was typing)
Regards
Rolf
[EDIT] :
Just for the sake of knowledge:
With the 2004 Edition of the standard, the BPDU cost field was doubled from 16 to 32 bit and so the recommended values could also be increased remarkably.
It seems that recent IOS-version still use the 16 bit pathcost values in PVST and rapid-PVST modes by default, so there is little scope left for link speeds >1Gbps (4) and <10Gbps (2). So with the 16 bit pathcost we can assume that the default ST cost for all Ethercannels from 2 to 8 Gbps is 3.
Running PVST or rapid-PVST, you can change this by the global spanning-tree pathcost method long command; whereas MST seems to use the long pathcost by default.
So Peter is of course right, provided that the long format was used.
12-08-2013 05:46 AM
Hi Rolf,
So Peter is of course right, provided that the long format was used.
Thank you. I appreciate that!
I believe what we're at here is simply the fact that in general, IOS-based devices perform computations using integer arithmetic only. Rounding off the results may give an impression that there is no change in the result. If the bandwidth of a Port-channel interface changes from 2Gbps to 3Gbps, STP will surely notice this. However, if the formula used to recompute the bandwidth into a port cost causes the results to differ in the fractional part only, after rounding off the fractional part, the integer result remains the same so it appears as if STP did not react. In reality, it did - but the function that converts the bandwidth into STP cost returned the same integer value as before, so the STP did not really need to reconverge.
Best regards,
Peter
12-02-2013 09:42 AM
Hi all,
Thanks for the reply but it does not matter the cost if 2 or 1, my focus here is to understand if the cost on port channel will change as soon a new link is add.
I already received a kind answer from Peter.
The doubt now is
Is it valid the below statement ?
Moreover, I have rstp and I would like to understand if adding this new link the stp will be recalculated. Based on the documentation the rSTP will recalculate only in case a non edge port will go in a forwarding state. Due to the fact that I am going to add this link in an Alternate port, do you think the port will go in forward state?
12-02-2013 09:58 AM
Hi,
this is a c6509-E (SUP 720-3B), 12.2(33)SXI9, rapid-PVST:
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) PAgP Gi1/1(P) Gi1/2(P) Gi1/3(P)
Gi1/4(P) Gi1/5(P) Gi1/6(P)
6 Po6(SU) LACP Gi6/42(P) Gi6/43(P) Gi6/44(P)
19 Po19(SU) LACP Gi4/13(P) Gi4/14(P)
All the channels show a cost of 3:
#show spanning-tree interface po1 cost
VLAN0174 3
#show spanning-tree interface po6 cost
VLAN0125 3
1#show spanning-tree interface po19 cost
VLAN0076 3
HTH
Rolf
[EDIT]:
Same result on a much older model: c6500 (SUP II), 12.2(18)SXF13, PVST.
Here we have 2Gbps and 4Gbps-Channels, all with a cost of 3.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide