Spanning tree question

Unanswered Question
Apr 25th, 2008

Hi everybody.

I want to know how to calculate a path cost between two swicthes linked by 2 links of 100 Mps.

I know that when only one link of 100 Mbps is used, the path cost used by STA is 19, but don't know how to find out the cost of two links of 100 Mps.

The book i was using answers that the path cost is 12.

Assuming that the path cost is inversely proportional to the link speed 1/12 cost does not equal 1/19 + 1/19

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jon Marshall Mon, 04/28/2008 - 00:59

It's difficult to answer for sure as we can't see the topology used by the book but each 100Mb link will cost 19. So if you have

Switch C -> Switch B -> Switch A and all the links from C to A are 100Mbs then cost from C -> 8 = 38.

If there are 2 links between same switches then each would be worth 19 - are the links etherchanneled ?

Jon

farellfolly Mon, 04/28/2008 - 22:32

etherchanneled, yes!

2 links of 100 Mbps between the same two switches.

Jon Marshall Mon, 04/28/2008 - 23:37

Just tested this in lab to make double sure. A 200Mb etherchannel link between two switches has an STP cost of 12.

Each individual link shows as a cost of 12 as does the port channel interface.

I can't find any documentation at the moment on how this cost is calculated. Cost used to be decided by 1000Mbps divided by the bandwidth in Mbps eg. 10BaseT has as cost of 100 (1000/10) etc..

But with the advent of 1Gbps/10Gbps links this didn't work as both these = 1. So the IEEE came up with new values which are non-linear ie.

100Mbps = 19

155Mbps = 14

622Mbps = 6

1Gbps = 4

10Gbps = 2

As they are non-linear i'm not sure how exactly they are worked out.

Jon

farellfolly Tue, 04/29/2008 - 10:10

thanks for the reply.

but if somobody can find ou the computation which leads to the cst the 200 Mbps and the other link types, i'll be very glad

svermill Wed, 05/28/2008 - 07:38

I'm no math expert (and I'm likely about to prove it!), so I could be wrong about all this, but I think you'd need a graphing calculator or something like that (and the knowledge to use it!) in order to figure this out. As was noted, the curve is nonlinear. Actually, it becomes nonlinear after 16 Mbps. Since 4, 10, and 16 Mbps are all older link speeds that you'd expect to find on ancient hardware, I guess backwards compatibility was probably the goal there. Consider:

4 Mbps = Cost 250

10 Mbps = Cost 100

16 Mbps = Cost 62

10 Mbps greater than 4 Mbps by a factor of 2.5. 250/2.5 = 100. Likewise, 16 Mbps is greater than 10 Mbps by a factor of 1.6. 100/1.6 = 62.5 (or simply 62 rounded down). Or you could say that 16 Mbps is four times 4 Mbps and do 250/4 = 62.5, arriving at the same result. So cost is inversely proportional to bandwidth in this lower, older band of speeds.

But if you drop the remaining numbers into a spreadsheet (I have long ago lost my graphing calculator Kung-Foo), you begin to see the curve. The new cost of a 45 Mbps link is 39. That same link speed would have been a cost of 35.6 on the older linear scale. So the nonlinear cost is greater than the linear by a factor of 1.1. Skipping ahead to 200 Mbps, the nonlinear cost is 12. The linear cost would have been 8. The factor is 1.5. By the time we get to 1 Gbps, the nonlinear cost is 4, the linear would have been 1.6, the factor is 2.5. At 10 Gbps we wind up with a factor of 12.5 and by 100 Gbps and beyond, the factor is 62.5.

At the end of the day, I think less effort goes into simply memorizing the new costs (if you are so inclined) than trying to calculate them.

(apologies to any cringing math geeks out there)

jrensink78 Fri, 05/30/2008 - 05:30

I haven't been able to find any publicly published formula for the calculation. Maybe it's in the IEEE standard documentation, but I think you have to pay for that. I snooped around Cisco's documentation, but they didn't give anything other than some of the tables that you have probably already seen.

Anyways, I honestly wouldn't worry too much about seeing an oddball value like that on the real test. I would just memorize the more common ones (10MB, 100MB, 1GB, and 10GB). If you by chance do get an oddball bandwidth question, you should be able to make a fairly accurate guess. Most likely the possible answers will be spaced out enough to make the correct one pretty close to your guess.

Actions

This Discussion