07-15-2024 03:01 AM
Hello, everyone.
I understand that Classic STP used the short cost method which was only 16 bits long. Then, RSTP came in and introduced the long costs which were 32 bits long and accomodated for interfaces faster than 10gbps. I have two questions regarding this:
1. If the short method is only 16 bits long, how come I can have an interface with a cost bigger than 65535? (This is a switch in Cisco CML)
2. I also don't understand, if the initial STP cost was only 16-bits long, why have they decided to start from 100 for 10mbps links and then gradually decrease the value for faster links?
You have 65536 different values to use for cost, yet you start from 100 and then realize that you cannot accomodate for links faster than 10gbps with short cost?
Thank you.
David
Solved! Go to Solution.
07-15-2024 12:59 PM
Hello @Mitrixsen ,
>> You have 65536 different values to use for cost, yet you start from 100 and then realize that you cannot accomodate for links faster than 10gbps with short cost?
The choice of values had to take in account the need to fit the cumulative cost on a daisy chain of switches.
They could have used 1000 as starting value for 10 Mbps link but at the time of protocol publication probably 1G was still not in production.
The costs have been chosen with an inverse logarythmic scale.
Coming to your test :
you have configured a very high cost on one port and this may have lead the local device to switch to long cost type.
Also to be noted, if there are devices downstream your switch they will not receive info about the port with the high cost because the local bridge will propagate the best path to the root bridge 12 not the other one.
So using 16 bits cost field is still enough to propagate the current best path. If you shut the root port on this device you have a more interesting test if you look from a downstream device.
In production networks the recommendation is to have all devices using the same path cost method. To be noted other vendors like Juniper EX switches default to long cost.
Hope to help
Giuseppe
07-15-2024 06:44 AM - edited 07-15-2024 07:07 AM
your image default method must be still short; Look for hidden command "spanning-tree pathcost method " aka, show run all (or full)
because u can change method of path cost from short to long, you can enter value of 2 mil manually; sort of "backwards/upwards compatibility"
I guess, back in 90s they did not think of faster speeds then 10 Gigs; norm was 1 Mbps to 100,
Regards, ML
**Please Rate All Helpful Responses **
07-15-2024 07:24 AM
"I guess, back in 90s they did not think of faster speeds then 10 Gigs; norm was 1 Mbps to 100,"
I cannot confirm, but also consider Cisco's non-standard OSPF auto-cost default was also set such that 100 Mbps was expected to be the fastest, it seems to be a good guess.
07-15-2024 12:59 PM
Hello @Mitrixsen ,
>> You have 65536 different values to use for cost, yet you start from 100 and then realize that you cannot accomodate for links faster than 10gbps with short cost?
The choice of values had to take in account the need to fit the cumulative cost on a daisy chain of switches.
They could have used 1000 as starting value for 10 Mbps link but at the time of protocol publication probably 1G was still not in production.
The costs have been chosen with an inverse logarythmic scale.
Coming to your test :
you have configured a very high cost on one port and this may have lead the local device to switch to long cost type.
Also to be noted, if there are devices downstream your switch they will not receive info about the port with the high cost because the local bridge will propagate the best path to the root bridge 12 not the other one.
So using 16 bits cost field is still enough to propagate the current best path. If you shut the root port on this device you have a more interesting test if you look from a downstream device.
In production networks the recommendation is to have all devices using the same path cost method. To be noted other vendors like Juniper EX switches default to long cost.
Hope to help
Giuseppe
07-15-2024 04:17 PM - edited 07-15-2024 04:21 PM
this is CML vios L2 switch images before and after change cost to 2000000
S1#sh run all | in spanning
spanning-tree mode pvst
no spanning-tree dispute
spanning-tree bridge assurance
spanning-tree transmit hold-count 6
spanning-tree extend system-id
...
spanning-tree pathcost method short
spanning-tree mst simulate pvst global
S1(config)#int g0/0
S1(config-if)#spanning-tree cost ?
<1-200000000> port path cost
S1(config-if)#spanning-tree cost 20000000
S1#sh spanning-tree vl 1
.....
Gi0/0 Root FWD 20000000 128.1 P2p
S1#sh run all | in spanning-tree pathcost
spanning-tree pathcost method short
S1(config)#spanning-tree mod rapid-pvst
S1(config)#
S1#sh run | in spanning-tree pathcost
S1#
S1#
S1#sh run all | in spanning-tree pathcost
spanning-tree pathcost method short
Regards, ML
**Please Rate All Helpful Responses **
07-16-2024 03:34 AM
This cost is depend on vendor
It 16 or 32 bits and each vendor use different cost
You can see other vendor value more than 1000.
The important here is always use long cost when you connect cisco to other vendor.
Short cost not more use in stp
MHM
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