Answer to the #CCNA STP Question

 In 200-301 V1 Ch10: RSTP and EtherChannel, 200-301 V1 Part 3: VLANs, STP, Q&A

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 Answer(s)

Answer(s): B, C

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!

Answer A (Incorrect)

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.

Answer B (Correct)

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 (Correct)

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.

Answer D (Incorrect)

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:

#CCNA Fast Start: a Spanning Tree Question
#CCNA and #CCENT Lab Gear
Subscribe
Notify of
guest

22 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Borrodacho

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

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

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

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

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

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

Regarding (D) answer:

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
Address 000B.BE80.4BAD
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)
Address 0060.3E0B.E533
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

(Obviously, switches adresses are not the same than your example)

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
Address 000B.BE80.4BAD
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)
Address 00D0.9791.AAD2
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

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

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…

It is all about the (D) answer.

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?

Thanks on advance

HectorJ

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

Broken link on Question; Is this from Chapter 9?

Wendell Odom

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

Angel Munoz

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?

Wendell Odom

Hi Angel,
The short answer is “Barney” in your scenario couldn’t have root cost 3. The reason:

  • If Barney had root cost of 3, Barney would win the DP election on the Fred-Barney link, because per the output Fred’s root cost is 4.
  • The output shows that Fred is the designated port on that link, so Fred won the DP election.
  • Also, the question stated no tiebreakers are used.
  • Therefore, the lowest root cost Barney could have in this case is 5.
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

22
0
Would love your thoughts, please comment.x
()
x