STP Puzzle #3 – Answer Part 2

By certskills November 21, 2012 11:06

Root Port, Designated Port, and tiebreakers: Today’s #CCNA fun to wrap up this STP puzzle. Today’s post analyzes the rest of this puzzle’s STP roles and states, now that I told you that all the switches use default costs. Enjoy!

Quick Review and One Assumption

So, as a quick review… So far, we know for sure that S4 is the root. We also know the STP role for all three relevant interfaces on both S4 and S2, with all of those roles making the three ports on S2 and S4 sit in a forwarding state. Figure 2 summarizes those roles.

Figure 2 – Known Information before Considering Port Costs

This next part of the discussion finds all other port roles and states, by assuming the following:

  • All ports use default costs (as stated in the previous post)
  • All ports autonegotiate to use their best speed (as ignored in the previous post)

On that last point, note that the switches adjust their STP costs to mirror the port’s speed, unless the cost is explicitly configured.

Looking for S1’s Root Port

Of the two switches about which we know little, S1 ha a direct link to the root (S4), and S3 does not. It is a little easier to build from the root outward, so the discussion here starts with S1.

S1 has two obvious paths to reach the root. One path includes two links, at FastE speeds, defaulting to cost 19. The other path has two links at cost 19, as follows:

  • S1’s F0/4 = cost 19
  • S1’s F0/2 + S2’s F0/4 = Cost 38

Clearly, S1’s better path to root exits S1’s F0/4 port, making that port S1’s root port.

Looking for Role on the Link from S1 to S2

Next, look at the link from S1 to S2. Then remember these two key STP rules about the roles on a given point-to-point link:

  • One end is the Designated Port (DP)
  • The other end is either a Root Port (RP), or neither an RP nor DP.  That is, there are never two DPs on one link.

In this case, S1 already has an RP, and a non-root switch has only one RP. S1’s F0/2 cannot be an RP. Because S2’s F0/1 is already the DP, S1’s F0/2 cannot be a DP. So the only possible option that matches the known facts is for S1’s F0/2 to be neither RP nor DP, which means it falls to a blocking state, as shown in Figure 4.

Figure 4 – S3’s Role/State on Links to S4 and S2

STP of course did not go through all this detective work. Instead:

  • S2 advertised a Hello, with root cost 19, onto the link
  • S1 advertised a Hello, with root cost 19, onto the link
  • S2 won the tiebreaker, meaning that S2’s Bridge ID (BID) must happen to be numerically lower than S1’s.

The problem didn’t tell us whether S1 or S2 had a lower BID, but it did give enough info to tell us which switch won the DP election.

Looking for S3’s Root Port

Now that most of the details on S1 are settled, next think about S3. It has two two-link paths to root, and two three-link paths to root. With all default cost of 19, the two two-link paths tie at cost 19, as follows:

  • S3’s F0/1 + S1’s F0/4 = cost 38
  • S3’s F0/2 + S2’s F0/4 = Cost 38

So, what’s the tiebreaker in this case? The same tiebreaker used to choose the DP on the S1-S2 link: The lowest BID of the neighboring switch. We already know from the S1-S2 link that S2 won the battle to be DP, based on the lowest BID tiebreaker. S3 bases it choice of RP on those same BIDs, and S2’s BID is numerically lower than S1’s BID. S3 then chooses its F0/2 as its RP.

Looking for Role on the Link from S3 to S1

The final step looks at the roles on the link between S3 and S1. This one is relatively easy, if you remember the root path and root cost analysis on each. By way of review, both S1 and S3 will at some point forward Hellos onto that link, listing their own root cost. The Hello with the lower root cost wins, and that switch becomes the DP. In this case:

  • S1 root path: R1’s F0/4 port, cost 19
  • S3 root path: S3’s F0/2 port + S2’s F0/4 port, cost 38

S1 wins, and S1’s F0/3 becomes the DP on the S1-S3 link. S3 loses, and is neither DP nor RP on the link, and falls to a blocking state, as shown in figure 5.

Figure 5 – S3’s Role/State on All Links

So, for those of you who read this far… any variations on this theme that you’d like to see next time?

STP Puzzle #3 – Answer Part 1, and Part 2 of the Problem
Config Museum: Frame Relay Physical Interface Config
By certskills November 21, 2012 11:06
Write a comment


  1. Chris July 2, 20:49

    These are great, Wendell. Thank you!

    Reply to this comment
  2. Tom October 21, 16:40

    Beautiful example. Thanks. Got me!

    Reply to this comment
  3. Ben Tauler (@bentauler) January 19, 06:41

    Hi, I’ve issues knowing which side of the link gets the Blocking state, and which gets the DP. Is there any rule of the thumb to know?. Also , had issues understanding why S2 BID < S1 BID

    Reply to this comment
    • certskills Author January 21, 16:45

      Hi Ben,
      Sure. BTW, if you have the CCNA 200-301 Cert Guides, it’s described in detail in Chapter 9. In short, with two switches on a link, the winner is the switch with the lowest root cost. If that’s a tie, it’s the switch with the lowest bridge ID.
      Knowing now that S4 is the root, and the claim in the exercise’s first post that all ports use default costs, you can cobble together the result that S2 BID < S1 BID. As follows: with default costs, the FastE ports have cost 19. S1 and S2 root cost will be 19, so their root costs will tie. The winner of which becomes the DP is the switch with the lower bridge ID. We know from information given that S2 wins. Therefore, S2 BID must be lower than S1 BID. Wendell

      Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email