## STP Puzzle #1, Answer Part 3

This 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, 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 each non-root switch uses as their root ports (RPs).

## Step 3: Find the Designated Port (DP) on Each Switch-Switch Link

The designated port (DP) on a link is the switch that, during STP convergence, sends the best (least cost) Hello onto a link. If a tie occurs, the first tiebreaker looks at the Bridge ID (BID) of the two switches on the link, with the best (lowest) BID winning. If that comparison results in a tie, the switch is hearing its own Hellos. Dealing with that topology is interesting, but unrelated to todayâ€™s discussion.

As usual with the steps in the STP puzzle, you can quickly identify some DPs. Focusing on the links between switches, you can look for these cases:

- The rootâ€™s local ports always win the DP election, so mark those as DP.
- If either port on the link is an RP, the other port on the link is the DP.
- If the earlier rules do not tell you which switch acts as DP, then apply the normal STP rules to determine the DP: pick the switch with the lowest root cost, or if itâ€™s a tie, pick the switch with the numerically-lower BID.

Todayâ€™s post walks through these steps.

#### Analysis: First Two (Easy) Rules

Figure 4 shows a reminder of the root switch and the known root ports. Note that the earlier analysis determined the RP on S1 and S3, but not on S2.

Figure 4: Root and Root Port Information, STP Puzzle #1

First, look at the root, and mark both its links (F0/1 and F0/2) as DPs. Easy enough.

Next, look at each RP, find the other end of the link, and mark it as DP. In this case, only S1â€™s F0/3 is newly identified as a DP. Again, pretty simple if you took good notes so far. Figure 5 shows the results to this point, with a DP identified on three of the five links in the topology.

Figure 5: Root, Root Ports, and Known Designated Ports, STP Puzzle #1

#### Analysis: Last (General) Rule

At this point, the DP has not yet been identified for two links: the S1-S2 link and the S3-S2 link, both shown as blue links in Figure 5.Â Because neither link has a known RP, and S4 (the root) is not connected to these links, neither of the two earlier easy methods to find the DP work.

To find the DP on each link, simply compare the root cost of the two competing switches. In this case, itâ€™s a short comparison: S2â€™s root cost cannot be determined from the information in this puzzle. As a result, you cannot find the DP on these two remaining links, because S2 connects to both links.

#### Conclusions, STP Puzzle #1

Figure 5 sums up the answers for STP puzzle #1. The figure shows all the known information about the root, RPs, DPs, and Root Costs (RC).Â In this case, the answer does not list any blocking ports, because the information is incomplete.

Wendell,

Great job with this STP lab. I found your answers informative and it helped me to see another point of view. The lab also helped me to think outside the box.

Look forward to the next lab.

Mark

Hey Mark,

Glad you liked it! I think once I get through another one, I’ll have the format down. I’m ready to get another one out there – hope to get one posted for the weekend. Thanks again…

Wendell

Wendell,

Thanks for the exercises. They are very helpful in solidifying the rules for STP for me. Certainly there is a lot of information and choices for the CCNA route. I am glad that I am able to use this as part of my coursework.

You’re quite welcome! Looking forward to getting back to the CCNA side of my blogging soon.

Wendell

Hi Wendell,

Thanks for the STP puzzle, this comes in really handy since i couldn’t get it down right away and had problems with figuring out which ports where blocking and DP ports.

As a last note, is it possible to post the final outcome with all blocking ports and picture, suggested port S2 fa0/4 is the RP to S4?

Being S2 F0/4 the RP I obtained the following (for a value of 9 in S2 F0/4):

S1 F0/2 RP

S1 F0/3 DP

S1 F0/4 RP

S2 F0/1 DP

S2 F0/3 DP

S2 F0/4 RP

S3 F0/1 RP

S3 F0/2 BLK

S4 F0/1 DP

S4 F0/2 DP

Hello,

I passed the ICND1 with success, thanks to your Official Cert Guide, and now i am studying for the ICND2. My question:

S2 should advertise a maximun root cost lower than 12: (S1 RC=8) + (S2 Port Cost=4) and because S2 will not choose an RP with an higher root cost,

S2 F0/3 announces an RC<=12

S3 F0/2 annouces an RC=27

S2 F0/3 should be the DP on segment S2-S3

Is it correct?

Guillaume

Hi Gulliaume,

As worded, I don’t think you can go there. But if you assume all defaults for the facts not mentioned in the problem statement, yep, that’s reasonable.

Wendell

Hi Wendell, I made some further practice on my own with this excellent puzzle, and I want to confirm if I consider the case where F=13, the S2’s root port is F0/1 and there are two BLK ports: S3 F0/2 and S2 F0/4.

Is this correct? Thanks in advance.

Marcelo,

Well, if you tested it and proved it in lab, I’m in! Seriously though, I am a bit confused. Keep in mind I wrote this content… 6 years ago? So it’s not fresh in mind. I don’t recall saying that there’s some value labelled “F”, and you then choosing to consider a case in which F=13. So I’m a bit lost. But if you built this in lab, and changed some STP settings vs this exercise’s starting point – that’s perfect. That’ the way to really learn STP well.

Wendell

PS Glad you think it’s a most excellent puzzle!

Hello, Wendell!

I want to add some futher infoformation:

Since S3′ F0/1 is the root port, then S2′ F0/4 cost must be equal or greater than 8 because S3′ f0/1 and S3′ f0/3 costs are equal by default. So, S1 has better root cost or bridge ID than S2. But this fact tell us, that S1′ F0/2 is the second designated port.

Hi Wendell.

I think I can add a new piece of info. S1 F0/2 is DP. Please tell me what you think:

First, as you’ve already pointed out , we know S2 F0/3 is NOT an RP. That means one of the other two ports of S2 is RP. Let’s follow both cases:

1- If S2 F0/1 is RP, that automatically means the opposite port, S1 F0/2 is DP.

2- if S2 F0/4 is RP, then based on your other blog “STP puzzle#1 answer Part 2” port cost for this port can only be between 9 to 12.

Now on the link between S1 & S2, the root cost is:

S1 root cost= S1 F0/4 port cost= 8

S2 root cost = S2 F0/4 port cost=9-12

That means once again S1 F0/2 has lower cost and is DP.

Hossein,

I like your logic!

On reflection, this is a really detailed exercise. Makes my head spin re-reading it! ðŸ™‚

Why the S0/2 in SW3 cannot be considered as a DP whereas the other interface is a RP ?

You don’t have a DP and a RP per switch (see condition 2 : If either port on the link is an RP, the other port on the link is the DP) ?

In this way F0/3 Sw2, will be the RP for sw2.

Thanks for your clarification and for your work ðŸ™‚

Hi Nikoh,

You are quite welcome – glad you find the content useful!

This is a really detailed example – maybe too detailed to be of good use. But let me try and give a useful answer.

The problem, as defined, and in the earlier posts, shows that we do not know enough info to determine switch S2’s RP. From what you wrote, I think you are assuming that to be the fact.

You wrote “you don’t have a DP and RP per switch?”. To clarify, each non-root switch has exactly 1 root port, and it might have any number of DPs, even zero DPs. We just don’t know which port on switch S2 is it’s RP based on what we’ve been told.

So, S2’s RP could be its F0/3, and you suggest, and make the S3 F0/2 be a DP. But maybe not – we don’t know S2’s RP. It could be its F0/4 port or its F0/1 port. (Which is one reason I think this example may just be too complex to be useful.)

I really don’t get the point of the designated port. I don’t even get it in the book example with the three switches.

JP,

Well, let me try with a couple more paragraphs. Feel free to follow up.

STP has a goal: to create a topology of forwarding ports so that there is one and only one path for frames to flow between all devices in the VLAN. So, STP does not want too few forwarding ports, so there is no path to reach some devices, or too many, creating multiple paths. One tree so that there is only one path.

The root switch, root port, and designated port concepts are just the mechanisms to achieve the goal. So when you say you do not get the point, the point is the person who made this up first thought to create that concept of a tree, and then figured out a series of mechanisms to choose ports that should forward, and which should block. So the DP concept has a point if you will, but its real point is to be part of the overall process to create an STP topology with one and only one path to reach all devices in the VLAN. The DP has no point, other than as part of the mechanism. And while you can think of the DP alone, you should be thinking in terms of the DP as just part of the process.

The process? 1) Find the Root Switch. 2) Find the RP on each non-root port. 3) Find the DP on each link. The RP and DP ports, move them into a forwarding state, and those ports make up your current spanning tree. All other ports block.

If you will want a specific “so what’s the point of a DP”, it is just a part of the process. But the goal is to pick the better switch on each link, so that the better switch can forward onto that link. The DP choice choose the “best” switch on the link as DP.

I couldn’t have asked for a better answer. I managed to understand STP by the time I posted the question.

What you explained adds a lot more to my knowledge on STP; I like the reasoning behind it.

By the way, I wanted to let you know that I am on IPv4 subnetting part now.

Hi Wendell,

I’m trying to understand if I’m missing something here, can you help?

Why can’t we determine the DPs on S1-S2 link? The exercise facts for S1 and S2 listed in the question tell us that: S1-F0/2 has cost 8 while S2 F0/1 has cost 4, so for me S2-F0/1 port is the DP for that segment, as consequence S1-F0/2 goes into blocking state.

Thank you for your support on helping us to learn.

Sandro.

Hi Sandro,

I’ve been thinking lately I should delete this old and very long STP exercises – they just go into way too much detail. That said, you asked… I hope you’re getting something out of them!

First, you may be thinking the factor to decide “who is DP on a link” is by port cost. Instead, it’s lowest root cost.

So, in the three-answer-post series (this page being #3), post #2 analyzes root cost and then root port on each switch. That post tells us:

S1 has a root cost of 8 over the direct link to S4.

S2 – we don’t have enough information to know. its root cost could be as low as 1, because the scenario does not tell is S2’s port cost on the port with which it connects to S4. (That is, S2’s F0/4 port.)

So, on the question of whether S1 or S2 is DP on the link between them, we know S1’s root cost, but not S2’s, so we don’t know who wins.

Hope this helps,

Wendell

Hi just for OCD’s sake of seeing this completed. If we assume S2 F0/4 is using default cost of 19 would the following STP port states be correct?

S1:

F0/2 Blocking

S2:

F0/1 RP

F0/3 Blocking

F0/4 DP

S3:

F0/2 DP

Yeah, it would be nice to work this one with more concrete numbers…

So, look back to answer post #2 in the series, which breaks down the root costs and then root ports on each switch. Focus on S2 for a moment. That section showed variables for all the port costs. S2 F0/4 cost variable is F. So if F=19, per that post, S2’s three possible root paths have costs of 12 (through S1), 19 (direct to root S4), or 27 + E, which I think we might know E, and that cost is 46. So, S2’s best root cost is 12, S2’s port F0/1 (towards S1).

From your answer then, S1 wins the DP election vs. S2 on their link, so S1 F0/2 forwards rather than blocks.

S2 uses F0/1 as RP as you noted, so it forwards as well. F0/4 it would never win the DP election, as the root switch’s root cost is 0, and S2’s will always be at least 1 (we just figure out S2’s root cost would be 12 in this scenario), so S4 becomes DP on the S2-S4 link, S2 blocks.

S2 is DP and forwards on the S2-S3 link, because S2 has a root cost of 12, S3 as a root cost of… 27.

Hope this helps…

Wendell