# Answer to the #CCNA STP Question

No muss, no fuss, let’s dig into STP for #CCNA with the explanation and answer to the previous post’s STP question! Complete with pretty pictures!

(Wendell – #213.)

## The Explanation

I organized the answers in the order shown on purpose so I could break down the explanation in the same order. Answers A and B build on each other, while C and D mostly stand alone. All require that you connect the show command output from the question to all those STP rules, so make sure and refer back to the question post!

The show spanning-tree vlan 10 command output from the original question gives you two ways to identify this answer as incorrect. First, the command lists two opening groups of messages: the first is about the root switch, and the second is about the local switch on which the command was entered. If the BID is different in these two message groups, then the local switch (Fred in this case) is not the root.

Second, note that the bottom of the output identifies port G0/2 as Fred’s RP (root port). Only non-root switches have an RP, so the fact that Fred has an RP rules out Fred as being the current root switch in VLAN 10.

Continuing to look at the command output, and adding to the analysis from answer A, we know:

• Fred is not the root
• Fred’s G0/2 is Fred’s root port

The show spanning-tree vlan 10 command output also lists Fred’s root cost, as well as the STP cost for each interface. In this case, the root cost is listed as 4 (first message grouping), and Fred’s G0/2 interface cost is listed as 4 (towards the end of the output). From these two facts, we can analyze as follows:

1. The root switch always has a cost 0 to reach itself.
2. The minimum STP interface cost is 1
3. Fred’s G0/2 cost is 4
4. If another switch sits between Fred and the root, Fred’s root cost must be at least 5 (Fred’s interface cost of 4, plus at least 1 from the interface cost of the switch between Fred and the root)

Therefore, no other switch could possibly be between Fred and the root. See figure 2 for a visual of the presumed switch between Fred and the root, with the blue items being the known items.

#### Figure 2: Minimum Root Cost for Fred if Another Switch Exists

Personally, I doubt Cisco would give you something this abstract on the real exam, but I though this answer would be kinda fun to think through with you. Ask questions if you have them!

Answer C again requires familiarity with the show spanning-tree vlan 10 command output. In this case, any ports currently in a blocking state would be listed at the bottom of the output, with the letters “BLK” under the heading “STS”. No ports are listed as blocking, making answer C correct.

While the analysis of answer C was simple, the analysis for answer D is pretty involved.

First, the question does not tell you anything about the topology of the LAN. What switch is connected to Fred’s G0/1 port? Literally, we know nothing about that switch – or even if there’s a switch connected to the other end of the cable – except what you can deduce from the command output on Fred.

So, what do we know?

1. Fred’s G0/1 acts as a designated port.
2. The question stem stated that no tiebreakers were used for picking root ports or designated ports.
3. Fred’s root cost = 4.

Based on 1 and 2, you can deduce that if a switch exists on the other end of the cable connected to Fred’s G0/1, that switch must have a root cost >4. Why? If such a switch existed (call it Barney), Fred would advertise its Hello with Fred claiming a root cost of 4. Barney would send a Hello, root cost = x. Fred won (with a lower number), and it wasn’t a tie. So, Barney’s root cost must be at least 5.

## More Practice Questions:

This question is like those you get if when you buy the ICND2 200-101 Official Cert Guide. This blog also lists various practice questions as well. For more questions on a large variety of topics:

Subscribe
Notify of

Inline Feedbacks
Borrodacho
January 11, 2017 6:14 am

Hello. It’s clear why Fred’s switch is not the root, but…. In answer A you said “If the BID is different in these two message groups, then the local switch (Fred in this case) is not the root.” In our case we have the same 32778 in both groups…

Gabriel Moran
July 26, 2017 12:50 am

I understand the logic behind this and why the answer is correct but the lab explicitly states to ignore all tiebreakers. What you just said right now is an example of a tiebreaker in the form of a lower mac address since the priorities on both switches was identical. If I am missing something please correct me, thank you.

Ruben
April 20, 2017 6:13 pm

Hello Wendell!
It’s me again 🙂 I have a little question for you to help me with:
Concerning this exercise, on your ‘D’ explanation, you state that: “So, Barney’s root cost must be at least 5.” And I agree with that.
But on the output of the show command on the related question, there is a cost of 4.

(line 16 of the show command)
Gi0/1 Desg FWD 4 128.25 P2p

This means that there is a host connected? (default 4 for gigabit port?) If so should the output be P2P Edge instead?

As usual, thank you for these side questions my friend! 🙂

Chris
June 26, 2017 10:39 am

I am a little confused with your explanation of option B…
I see that the Cost of the port from Switch Fred would be 4 but I don’t see where in the line the extra 1 would come from if the Root Switch will always have a root cost of 0 on it’s port.

Michael
July 8, 2017 12:21 pm

I confused with this answer, in the question you ask identify what is true, ok, option b) No other switches sit between Fred and the root switch, how can this be correct if the root cost is 5 and the root port cost is 4, a root switch as a cost of 0 I can’t see where the extra 1 has come from sorry it does not seem to make any sense.

Thanks
Michael

Ruslan
July 17, 2017 12:35 pm

Hello Wendell!
I`m a littl bit confuced about explanation of answer B. If we change the dafault cost for gigabit interfaces to the lowest (1) then we can say that it` is possible that at least one switch can sit between root bridge and Fred. Am I correct? please share your opinion

HectorJ
August 9, 2017 11:30 pm

I took the following chart from page 75, Chapter 3. Spanning Tree Protocol Implementation.
Book “CCNA Routing and Switching ICND2 200-105”

Gi0/2
SW1———SW2——-PC1
| /Gi0/1
| /
| /
| /
| /
| /
| /
| /
| /
| /
| /
| /
| /
| /
|Gi0/1
| / Gi0/2
SW3

This is “show spanning tree vlan 10” display from SW2 (which fits the shown in your example, I think)

SW2#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Cost 4
Port 26(GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Gi0/2 Root FWD 4 128.26 P2p
Gi0/1 Desg FWD 4 128.25 P2p
Fa0/12 Desg FWD 19 128.12 P2p

This is “show spanning tree vlan 10” display from SW3

SW3#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Cost 4
Port 25(GigabitEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Gi0/1 Root FWD 4 128.25 P2p
Gi0/2 Altn BLK 4 128.26 P2p

SW2 would be Fred and SW3 would be Barney

SW3 (or Barney, as you wish) root cost is 4, but you say that it should be greater than 4.

1) I think that I’m missing something. Would you help me to clarify this issue?
2) If issued the following command on SW3 gi0/1 interface (root port):

int gi0/1
spanning-tree vlan 10 cost 3

What would be SW3 root cost shown with

show spanning-tree vlan 10

command?

HectorJ
August 9, 2017 11:43 pm

Is there a limit of a post size? I tried to post a show spanning-tree command display, but it is not shown here

HectorJ
August 15, 2017 2:32 am

Hi, Wendell. Firstable I apoligize for what I posted. Definitly something went wrong: that’s not the chart I tried to send and some parts
are missing. Actually, when I posted it, didn’t appear. Sorry for the mess. Any way…

Watching Fred’s “#show spanning-tree vlan 10” display, I realized that it is practically the same that is shown on “CCNA Routing and Switching
ICND2 200-105” book, page 76, for SW2. Page 75 shows the chart in which SW2 (the one that might be “Fred” Switch) is directly connected to
a non-root SW3 switch, on its Gi0/1 interface. This chart shows Root SW1 switch directly connected Gi0/2 SW2 switch (“Fred”).

SW3 (that we can fairly name “Barney”, according with the exercise) is directly connected to Root SW1 Switch, using SW3’s Gi0/1 port (being
this one the root port).

So we have a triangle.

If I change SW3’s Gi0/1 interface cost to 3, SW3 would have root cost of 3 (remember, it port directly connects to the root switch) and this
would be the SW3 advertised cost to SW2.

So:

The switch connected to SW2’s (SW2=Fred. SW3=) G0/1 port COULD HAVE a root cost of 3

And it would fit with the display shown on this execise.

I’m really aware about the fact that the cost to the root Switch SW1 through SW2’s Gi0/2 port is less than the SW3’s advertised root cost
plus the one on Gi0/1 (the cost through Gi0/1 to the root switch) because, otherwise, SW2’s Gi0/2 port wouldn’t be SW’2 root port.

So, in my opinion (D) answer would be correct.

Am I’ missing something?

HectorJ
August 16, 2017 1:30 am

Hi, Wendell. You’ve made the point. This is what I was missing:

“The designated port on each LAN segment is the switch port that advertises the lowest-cost Hello onto LAN segment”

This is the wording I would use to explain (D) answer:

Let’s call Barney to the neighbor switch directly connected to Fred’s G0/1 interface.
They share a LAN segment.

Problem states that Fred’s G0/1 interface is in forwarding state (according with
Fred’s “show spanning-tree vlan 10” display).

If Barney had a root cost of 3, it would announce it to Fred. Barney would use
its interface which directly connects with Fred’s G0/1 port.

Then the following rule is applied:

“The designated port on each LAN segment is the switch port that advertises the lowest-cost
Hello onto LAN segment”.

Barney is advertising a lesser root cost than Fred’s throughout the shared LAN segment, which
makes Barney’s port which directly connects to Fred’s G0/1, the designated port.

Because of that, Fred’s G0/1 would be in blocking state, however, Fred’s “show spanning-tree vlan 10” displays
shows that this is not true.

So we must conclude that:

1.- Fred’s non-root switch neighbor (the one on Gi0/1 interface) could not have a root cost of 3
2.- This neighbor should advertise a root cost greater than 4 (which is Fred’s root cost), in order to
keep Fred’s G0/1 interface in forwarding state as a designated port (in this case is like that because
tiebraker rule of the lower BID switch is not being used).

If this explanation is right or something is wrong or missing, please let me know.

Thanks again

Jay Mahannah
January 21, 2023 12:07 pm

Broken link on Question; Is this from Chapter 9?

January 23, 2023 9:29 am

Jay,
Thanks. Fixed.
I linked this one to chapter 200-301 First Edition chapter 10. FYI.
W

Angel Munoz
July 25, 2023 1:32 pm

Why couldn’t the switch connected to Fred’s G0/1 port (let’s say Barney to align with your explanations) have a root cost of 3?

I think of the scenario in which Barney’s port connected to Fred’s G0/1 port is in a BLK state. If it’s blocking on that interface and Barney is not the root switch, couldn’t it have a root cost of 3, being totally independent of Fred?