CCNA – STP Questions
Here you will find answers to Spanning Tree Protocol Questions
Note: If you are not sure how STP and RSTP work, please read my STP tutorial and RSTP tutorial.
Question 1
Which three statements about RSTP are true? (choose three)
A. RSTP significantly reduces topology reconverging time after a link failure.
B. RSTP expends the STP port roles by adding the alternate and backup roles.
C. RSTP port states are blocking, discarding, learning, or forwarding.
D. RSTP also uses the STP proposal-agreement sequence.
E. RSTP use the same timer-based process as STP on point-to-point links.
F. RSTP provides a faster transition to the forwarding state on point-to-point links than STP does.
Answer: A B F
Question 2
Which two states are the port states when RSTP has converged? (choose two)
A. blocking
B. learning
C. disabled
D. forwarding
E. listening
Answer: A D
Explanation
RSTP only has 3 port states that are discarding, learning and forwarding. When RSTP has converged there are only 2 port states left: discarding and forwarding but the answers don’t mention about discarding state so blocking state (answer A) may be considered the best alternative answer.
Question 3
Which command enables RSTP on a switch?
A. spanning-tree mode rapid-pvst
B. spanning-tree uplinkfast
C. spanning-tree backbonefast
D. spanning-tree mode mst
Answer: A
Question 4
At which layer of the OSI model is RSTP used to prevent loops?
A. data link
B. network
C. physical
D. transport
Answer: A
Question 5
Refer to the exhibit. Given the output shown from this Cisco Catalyst 2950, what is the most likely reason that interface FastEthernet 0/10 is not the root port for VLAN 2?
Switch# show spanning-tree interface fastethernet0/10
A. This switch has more than one interface connected to the root network segment in VLAN 2.
B. This switch is running RSTP while the elected designated switch is running 802.1d Spanning Tree.
C. This switch interface has a higher path cost to the root bridge than another in the topology.
D. This switch has a lower bridge ID for VLAN 2 than the elected designated switch.
Answer: C
Question 6
Which two of these statements regarding RSTP are correct? (Choose two)
A. RSTP cannot operate with PVST+.
B. RSTP defines new port roles.
C. RSTP defines no new port states.
D. RSTP is a proprietary implementation of IEEE 802.1D STP.
E. RSTP is compatible with the original IEEE 802.1D STP.
Answer: B E
Question 7
Refer to the exhibit. Each of these four switches has been configured with a hostname, as well as being configured to run RSTP. No other configuration changes have been made. Which three of these show the correct RSTP port roles for the indicated switches and interfaces? (Choose three)
A. SwitchA, Fa0/2, designated
B. SwitchA, Fa0/1, root
C. SwitchB, Gi0/2, root
D. SwitchB, Gi0/1, designated
E. SwitchC, Fa0/2, root
F. SwitchD, Gi0/2, root
Answer: A B F
Explanation
The question says “no other configuration changes have been made” so we can understand these switches have the same bridge priority. Switch C has lowest MAC address so it will become root bridge and 2 of its ports (Fa0/1 & Fa0/2) will be designated ports -> E is incorrect.
Because SwitchC is the root bridge so the 2 ports nearest SwitchC on SwitchA (Fa0/1) and SwitchD (Gi0/2) will be root ports -> B and F are correct.
Now we come to the most difficult part of this question: SwitchB must have a root port so which port will it choose? To answer this question we need to know about STP cost and port cost.
In general, “cost” is calculated based on bandwidth of the link. The higher the bandwidth on a link, the lower the value of its cost. Below are the cost values you should memorize:
Link speed | Cost |
10Mbps | 100 |
100Mbps | 19 |
1 Gbps | 4 |
SwitchB will choose the interface with lower cost to the root bridge as the root port so we must calculate the cost on interface Gi0/1 & Gi0/2 of SwitchB to the root bridge. This can be calculated from the “cost to the root bridge” of each switch because a switch always advertises its cost to the root bridge in its BPDU. The receiving switch will add its local port cost value to the cost in the BPDU.
One more thing to notice is that a root bridge always advertises the cost to the root bridge (itself) with an initial value of 0.
Now let’s have a look at the topology again
SwitchC advertises its cost to the root bridge with a value of 0. Switch D adds 4 (the cost value of 1Gbps link) and advertises this value (4) to SwitchB. SwitchB adds another 4 and learns that it can reach SwitchC via Gi0/1 port with a total cost of 8. The same process happens for SwitchA and SwitchB learns that it can reach SwitchC via Gi0/2 with a total cost of 23 -> Switch B chooses Gi0/1 as its root port -> D is not correct.
Now our last task is to identify the port roles of the ports between SwitchA & SwitchB. It is rather easy as the MAC address of SwitchA is lower than that of SwitchB so Fa0/2 of SwitchA will be designated port while Gi0/2 of SwitchB will be alternative port -> A is correct but C is not correct.
Below summaries all the port roles of these switches:
+ DP: Designated Port (forwarding state)
+ RP: Root Port (forwarding state)
+ AP: Alternative Port (blocking state)
Question 8
Which two protocols are used by bridges and/or switches to prevent loops in a layer 2 network? (Choose two)
A. 802.1d
B. VTP
C. 802.1q
D. STP
E. SAP
Answer: A D
Question 9
Which switch would STP choose to become the root bridge in the selection process?
A. 32768: 11-22-33-44-55-66
B. 32768: 22-33-44-55-66-77
C. 32769: 11-22-33-44-55-65
D. 32769: 22-33-44-55-66-78
Answer: A
Question 10
Refer to the topology shown in the exhibit. Which ports will be STP designated ports if all the links are operating at the same bandwidth? (Choose three)
A. Switch A – Fa0/0
B. Switch A – Fa0/1
C. Switch B – Fa0/0
D. Switch B – Fa0/1
E. Switch C – Fa0/0
F. Switch C – Fa0/1
Answer: B C D
Explanation
First by comparing their MAC addresses we learn that switch B will be root bridge as it has lowest MAC. Therefore all of its ports are designated ports -> C & D are correct.
On the link between switch A & switch C there must have one designated port and one non-designated (blocked) port. We can figure out which port is designated port by comparing their MAC address again. A has lower MAC so Fa0/1 of switch A will be designated port while Fa0/1 of switch C will be blocked -> B is correct.
I am preparing for the ccna certification exam, but my time is too limited, i need your advice ma fellows……. and if poosible just post to me the dump links
can aanybody explain me Q9
@Chinna
To elect the root bridge, STP uses priority and mac address.
The lower the priority, the more preferred.
If you look closely, you will notice that Option A & B have the lowest priority and also tied(32768)
So we look at their mac address. Option A mac address is smaller, and therefore elected as the root bridge.
I hope this explanation help. Thanks.
its more than enough…thanks a lot koffy
can anybody clearly explain me Q5…
I am sure this will help to understand.. in depth :) :
https://learningnetwork.cisco.com/thread/5994
designated
alternative
backup
root
@Chinna
Tricky question :)
“.. most likely”
The answer based on path cost.. in this case :
1. This is a Fast Ethernet interface. –> Another connection exists via Gigabit.
10Mbps 100
100Mbps 19
1 Gbps 4
2. This is Fast Ethernet 0/10. –> Another connection exists via Fast Ethernet 0/3
..The lower the better :)
@9tut
re:questions 7
the link cost for Gi0/2 for both Sw-B and Sw-D should be 19, ask it is LINK cost, not PORT cost. both of those have link speeds of 100Mbps.
here is an example of Gigabit port running at 100Mbps:
Root port is 25 (GigabitEthernet1/1), cost of root path is 19
CDP neighbor:
Switch#sh cdp nei det
Device ID: Switch
Entry address(es):
Platform: cisco 2950, Capabilities: Switch
Interface: GigabitEthernet1/1, Port ID (outgoing port): FastEthernet0/1
Question 6
Which two of these statements regarding RSTP are correct? (Choose two)
A. RSTP cannot operate with PVST+.
Why is A wrong? RSTP doesn’t support pvst+, only PVRST (Check also cisco icnd2 book p. 88 table).
These two (pvst+ and pvrst) are very similar but typically two different proprietary solutions.
(The given answers are correct of course)
@9tut->Q7
cost will b considered of low bandwidth interface i.e if 1 side is fa port & another is Gi port den cost of that link will b 19 & not 4.
so b/w SwA & SwD cost is 19 & b/w SwA & SwC is 19.
thus SwB :-
Gi0/1 = cost 4+19 = 23 ( Root Port)
Gi0/2 = cost 19+19 = 38
Refer P 524(Todd Lamle 7 edition)
@ Abhi that will not affect the answe :) :) ,, thnx for ur info
Q2:
Can anybody explain the Q2? Because blocking and discarding are seperate roles of port, so why blocking is correct?
The question is wrong (as the explanation correctly points out), there is no blocking state in RSTP. But the questions wants 2 answers and blocking is the closest to discarding.
9tut Q7 plz correct {A. SwitchA, Fa0/2, designated } Correct to {A. SwitchC, Fa0/2, designated )
@ZoolwoRld: Answer A is correct but the explanation for answer A should belong to below part. I updated it. Thanks for your detection!
Yes ZoolwoRld you are right! Answer A is not correct if it is “SwitchA, Fa0/2, designated”.
Question 5 why is the answer not A where the other interface has a lower cost to the root. That is why the port would be in Alternative mode. A switch must have a root port to all PVSTP unless it is the Root and in that case the role of port will be designated/forwarding.
A. This switch has more than one interface connected to the root network segment in VLAN 2
Answer C is not referring to the switch we are on but a switch in another topology.
C. This switch interface has a higher path cost to the root bridge than another in the topology.
Regarding Question 3,i think the answers are correct but i don’t agree with the explaination completely.Ports Fa0/2 on SwitchA and SwitchC are 10/100Mb and ports Gi0/2 on SwitchB and SwitchD are 10/100/1000Mb.Since there is no other configuration changes except hostnames and RSTP configuration the link between SwitchA and SwitchB and the link between SwitchC and SwitchD will go into the default process of auto-negotiation for the link speed.The links speeds will be FastEthernet’s 100Mb.
So, SwitchC will become root bridge based on the lowest Bridge ID rule.
Port Fa0/1 on SwitchA(cost 19) compared to Fa0/2 root path cost of 19+4+19=42 will become root port.
Port Gi0/2 on SwitchC(cost 19) compared to 4+19+19=42 root path cost of Gi0/1 will become root port.
Port Gi0/1 on SwitchB(cost 4+19=23) compared to Gi0/2(cost of 19+19=38) will become root port.
SwitchA Fa0/2 is advertising root path cost of 19 to the SwitchB and SwitchB is advertising root path cost of 4+19=23 to SwitchA.
So we make decision based on the primary rule for electing designeted and non-designated ports on LAN segments which states that first priority is the lowest path cost to the root bridge and that only if the port costs are equal, is the BID of the sender used.
According to that rule SwitchA Fa0/2 port will become designated port and SwitchB Gi0/2 port will become alternate port.
So, i have the same answers: A,B,F
Regarding Question 2, if there is no mistake in the question i would rather choose B(learning) and D(forwarding).
This is Cisco’s explanation of RSTP 3 possible port states:
Discarding- This state is seen in both a stable active topology and during topology synchronization and changes.
Learning- This state is seen in both a stable active topology and during topology synchronization and changes.
Forwarding- This state is seen only in stable active topologies. The forwarding switch ports determine the topology.
So, learning port state can be seen in stable active topology too, just for a small amount of time.
Sorry, small correction: Port Gi0/2 on SwitchD (cost 19) compared to 4+19+19=42 root path cost of Gi0/1 will become root port.
Hi all i’m confused about Q2
in the dumps they choose corretct answers are C,D
can someone help plz
thanks in advance
On Q-7, should the answers be root bridge, and other be root ports, not just root
Nice explanation on Q7!
In Q2. Is true that after the topology has converged in every port with rstp enable its only two states will be forwarding or discarding.
The trick of this question is that RSTP can be running in a switch but if a port is shutdown it will be seen as “disable” even after the topology has converged.
So the correct answer should be C and D.
Blocking is not a RSTP state.. no matter what..
@franco
Read explanation.
You might be confusing STP and RSTP. They do complement each other. But RSTP is enhanced.
They are only two port states when RSTP has converged, they are Discarding and Forwarding. The option provided does not include discarding, so the next best thing is Blocking.
Which two states are the port states when RSTP has converged? (choose two)
A. blocking
B. learning
C. disabled
D. forwarding
E. listening
Correct answer is B and D.
Explanation from the official CCNA course materials regarding RSTP learning port state :
Learning : This state is seen in both a stable active topology and during topology synchronization and changes. The learning state accepts data frames to populate the MAC table in an effort to limit flooding of unknown unicast frames.
@Adoze
You are totally mistaken. The options you chosen, especially option B would defeat the purpose of RSTP in a converged network.
RSTP has three port state, they are Discarding, Learning, and Forwarding. It stays in two port states when the network has converged. They are Discarding(Blocking) and Forwarding. The idea behind this is Redundancy. To keep the network in a loop-free environment. Thanks.
@Koffy
First of all u dont have to explain to me what the purpose of RSTP is because u are not competent. I never said that a discarding port state wont exist in a converged network. That answer was not offered to me in this question otherwise i would choose discarding and forwarding without thinking.
The whole question is faulty and i am sure that it doesnt even exist in the official CCNA exam. I can use the same logic and choose “learning” like u did when choosing blocking port state and say “2nd best answer” which is not a 100% correct answer…
P.S. Next time when u say to me that i am mistaken i expect that u have a correct answer or explaination and if u still think that blocking is a RSTP port state than u dont have a clue about RSTP so dont bother to explain anything to me pls :)
@Anonymous
Sir, I’m sorry if I offended you. I was under the impression we exchanging ideas in the form of imparting our knowledge to one another.
I welcome the idea of being corrected. I learn something new each time I’m corrected. I believe in healthy debating. No offense taking though. Once again, I’m sorry if I offended you. It wasn’t my intention. Thanks.
Hi all
i want to ask again the question that nad asked on 25th June. I saw some answers but i am not quite sure i understood them
The full topology is here
http://imageshack.us/photo/my-images/856/q15j.jpg/
Thanks in advance
@chrib
Switch3:
Gi0/1 – root
Gi0/2 – alternate; discarding – towards distribution layer, we don’t care about it
Fa0/1 – designated
Fa0/12 – designated
Switch4:
Fa0/2 – root
Fa0/11 – alternate; discarding
can someone explain question 5 please??
@xallax
can u explain me wh u select fa0/2 as root & fa0/11 as alternate port in question which chrib asked.
@bakki
I believe if you study the 9tut’s tutorial about RSTP here
http://www.9tut.com/rapid-spanning-tree-protocol-rstp-tutorial
switch4′s fa0/2 and fa0/11 have the same path cost to root and same sender bridge ID but fa0/2 has a lower port ID than fa0/11 so it becomes a root and the other goes into alternate role if fa0/2 fails
Correct me if i am wrong
Thanks for the quick reply xallax
@xallax
Also xallax why isn’t the switch3′s fa0/12 an alternate port?
Do we consider the two links between switch3-switch4 one segment or two?
The two links between switch3 and switch4 are considered as two segments. Every connection between two switches is considered as a separate segment.
Switch3 fa0/12 is not an alternate port because it has a lower path cost to the root bridge than Switch4 fa0/11.
somebody plz explain about PVST+
in Q6 “RSTP cannot operate with PVST+. “
@z
PVST+ was developed by Cisco to support IEEE 802.1Q trunking so it’s proprietary
RSTP provides faster spanning-tree convergence after a topology change and was incorporated by IEEE into 802.1D identifying the specification as IEEE 802.1D-2004.
RSTP also implements the Cisco-proprietary STP extensions, BackboneFast, UplinkFast, and PortFast, into the public standard.
So they are compatible and therefore option A is incorrect
You are right
@Chris
Because RPST, hasn’t (disable) as state port when is converged, but if you want you can configure it manually
which tow protocols are used by bridges and / or switches to prevent loops
in a layer 2 network
a – 802.1 d
b – STP
c – sap
d – 802.1 q
answer was A and B
why we chosen A – replace D
@as
A and B are correct
“Spanning Tree Protocol (STP) is standardized as IEEE 802.1D”
http://en.wikipedia.org/wiki/Spanning_tree_protocol
On Question 7, the final point is incorrect. Since switch B has a better cost to the root, its port (Gi0/2) will be elected as the designated port on that link between Switch A and Switch B.
The lower MAC address will be tie-breaker only if both A and B have equal cost to the root.
Thanks,
Mohan
can any explain question 5 please
Regarding question 7 I agree with Mohan Muthu and beginner. In my opinion these are the port roles for each switch:
switch A: fa0/1-RP , fa0/2 – non-designated (blocked)
switch B: gi0/1-RP , gi0/2 – DP
switch C: fa0/1-DP , fa0/2- DP
switch D: gi0/1-DP , gi0/2-RP
Beginner said the following: “Ports Fa0/2 on SwitchA and SwitchC are 10/100Mb and ports Gi0/2 on SwitchB and SwitchD are 10/100/1000Mb.Since there is no other configuration changes except hostnames and RSTP configuration the link between SwitchA and SwitchB and the link between SwitchC and SwitchD will go into the default process of auto-negotiation for the link speed.The links speeds will be FastEthernet’s 100Mb.”
I agree with u Mohan, in this situation we can go for mac-address if both of the interfaces on either sides have the same cost!! Q7 final point.
About Question 7.
As a result of bridge ID comparison SwC becomes root switch.
Since links SwC–SwD and SwA–SwB autonegotiated to 100 Mbit both SwD’s Gi0/2 and SwB’s Gi0/2 have cost 19.
SwB receives BPDU with a cost 19+4=23 from SwD and BPDU with a cost 19+19=38 from SwA. Therefore, SwB’s Gi0/1 – root port.
About SwA — SwB segment: SwA advertises BPDU with cost 19 onto the segment, SwB – cost 23. So, SwA’s Fa0/2 – designated port. And no bridge ID or MAC comparison occurs in this last step.
@babay:
I don’t understand your explanation for segment SwA – SwB.
As far as I understood you always calculate the cost from interface to root bridge.
SwA fa0/2 cost to Root Bridge= 19+4+19
SwB gi0/2 cost to Root Bridge=19+19
based on this I would say that SwA fa0/2 is non-designated port and gi0/2 is a designated port.
Can someone clarify this question?
@joao
Check this three steps:
1. Switch B, Switch D, Switch C.(In relation to the Root Bridge-C) This scenario will result into a tie.(Port ID values)
2. Switch B, Switch A, Switch C (In relation to the Root Bridge-C) In this scenario Switch A becomes RP/AP.
3. Switch A, Switch D, Switch C (In relation to the Root Bridge-C) In this scenario Switch A becomes RP/AP.
Now, lets look at the above topology.
Switch B has two paths to the Root Bridge-C.
Path #1. through D=cost 8…(4+4)
Path #2. through A=cost23..(19+4)
Preferred path D.
The rule will force switch B to have one of its port blocked.(base on link cost to RB-C) The path with the cost 23 to RB will be blocked. For the sake of fast convergence, and shortest path to the RB-C.
I hope this help.
@Koffy
My only doubt is about auto-negotiation between switches.
For SwB interface Gi0/2, since i’ts connected to a fast ethernet (SwA), will the cost be 4+19 or 19+19?
@koffy: depending on auto-negotiation is considered or not, the port status of SwA fa0/2 and SwB gi0/2 will be different.
@joao
Our main focus here is RB-C, the shortest path, for fast convergence, and loop-free.
You have been provided with the LINKS and COST associated to the links. All you have to do is just simple math. Which path is shortest to the Root bridge(base on the link cost). Keep it simple fellers. Always do what is required. And lastly, utilize the concept.
If you want more info, check the previous page for my post. Thanks.