cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11391
Views
5
Helpful
12
Replies

Cost stp for etherchannel

fabio.marino
Level 1
Level 1

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.              

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

12 Replies 12

Peter Paluch
Cisco Employee
Cisco Employee

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

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

  • 1 Gbps 3
  • N x 1 Gbps 2
  • 10 Gbps 1

Do you agree?

-- just for reference, even if I have different value ---

1 Gbps420,000
N X 1 Gbps310,000
10 Gbps22,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.

Jon Marshall
Hall of Fame
Hall of Fame

Fabio

In addition to Peter's post see this table -

BandwidthOld STP valueNew Long STP value
10 Mbps1002,000,000
100 Mbps19200,000
1 Gbps420,000
N X 1 Gbps310,000
10 Gbps22,000
100 GbpsN/A200
1 TbpsN/A20
10 TbpsN/A2

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

Hi Jon,

I have some doubt with regard to the above table.

For a 10Gb/s I have a STP of 1 here.

Fabio

I have always seen the cost of 10Gbps to be 2 in all the docs i have read.

Jon

Hi Jon,

Thanks for the reply but I am testing on a real machine here.

No static stp cost is set.

What model of switch is it ?

Jon

  WS-C6509-E (R7000)

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.

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

fabio.marino
Level 1
Level 1

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 ?

  • 1 Gbps 3
  • N x 1 Gbps 2
  • 10 Gbps 1

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?

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.

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:

Review Cisco Networking products for a $25 gift card