STP Puzzle #2 – Answer

certskills
By certskills December 13, 2011 18:03

If you didn’t see the puzzle problem statement, then the answers won’t make as much sense. Especially for this one, the new post this week that gives some suggestions on how to attack these STP puzzles can help. The realization that on a switch-to-switch link, the two ends are either a designated port/root port combi, or a designated port/blocking port combo, really streamlines thinking through the STP topology. Answers below the fold. Enjoy!

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 S3 and S4, as follows:

  • The problem statement says that S4’s BID is worse (higher) than S3’s BID, so rule out S4 as root.
  • S3 has a root port (RP), and only non-root switches have an RP. Rule out S3.

However, the problem does not tell us anything about S1 and S2’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 at the root ports (RPs) and designated ports (DPs).

Skipping Step 2 for Now: Finding All Root Ports

For you process folks out there… I tell you in the “how to attack” post that the next step should be to find each switch’s RP. However, until you know the root switch, finding each non-root switch’s RP will be almost impossible. So I’m skipping this step. FYI.

Step 3: Find All Designated Ports (DPs)

I actually picked the details of this particular puzzle to emphasize a couple of facts that most people don’t think about with STP. With the assumptions in these puzzles, STP works normally. That is, the links all work, they all trunk correctly, the trunking config does not prevent STP from working correctly, and so on. So STP will stabilize to a normal STP topology. When that happens, on every switch-to-switch link, one of two scenarios occur:

  • One end is the DP, and the other is the RP
  • One end is the DP, and the other is “neither”, ie neither RP nor DP

If you just take those two facts and apply them to the known topology at this point, and do not even try to be tricky or infer anything, you’d find a few more facts. Figure 2 shows the new facts in red, with the known facts (from the problem statement) in black:

Figure 2 – Directly Derived Info from the “Link Ends, Stabilized” Rules

The new information (red) was found based on:

  1. S2’s F0/4 is a DP, because S4’s F0/2 is blocking, and is therefore neither RP nor DP.
  2. S2’s F0/3 is a DP, for the same reasons.
  3. S1’s F0/3 is a DP, because S3’s F0/1 is an RP.

With this more complete list of facts, now you can infer a lot more truth about the STP topology.

S2 is Root; It has Only DPs, and No RPs

First, from Figure 2, you can see that S2 has three DPs, but no RPs. Every non-root switch must have an RP, but the root does not have an RP at all. Therefore, S2 is the root switch.

S1’s F0/2 is its RP

Even if you did were not yet convinced that S2 was root, just based on Figure 2, S1’s F0/2 can be one of two things: an RP, which forwards, or neither an RP nor a DP, so it blocks. A link cannot have two DPs, and S2 is already a DP on the S1-S2 link.

Following this reasoning, if S1 were blocking, then there would be no STP path to/from S2, because of the combined blocking interfaces. The only choice left: S1’s F0/1 is it’s RP, making S1 not the root, and leaving on S2 to be the root.

S4’s F0/1 i its RP; S1 is the DP on the Other End

This is probably the most obvious case, but next consider S4 as shown in Figure 2. It has two ports that could be its RP: F0/1 and F0/2. However, we already know that F0/2 is blocking. So, S4’s RP must be its F0/1 port. And then S1 must be the DP on the other end of the link (S1’s F0/4).

Figure 3 shows a revised Figure 2, with the newly-inferred details in green.

Figure 3 – Final Results for DP, RP, Blocked Ports

Summary

All that logic identifies the root, all the RPs, DPs, and blocking ports. However, it does not list enough information to determine the root cost, except for S1 (RC=19). The problem also does not tell us anything about the actual Bridge ID (BID) values; in the end, S4’s BID must simply be better (numerically-smaller) than any of the other switches.

An MC Question with STP, 802.1Q, ARP, and MAC tables
STP Puzzle Overview
certskills
By certskills December 13, 2011 18:03
Write a comment

1 Comment

  1. Jules July 4, 05:14

    Another way to figure out the root switch without having to know the relationship of the BIDs between S3 and S4 is like this:

    1. S1 F0/3 is a DP because S3 F0/1 is an RP.
    2. S4 F0/1 is an RP because the switch only has two interfaces, one of which is in blocking state, and a switch must have exactly one RP unless it is the root switch. We know it is not the root switch because it F0/4 is in blocking state and a root switch has all DP ports.
    3. S1 F0/4 can now be determined to be a DP port because of Step 2.
    4. S1 F0/2 (the only remaining interface to be determined on S1) is either a DP or an RP depending on whether it is the root switch or not. It cannot be a DP because S2 F0/1 is a DP port, and there can only be one DP per segment. Therefore, it is an RP.
    5. That leaves S2 as the only possible switch that can be the root.

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories