STP Puzzle #3 – Answer Part 1, and Part 2 of the Problem
Plain and simple: check out the STP Puzzle 3 problem statement, and predict all the STP details you can. Todays post gives what I think you can (and cannot) figure out from the initial problem statement. It also gives more info, namely STP port costs, so you can figure out the rest of the STP details in this case. Answers are below the fold. Enjoy!
- All STP Puzzles in the blog
- Overview of how to approach these STP puzzles
- Link to the ICND2 book (to learn more STP)
Step 1: Rule Out Switches from Being Root Switch
In the post where I suggest how to attack these problems, I suggest starting by finding the root switch. Everything in the STP topology revolves around the root, so that makes sense. In this puzzle, you can directly rule out S1 and S2, as follows:
- S2 has a root port; only non-root switches have an RP.
- S1 has a higher (worse) Bridge ID (BID) than S3, so S1 would not win the root election.
Working Backwards to Guess the Root Switch
So far, we know that S1 and S2 are not the root, so that S3 and S4 may be the root. However, the problem does not tell us anything about S3 and S4’s BIDs, which is what STP actually uses to choose the root switch. The problem does allow us to infer which is root, but it requires a long look the other information.
In this case, you can rule out another switch as being root by assuming a switch is the root switch, and then looking to see if the other listed details can still be true. This process requires you to think outside the box, and think hard about how STP makes each choice. (That’s actually part of the challenge with these STP puzzles, and where the learning happens.)
So, if you haven’t already, pretend S3 is root, and see if that works given the other details listed in the figure. Then do the same, assuming S4 is root. Then come back and read the rest of this post.
Working Backwards with S4 as Root
Every root switch becomes the Designated Port (DP) on all its links, because the root will always have the least cost path (cost 0) to the root, and the neighboring switch will not. So, if you assume S4 as root, you can also assume S4’s links are DPs, as shown in Figure 2:
Figure 2 – S4 Assumed to be Root
Now ask, does the figure show any cases of breaking the rules? When you read that, you may wonder what the rules are, so here’s a brief review of some that matter in this case. On a single link between two switches, the STP roles with either be:
- DP on one end, and RP on the other
- DP on one end, and no role (and therefore blocking) on the other
In this case, neither of those rules is broken, so this analysis does not rule out S4 as a possible root.
Working Backwards with S3 as Root
Now repeat the process, assuming S3 as root. Again, S3’s two ports will be the DP on their links, as shown in Figure 3.
Figure 3 – S3 Assumed to be Root
This figure shows that with S3 as root, one of the STP rules has been broken. The S3 to S2 link lists two DPs, which cannot happen with STP. If that one leaves you scratching your head a bit, think back to the more traditional view of STP: the switches elect a root, the non-root switches select a local root port, and the switches on each link select one switch to be the DP on that link. The S3-S2 link cannot have two DPs.
Summary
In conclusion, with the information shown, S3 cannot be root, and S4 can, so S4 must be the root switch (as shown in Figure 2).
The Rest of the Story – a New Problem for Next Time
That’s it for what you can definitely know about STP in this network, with the assumption that the switches may not be using default settings. If you find a way to convince yourself of other details, like the RP of S1 and S3, then feel free to post here, and give some defense of your answer.
To figure out the rest of the story, I need to give you more information about port costs. So, for the next activity, assume that all port costs use default settings. Think about that, complete the list of RPs, DPs, and blocking interfaces, and I’ll post some comments about it for the next blog post.
Hello Wendell,
Please a comment on this answer. I know the result from this path will not change the choice of RP on S1 but I think for completeness sake and for those of us still learning, it will be nice to include this path as a possible path to the root from S1 unless there is a particular reason why you did not note this path in the answer? In you answer, you only noted 2 obvious paths to the root without indicating a third possible path to the root from S1 which is from S1F0/3 – S3F0/2 – S2F0/4 with a total cost of 57. Is this a wrong path for S1 to take to the root?
Hi Tewa,
I agree, the S1 – S3 – S2 – s4 path could be the bets path with a carefully chosen combination of interface costs. So to answer your specific question, it is not a wrong path.
Thanks for the suggestion of adding the details to this exercise. I hope to work on more content and cleaning up some of the old in the coming year, so now I’ve got a good note to work from. Thanks!
I did the long way and assigned everything to the default root cost and that helped me find S4 as root. I learned of a quicker method from your explanation. I felt like, I was not on the right track at first but I got it.
Wonderful! Discovery of the solution will make it stick much better than just reading the page in the book again. Keep at these labs!!