STP Puzzle #1

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

This blog post is the first of what may be a whole new type. You can read all day about Spanning Tree Protocol (STP), and learn the theory, but that’s not enough. When you later try to apply STP concepts to a new topology, or to the same topology that has different STP settings, many people just need practice working through the concepts. That practice is very useful, and my ICND2 book has practice questions about STP. However, it seemed like this is a topic for which a few more practice problems could help.

I’ll do a longer background post on what I’m after here, but I wanted to go ahead and post a problem and see if I could get you folks thinking and get some feedback. If you want to think about STP, look below the fold!

Big Picture: Find the Root Switch, Root Ports, Designated Ports, and all Blocking Ports

The heading gives you most of your marching orders. This problem gives you some information, but not all information, about setting related to STP in the small switched network shown in Figure 1. Treat the information given as a puzzle, and see how much you can figure out about the topology. In particular, what can you determine for certain in regards to which switch is root? The root port on all non-root switches? The designated port on each link? And which ports block?

To list your answers, just mark each port in the figure as RP (root port), DP (designated port), or BL (blocking), and note the root switch. When you can, note each non-root switches cost to reach the root through its root port, which of course matters to the decision of which switch becomes the designated port on links.

Some rules:

  1. The problem lists partial information, so you may not be able to determine all STP facts. Part of your job is to figure out what you cannot tell from the information given.
  2. Unless otherwise stated, assume that the problem relates to the STP topology for VLAN 1
  3. Do *not* assume that the switches use default configuration. That is, if a fact is not stated by the problem, it may be set to a default value, but it also may not e set to a default value.
  4. If you have questions or comments, make sure and list you reasoning that leads up to the question or point.

On that last rule, what I mean is this. If you believe it is impossible to know whether switch S1 or S3 is the root, but you know that it’s not switch S2 or S4, and you want to confirm that you cannot know for sure if S1 or S3 is root, then maybe start with why S2 and S4 are not root.

Today’s Problem

The switches use the topology as shown in Figure 1:

Examples 1 through 4 lists the facts supplied as part of the problem.

Example 1: S1 Facts

VLAN 1 Bridge ID: 32769:0020:1111:1111
Port F0/2 Cost: 8
Port F0/4 Cost: 8

Example 2: S2 Facts

Port F0/1 Cost: 4
Port F0/3 Cost: 19

Example 3: S3 Facts

Root Port: F0/1
Port Costs: All defaults

Example 4: S4 Facts

VLAN 1 Bridge ID: 28673:0020:4444:4444
STP Puzzle Overview
STP Puzzle #1, Answer Part 1
Notify of

Newest Most Voted
Inline Feedbacks
View all comments
Mark M.

S4 is the root. BID is lowest. F0/2 on S3 is blocking. S3 root port is F0/1 as stated. Cost to root is 19 + ? on F0/2. F0/3 on S2 cost is 19. Even with limited info, I was able to see the paths.

Mark M.

Given the information available, S2 F0/3 has a cost of 19. S2 cost to the root will be less than S3. S3 is not directly connected to S4 unlike S2. Given the defaults, S3 F0/2 should be 19 plus whatever the cost from S2 F0/4 cost to root is.

Mark M.


Here is my thought process. You are right that S3 cost to root may be less than S2. S2 port F0/4 might be cost 100, because we do not know the link type. If the root is S4, then F0/4 on S2 and F0/4 on S1 are directly connected to the root bridge.

I see that I made assumptions based on just looking at the topology and not thinking it through.

Here is what I believe is the correct answer:

S4 – Root Bridge F0/1 & F0/2 Root ports

S2 – F0/1 Root port, F0/3 Designated port, F0/4 blocking

S1 – F0/4 Root port, F0/2 & F0/3 Designated ports

S3 – F0/1 Root port, F0/2 Designated port

Thanks for the challenge Wendell. I am taking the 640-802 test soon, so this was good practice. I am looking forward to your answer.

Mark M.


Thanks for the input and giving a thought provoking lab question. I would like to suggest another STP lab that has given me trouble in the past.

How about a lab question with STP on a per vlan basis and how to figure out root port, blocking and designated ports.

Thanks for your time.


Mark M.


Thanks for taking the time to prepare these labs. I think that this could be a great 2 part question.

Using the same topology and basically the same info, just add 1 or 2 vlans and let us figure out the answer just looking at the topology. The second part of the question could be to see if what we determined what the answer was looking at the topology and matching it to the command output. Seeing is not always believing.




Wendell can I send you a Pearson question that I’m confused about?

[…] 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 […]

[…] post looks again at STP Puzzle #1. As usual, check out the original post to make sense of this one. Part 1 of the answer determined […]

[…] post wraps up the discussion of STP Puzzle #1 with a brief look at finding the designated ports (DPs) on each link between switches. As usual, […]

De Jongh S.

Could it be possible that there’s a mistake in S4 Bridge priority ?
On cisco switch running PVSTP by default, STP Priority must be configured using increments of 4096.

So for VLAN1, 28763 isn’t possible. Btw i think it’s just a typing mistake.
Pri should be 28672 + 1 (for sys-ext or vlan-id).

And sorry to see that fun post so late.

Frank Lee

My answer: (RP Root port, DP Designated Port, BP Blocking port)
S1. RP: F0/4; DP: F0/2, F0/3
S2. RP: F0/1; DP:F0/3; BP: F0/4
S3. RP: F0/1; BP: F0/2
S3. DP: F0/1, F0/2


–S1 cannot be the root switch
>S1 has higher priority than S4
–F0/3 on S1 is the designated port
–F0/4 is the root port
>Since both F0/4 and F0/2 has the same cost and the path through F0/2 will add up the cost of one more link (S2-S4) which must have at least a cost of 1 (which would generate a total cost of 9), F0/4 is the root port.

–S2 cannot be the root switch
>S3 has F0/1 as its root port. The first step towards electing a port as a root port is the path cost. F0/1 has a cost of 19 and F0/2 on S1 has a cost of 8. So, to reach S2, it would be a total cost of 27. Through F0/2, the total cost would be 19. However, S3 didn’t choose F0/2 as its root port, meaning that S2 isn’t the root switch.
–S2’s F0/3 is the DP as every segment has a DP and F0/2 on S3 is in a blocked state.

–S3 cannot be the root switch
>S3 has a root port (F0/1)
–S3 has a root cost of 27
–F0/2 will be a blocked port since S2, per the interfaces costs on the topology, would have at least a root cost of 12 and the election of the DP relies first on the root cost.

–S4 is the root switch
If none of the other switches are the root, then S4 is the root switch.
–F0/1 and F0/2 on S4 are designated ports

Punya Athma

There is a possibility S4 becomes root Switch, comparing with S1’s BID:-

The S4 priority, 28763 is less than,
the S1 priority, 32769.
i.e, The S4 BID is < S1's BID.

If, S4 is the root switch, the two ports F0/1, and, F0/2 of S4, become Designated ports.

S1 has three paths to reach the root switch S4. They are:-

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

The path hosts for the above paths:
S1, F0/2 = 8, given in the problem.
S2, F0/4 = ?
So, S1, F0/2 – S2, F0/4 – S4 = 8 + ?

the other path:
S1, F0/3 – S3, F0/2 – S2, F0/4 – S4 =
S1, F0/3 + Default + S2, F0/4 – S4 =

The third and last path:
S1, F0/4 – S4, this is the shortest path to the root switch.
So this becomes the root port on that segment.

S3's F0/1 is Root port, given in the problem.
Therefore the other end, the port F0/3 of S1, is Designated port.
S1's F0/2 is also a designated port because S1's F0/4 is a root port, but on the segment of S1 – S2, S2's F0/1 is a root port as S2's F0/1 is closer to the root switch, but, F0/4 of S2 cudn't be root port as there can't be two root ports on a non-root switch. Therefore by configuring a higher port cost, i.e, more than 4, for, S2, F0/4, S2's F0/1 could be made a root port. Thereby, S1, F0/2 becomes the designated port, however, S1's F0/3, is a designated port also, because, S3's F0/1 is a root port, (given).

Although, not enough information is given, to continue further in this scenario, chances are likely, for S1's F0/3 becomes an alternate port and changes it status as a Blocking port.


Question: Is the way I came to the same conclusion about S4 being the root switch is valid?

1. S1 is not the root switch because S4 has the lower BID.

2. S2 & S3 both have root port costs greater than zero so neither of these switches are the root switch.

3. Given the above observations, S4 is the root switch.

Thank-you for your help!

Wendell Odom

FYI, I fixed/changed the S4 Bridge ID to a legal value in VLAN 1 – 28673. It was formerly typoed as 28763.


The root creates and sends a Hello BPDU with a root cost of 0, out all its working interfaces (those in a forwarding state)
pg 225

just want to know that this root cost = 0 is by default or no?
(because i thought before this puzzle that ROOT’S root cost =0 everytime)

Wendell Odom

Hi Sana,
You can think of it as “by default”, but there’s no other option – it’s the way it is. The root switch’s cost to reach itself is defined as 0. So when the root switch creates and sends the Hello BPDUs, those messages list root cost 0. So it’s not really a default, because default implies that you can change it. It just… truth: root switch has root cost 0.

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