STP Puzzle #1, Answer Part 1

 In 200-301 V1 Ch09: Spanning Tree, 200-301 V1 Part 3: VLANs, STP, STP Puzzle

This post starts to answer STP Puzzle #1. As usual, check out the original post to make sense of this one. These puzzles give you some info about Spanning Tree Protocol (STP) in a particular network. Your job: figure out all STP settings you can, like the root switch, root ports, designated ports, and so on. This is not a good way to learn STP from scratch – check out my ICND2 book for that. Check out the beginning of the answer below the fold!

Strategy: Find the Root Switch First

Everything to do with STP revolves around the Root Switch, or simply the Root. The root has the lowest value for its Bridge ID (BID). The BID, a per-VLAN value in the default PVST+ mode assumed in CCNA, is just a number. But the BID does have structure: it begins with the bridge priority, followed by a MAC address.

If the problem tells you all the BIDs, finding the root is simple: just pick the lowest BID. If not, try out these steps:

  1. Rule out switches with a worse (higher) Bridge ID (BID) as compared with all known switch BIDs.
  2. Rule out switches that have a Root Port (RP). (Only non-root switches have a root port.)
  3. From the remaining candidates, pick one, and try to rule it out based on other known information, like known RPs.

Rule Out S1 and S3

This puzzle told you two key facts that let you immediately rule out S1 and S3. As a reminder, Figure 2 shows the same topology, with the pertinent known information in blue. Those blue facts were just text in the original problem statement. The red items show the conclusions.

Figure 2: Ruling Out S1 and S3 from Being Root

Simply put, S1’s BID is higher than S4’s, ruling out S1. S3 has a Root Port (RP), so it cannot be the root by definition. That leaves S2 and S4 as possibles.

Strategy: Assume a Switch is Root, and Find Impossible Cases to Rule it Out

Next, just pick either S2 or S4 as root, and try to find reasons to rule it out. I picked S2 to start.

The key to the puzzle at this point is to think about RPs. In this problem, we know out RP fact for sure, and can make a second easy leap of logic:

  • (Known) S3’s RP is its F0/1 port
  • (Derived) S1’s F0/3 cannot be S1’s RP

Frankly, you would not learn STP this way. However, you can start with any information about RPs, and try to find reasons why a particular switch could not possibly be the root switch. Knowing the facts in the above list, is it possible that S2 is root? If you find a reason to rule out S2, great. If not, repeat this same process assuming S4 is root.

Think about S2 as Root: Can You Rule it Out?

A switch chooses its RP based on the shortest path to the root switch. S3, with known RP F0/1, must have a better (lower) cost path to the root out S3’s F0/1 port – otherwise, S3 would not have chosen its F0/1 as RP. With me so far?

To make this next part easier to discuss, I will assign a letter as the STP cost for each interface in the topology. Figure 3 shows those letters, A-J. Also, the problem statement mentioned that some switches used default costs, and in the problem statement, I forgot to mention that all links run at their maximum speed based on the interface type (FastEthernet). Note that the STP cost defaults based on the actual speed of the interface. (I’ll do better in the problem statement next time.) In this case, the links that use STP default costs will have a cost of 19.

Figure 3: Generic Cost Variables and Known Cost Values

In this topology, S3 has three possible paths between itself and the presumed root S2. The least-cost path would have to start with S3’s F0/1 port, otherwise S3 would not have chosen its F0/1 port as RP. Those paths are:

  1. S3 F0/1 – S1 F0/2 – S2
  2. S3 F0/1 – S1 F0/4 – S4 F0/2 – S2
  3. S3 F0/2 – S2

The cost to reach the root is the sum of all the outgoing port costs in those paths. Adding those up, you see the following:

  1. G + C = 19 + 8 = 27
  2. G + B + J = 19 + 8 + J = 27 + J
  3. H = 19

Of these three paths, clearly the 3rd path has the lowest cost. But… that path is the one that exits S3’s F0/2 interface. So S2 could not possibly be the root switch in this case, because the problem has told us that S3’s F0/1 is its RP.

Conclusion: S4 Must be Root

For the answer to the problem, we have now ruled out three of the four switches as not being root. S4 is the only one left, so S4 must be the root switch.

Big Disclaimer: Good for Learning, Way Past the Exam (Probably)

Before anyone panics… the above kind of thinking may be a good way to exercise your understanding of STP. But it does require you to think way outside the box. I would expect the actual exam to ask you more traditional STP questions. You tell me if you think that working through these kinds of ideas helps solidify your understanding of STP?!?

Next post, I’ll work through most or all of the rest of the logic.

STP Puzzle #1
STP Puzzle #1, Answer Part 2
Notify of

Newest Most Voted
Inline Feedbacks
View all comments

[…] link between switches. As usual, check out the original post to make sense of this one. Note that answer part 1 looked at the reasons why S4 becomes root, and answer part 2 looked at how to determine which ports […]


Thank you! Your books and blog have been an immense help 😀

Davide Fort

Thank you! This way of learning really help me to understand STP

Elango Gansamurthy

S3 – Fa0/1 – Root Port. Definitely not a root-switch.
– Fa0/1 and Fa0/2 have default cost which are equal
– if S2 is root-switch, Fa0/2 will be the root port given default value for all links port cost
– Given Fa0/1 is root-port and Not Fa0/2, confirms that S2 is not a root-switch
– S4 is the root-switch
– Fa0/2 Alternate Port, blocking

S1 – Based on bridge ID, definitely cannot be a root switch
– Fa0/4 Root-port
– Fa0/2 Designated-Port
– Fa0/3 Designated-Port

S2 – Definitely not a root-switch
– Fa0/4 Alternate Port,Blocking, Cost=19
– Fa0/1 root-port port, Cost=12
– Fa0/3 Designated port, Cost=19 less than S3 Cost=27

S4 – Root switch
– Root priority – 28763
– Fa0/1 and Fa0/2 – Designated Ports(by virtue of being root-switch)

Trent Bontly

How do you know S3 F0/1 is an RP?


Hi, thank you for the exercise. Although questions of this type may not appear in the actual CCNA examination, with exercises like these, I am confident that I’ll have an easier challenge when answering exam questions. These questions create a profound knowledge and solidifies the understanding of STP.


There is a problem with S4’s Bridge ID: 28763:0020:4444:4444.That’s means priority = 28672 and VLAN = 91. But I think it’s just mis-typed : 28763 rather than 28673.

Wendell Odom

Thanks! I agree with you. I fixed it in the problem statement post. Thanks again…

Wendell Odom

Note to all: In the problem statement post, I fixed/changed the S4 Bridge ID to a legal value in VLAN 1 – 28673. It was formerly typoed as 28763.


I think the giveaway fact is that S2 has costs on two of it’s interfaces as given to us in the question. This means it can’t be the root switch. Am I correct?

Wendell Odom

Hi Chris,
Sorry, no. All switches have STP cost settings on their interfaces. However, the root switch’s interface costs do not factor in to any root cost calculations. So in a human sense, I guess you might guess that a question wouldn’t note the STP interface costs on a root switch’s interfaces. 🙂 But they still have a cost setting.

Attila Molnár


This was my logic:

I started with S3. S3 has got a Root Port, so it can’t be the Root (first switch eliminated). All of S3’s interfaces have default settings. If S2 were the Root, S3’s F0/2 interface would be the Root Port, but it isn’t. This means that S2 can’t be the Root. Second switch eliminated. So either S1, or S4 is the Root. Do we know anything about their settings? Yes: S1’s priority is the default, but S4’s is a lower (=better) one.

Conclusion: S4 is the Root.

Maybe I didn’t understand the answer post, but other determining which switch is the Root, can we say anything else for sure?


Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Would love your thoughts, please comment.x