Why SW4's STP Root Path Cost Is 40, Not 50
Short answer
C SW4 chooses the SW4→SW3→SW1 path whose cumulative cost 30 + 10 = 40 beats the direct 50-cost link, so its RPC is 40.
Question

Key Takeaways
The trap is confusing a single link's port cost with the cumulative root path cost; STP always picks the lowest total cost, not the fewest hops.
This H12-811 STP question tests how a switch calculates its Root Path Cost (RPC) toward root bridge SW1. The correct answer is C, because SW4 sums the cheaper SW4→SW3→SW1 path (30 + 10 = 40) instead of taking the direct 50-cost link.
Common mistake: Option A (50) is the plausible error: it quotes the direct SW4–SW1 link cost, ignoring that STP sums path costs and that the SW4→SW3→SW1 route totals only 40.
Expert Analysis
The two costs being confused. In STP, each switch computes its own Root Path Cost (RPC) as the cumulative sum of the port costs along its best path to the root bridge — not the cost of a single link, and never the number of hops. Here SW1 is declared the root bridge, so SW4's RPC depends entirely on which candidate path totals the least.
Comparing SW4's candidate paths. The direct SW4–SW1 link has a port cost of 50, which would give SW4 an RPC of 50 (option A). The indirect path SW4 → SW3 → SW1 costs 30 on SW4's port plus 10 on SW3's root-facing port, giving 30 + 10 = 40. Because 40 < 50, STP's lowest-cumulative-cost rule selects the two-hop path, and SW4 installs the SW3-facing port as its root port with an RPC of 40 → option C.
Why hop count never decides. STP does not prefer the path with fewer hops; a cheaper, longer path always wins whenever its cumulative cost is lower. This is exactly the boundary exam-takers miss: the port cost printed on the direct link (50) is a link attribute, whereas the RPC (40) is a computed path attribute derived from the whole chain. Options B (80) and D (70) match neither any single link cost nor any valid sum, so they fail for the same reason.
Exam Strategy
On any STP cost question, list every candidate path to the root bridge and sum the port costs on each before reading the options; the smallest total is the RPC regardless of hop count. Then check each option against your sums — distractors usually quote a single link cost or a partial sum. If two paths tie, remember the standard tie-break order (lowest RPC, then lowest bridge ID of the neighbor, then lowest port ID) applies only after the cost comparison.
Frequently Asked Questions
How is Root Path Cost different from port cost in STP?
Does STP prefer the path with the fewest hops to the root?
Why is the answer 40 instead of 50 for SW4?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
de25557 👍 3 Answered CThe marked answer (A, 50) is incorrect. STP selects the path with the lowest cumulative Root Path Cost, not the one with the fewest hops. The direct SW4→SW1 link costs 50, but the path SW4→SW3→SW1 sums to 30 + 10 = 40, which is lower. SW3 has a very cheap uplink to the root (cost 10), so routing through it beats the direct link. SW4's RPC is therefore 40 → answer C.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.