Why SW4's STP Root Path Cost Is 40, Not 50

H12-811-V2.0 By islever Editorial Last updated

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

On the switched network shown in the figure, STP is enabled on all devices. SW1 is the root bridge. The port costs are shown in the figure. Other parameters retain the default values. After the network is stable, which of the following RPC values is calculated by SW4 for the path to SW1?
Exhibit: Why SW4's STP Root Path Cost Is 40, Not 50
  1. 50
  2. 80
  3. 40 Correct Answer
  4. 70

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?

Port cost is a fixed attribute of one link, based on link speed. Root Path Cost is the running total of port costs a switch accumulates from itself up to the root bridge, and it is what the switch compares when choosing its root port.

Does STP prefer the path with the fewest hops to the root?

No. Hop count is not an STP selection criterion; the switch always selects the path with the lowest cumulative cost. In this figure SW4 takes the two-hop 40-cost route over the one-hop 50-cost direct link.

Why is the answer 40 instead of 50 for SW4?

The direct SW4–SW1 link costs 50, but the path via SW3 costs 30 + 10 = 40. Since 40 is lower, SW4 installs the SW3-facing port as its root port and reports an RPC of 40 (option C).

More H12-811-V2.0 FAQ →

Community Votes

C
100%

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

  1. de25557 👍 3 Answered C
    The 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.

Log in to comment, report an error, or add a note about this question.

← Back to H12-811-V2.0 Study Guide