hardMultiple Choice
How to Interpret `show spanning-tree vlan` Output for STP Analysis
A network engineer runs the following command on Switch SW3:
SW3# show spanning-tree vlan 30
VLAN0030 Spanning tree enabled protocol ieee Root ID Priority 24606 Address aabb.cc00.0400 Cost 12 Port 2 (GigabitEthernet0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32798 (priority 32768 sys-id-ext 30) Address aabb.cc00.0500 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- ------------------------------ Gi0/1 Desg FWD 4 128.1 P2p Gi0/2 Root FWD 12 128.2 P2p Gi0/3 Desg FWD 4 128.3 P2p
Based on this output, what is the root path cost from SW3 to the root bridge for VLAN 30?
⚠ Common exam trap
Cisco often tests the distinction between the root port's cost (which is the root path cost) and the cost of other ports, leading candidates to mistakenly select the cost of a designated port (like 4) instead.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
12
The root path cost is the cumulative cost from the local switch to the root bridge. In the output, the Root ID section shows a cost of 12, and the Gi0/2 interface is the root port with a cost of 12. This cost represents the total path cost from SW3 to the root bridge for VLAN 30, making option B correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
4
Why it's wrong here
The value 4 appears in the output as the individual cost assigned to interfaces Gi0/1 and Gi0/3, typically for 1 Gbps links. However, the question asks for the root path cost—the accumulated cost from this switch to the root bridge—which is listed in the Root ID section as 12. Confusing a per-port cost with the root path cost is a common error. The per-port cost only affects the calculation; it is not the final sum.
- ✓
12
Why this is correct
The show spanning-tree command displays the Root ID section, which includes the bridge's own root path cost. In this output, the Cost field under Root ID is 12, indicating the total accumulated path cost from this switch to the root bridge. This metric is used for root port selection and is the correct answer. It is not a per-interface value but the sum of all outgoing port costs along the best path.
- ✗
16
Why it's wrong here
The output contains no field with the value 16; it is not a port cost, a timer, or the root path cost. A test-taker might incorrectly guess 16 as a mid-range value, but STP costs are typically power-of-two-related (2, 4, 8, 16, 32, 64, etc.) depending on link speed, so 16 could theoretically be a port cost for a slower link, yet the output explicitly shows a root path cost of 12. Since the question asks for the value shown in the output, 16 is a distractor with no basis in the provided data.
- ✗
20
Why it's wrong here
The spanning-tree output includes timers such as Max Age, Hello Time, and Forward Delay, which are expressed in seconds. In many Cisco outputs, Max Age has a default value of 20, and a candidate might mistake it for a cost metric. However, the root path cost is a dimensionless accumulated cost, not a timer. The correct cost is found in the Root ID section, not in the timer fields. Thus, 20 is a timer value, not the root path cost.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 1,923 original 350-401 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on 350-401
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A network engineer runs the following command on Switch SW4: SW4# show spanning-tree vlan 40 VLAN0040 Spanning tree enabled protocol ieee Root ID Priority 24616 Address aabb.cc00.0600 Cost 8 Port 1 (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 40) Address aabb.cc00.0700 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- ------------------------------ Gi0/1 Root FWD 8 128.1 P2p Gi0/2 Desg FWD 4 128.2 P2p Gi0/3 Desg FWD 4 128.3 P2p Based on this output, which port is the root port?
easy- ✓ A.GigabitEthernet0/1
- B.GigabitEthernet0/2
- C.GigabitEthernet0/3
- D.There is no root port because SW4 is the root bridge.
Why A: The root port is the port on a non-root bridge that provides the lowest-cost path to the root bridge. In the output, SW4 is not the root bridge because its Bridge ID (priority 32768 + VLAN 40) is higher than the Root ID priority 24616, and the Root Cost is 8 via Gi0/1. The 'Role' column shows Gi0/1 as 'Root' and its 'Sts' is 'FWD', confirming it is the root port.
Variation 2. A network engineer runs the following command on Switch SW5: SW5# show spanning-tree vlan 50 VLAN0050 Spanning tree enabled protocol ieee Root ID Priority 24626 Address aabb.cc00.0800 Cost 4 Port 1 (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 50) Address aabb.cc00.0900 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- ------------------------------ Gi0/1 Root FWD 4 128.1 P2p Gi0/2 Desg FWD 4 128.2 P2p Gi0/3 Desg FWD 4 128.3 P2p Gi0/4 Altn BLK 4 128.4 P2p Based on this output, how many ports are in the Forwarding state?
easy- A.1
- B.2
- ✓ C.3
- D.4
Why C: The output shows four interfaces: Gi0/1 (Root FWD), Gi0/2 (Desg FWD), Gi0/3 (Desg FWD), and Gi0/4 (Altn BLK). Three ports (Gi0/1, Gi0/2, Gi0/3) are in the Forwarding state, while Gi0/4 is in the Blocking state. Therefore, the correct answer is 3.
Variation 3. A network engineer runs the following command on Switch SW6: SW6# show spanning-tree vlan 60 VLAN0060 Spanning tree enabled protocol ieee Root ID Priority 24636 Address aabb.cc00.0a00 Cost 8 Port 1 (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 60) Address aabb.cc00.0b00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- ------------------------------ Gi0/1 Root FWD 8 128.1 P2p Gi0/2 Desg FWD 4 128.2 P2p Gi0/3 Altn BLK 4 128.3 P2p Gi0/4 Desg FWD 4 128.4 P2p Based on this output, what is the bridge priority of the root bridge for VLAN 60?
medium- A.24576
- ✓ B.24636
- C.32768
- D.32828
Why B: The root bridge's priority is shown in the 'Root ID' section as 'Priority 24636'. This value includes the system ID extension (VLAN 60), so the actual bridge priority is 24636 - 60 = 24576. However, the question asks for the bridge priority as displayed in the output, which is 24636. Option B is correct because the output explicitly lists the root bridge priority as 24636.
Variation 4. A network engineer runs the following command on Switch SW7: SW7# show spanning-tree vlan 70 VLAN0070 Spanning tree enabled protocol ieee Root ID Priority 24646 Address aabb.cc00.0c00 Cost 4 Port 1 (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 70) Address aabb.cc00.0d00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- ------------------------------ Gi0/1 Root FWD 4 128.1 P2p Gi0/2 Desg FWD 4 128.2 P2p Gi0/3 Altn BLK 4 128.3 P2p Based on this output, which port is the alternate port?
easy- A.GigabitEthernet0/1
- B.GigabitEthernet0/2
- ✓ C.GigabitEthernet0/3
- D.There is no alternate port.
Why C: The alternate port is GigabitEthernet0/3 because it is in the 'Altn' role with a 'BLK' (blocking) state. In Rapid Spanning Tree Protocol (RSTP) and Per-VLAN Spanning Tree Plus (PVST+), an alternate port provides an alternative path to the root bridge and remains blocked unless the current root port fails. The output clearly shows Gi0/3 as 'Altn BLK', making it the alternate port.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 350-401 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-401 exam.