Courseiva
Network Infrastructure and ConnectivityhardMultiple ChoiceObjective-mapped

CCNA Network Infrastructure and Connectivity Practice Question

Exhibit

SW1# show spanning-tree vlan 20

VLAN0020
  Root ID    Priority    24596
             Address     0011.2233.4455
  Bridge ID  Priority    32788
             Address     00aa.bbcc.ddee

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi1/0/23         Altn BLK 19        128.23   P2p
Gi1/0/24         Root FWD 4         128.24   P2p

A switch unexpectedly blocks a link toward the distribution layer. Gi1/0/24 shows a path cost of 4 while Gi1/0/23 shows a path cost of 19. Why did interface Gi1/0/24 become the root port instead of Gi1/0/23?

⚠ Common exam trap

Remember that STP prioritizes root path cost over other factors like port numbers or bridge IDs unless there's a tie.

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

has a lower root path cost to the root bridge

Spanning Tree chooses a root port by looking for the best path toward the root bridge. In this case, Gi1/0/24 shows a cost of 4, while Gi1/0/23 shows a cost of 19. Lower cost is better, so Gi1/0/24 is selected as the root port and moves into forwarding. Gi1/0/23 becomes an alternate port and is placed into a blocking state to prevent a loop. STP compares root path cost first; only if the cost is tied does it move on to tie-breakers like sender bridge ID and port ID. The lower cost on Gi1/0/24 explains why that port won the root-port election.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Gi1/0/24 has a lower port number, so STP always prefers it first.

    Why it's wrong here

    Port number is only a final tie-breaker in STP's root port selection, used when the root path cost, sender bridge ID, and sender port ID are all identical. Here, Gi1/0/24 already has a lower root path cost than Gi1/0/23, so the port number is never considered. STP does not 'always' prefer lower port numbers as an initial rule; it applies only after higher-priority criteria fail to differentiate the ports.

    When this WOULD be correct

    In a different question scenario where the context involves a simplified STP decision-making process, if the question stated that all ports were configured with the same path cost, then the option could be correct if it asked which port would be preferred based on the lowest numerical identifier.

  • STP prefers interfaces with the highest path cost to reduce loops.

    Why it's wrong here

    STP does not prefer the highest path cost; it selects the root port with the lowest accumulated cost to the root bridge. A higher cost actually indicates a less desirable, slower, or more distant path, so it would never be chosen to reduce loops. Loop prevention is achieved by blocking redundant alternate ports, not by preferring expensive paths.

    When this WOULD be correct

    In a different question setup, if the question stated that STP was configured to prefer paths with higher costs for specific traffic types, then this option could be correct. For example, if the exam scenario involved a network design where certain traffic flows were intentionally routed through higher-cost paths to manage bandwidth.

  • Gi1/0/23 is blocked because alternate ports are always chosen over root ports.

    Why it's wrong here

    This reverses the STP roles. The root port is the port with the shortest path to the root bridge and is placed in forwarding state, while the alternate port is the backup path that is placed in blocking state. Gi1/0/23 is blocked because it is an alternate port with a higher root path cost, not because alternate ports are selected over root ports. The root port is always the preferred forwarding port, and the alternate port remains blocked unless the root link fails.

    When this WOULD be correct

    In a different scenario where the question states that Gi1/0/23 is indeed an alternate port and that the switch is configured to prefer alternate ports over root ports, this option could be correct. For example, if the question specifies that Gi1/0/23 was previously a root port but was blocked due to a topology change, making Gi1/0/24 the new root port.

  • has a lower root path cost to the root bridge

    Why this is correct

    This is correct because STP's root port selection is primarily based on the lowest root path cost to reach the root bridge. Gi1/0/24 has a cumulative cost of 4, whereas Gi1/0/23 has a cost of 19, so Gi1/0/24 is chosen as the root port and placed in forwarding state. Consequently, Gi1/0/23 becomes the alternate port with the higher cost and is put into blocking state to prevent Layer 2 loops.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.

has a lower root path cost to the root bridgeCorrect answer

Why this is correct

This is correct because STP's root port selection is primarily based on the lowest root path cost to reach the root bridge. Gi1/0/24 has a cumulative cost of 4, whereas Gi1/0/23 has a cost of 19, so Gi1/0/24 is chosen as the root port and placed in forwarding state. Consequently, Gi1/0/23 becomes the alternate port with the higher cost and is put into blocking state to prevent Layer 2 loops.

Gi1/0/24 has a lower port number, so STP always prefers it first.Wrong answer — click to see why

Why this is wrong here

STP does not use port number as the primary criterion; it is only a tie-breaker when path cost, bridge ID, and sender bridge ID are all equal. Here, the path costs differ, so port number is irrelevant.

★ When this WOULD be the correct answer

In a different question scenario where the context involves a simplified STP decision-making process, if the question stated that all ports were configured with the same path cost, then the option could be correct if it asked which port would be preferred based on the lowest numerical identifier.

Why candidates choose this

Students often confuse STP's tie-breaking rules, thinking lower port number always wins, but this only applies when all higher-priority values are identical.

STP prefers interfaces with the highest path cost to reduce loops.Wrong answer — click to see why

Why this is wrong here

STP is designed to select the path with the lowest total cost to the root bridge, not the highest. Choosing a higher-cost path would increase latency and waste bandwidth.

★ When this WOULD be the correct answer

In a different question setup, if the question stated that STP was configured to prefer paths with higher costs for specific traffic types, then this option could be correct. For example, if the exam scenario involved a network design where certain traffic flows were intentionally routed through higher-cost paths to manage bandwidth.

Why candidates choose this

Some might mistakenly think that higher cost implies more redundancy or loop prevention, but STP's goal is to minimize cost for optimal forwarding.

Gi1/0/23 is blocked because alternate ports are always chosen over root ports.Wrong answer — click to see why

Why this is wrong here

The root port is the forwarding port toward the root bridge, while the alternate port is a blocked backup. The alternate port is not chosen over the root port; it only becomes active if the root port fails.

★ When this WOULD be the correct answer

In a different scenario where the question states that Gi1/0/23 is indeed an alternate port and that the switch is configured to prefer alternate ports over root ports, this option could be correct. For example, if the question specifies that Gi1/0/23 was previously a root port but was blocked due to a topology change, making Gi1/0/24 the new root port.

Why candidates choose this

The terms 'alternate' and 'root' can be confusing; students may think alternate ports are preferred, but they are actually backups.

Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

SW1 Root Bridge SW2 SW3 BLK DP DP RP RP STP blocks one link to prevent loops DP = Designated Port RP = Root Port BLK = Blocked

Quick reference

OSI Model Reference

LayerNamePDUKey Protocols / Devices
7ApplicationDataHTTP, HTTPS, DNS, SMTP, FTP, SSH
6PresentationDataTLS / SSL, JPEG, ASCII encoding
5SessionDataNetBIOS, RPC, SIP
4TransportSegment / DatagramTCP, UDP
3NetworkPacketIP, ICMP, OSPF — Routers
2Data LinkFrameEthernet, Wi-Fi, PPP — Switches, Bridges
1PhysicalBitsCables, NICs, Hubs, Repeaters

About these practice questions

One of 1,389 original 200-301 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-301 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 200-301 exam.