Courseiva
Switching and Network AccessmediumMultiple ChoiceObjective-mapped

CCNA Switching and Network Access Practice Question

Exhibit

interface Gi1/0/7
 switchport mode access
 switchport voice vlan 20
 spanning-tree portfast

A phone and a PC are attached to the same switchport. The intended data VLAN is VLAN 10, and the phone uses voice VLAN 20. The switchport currently has `switchport voice vlan 20` configured. The phone works, but the PC cannot reach the data network. Which command is most likely missing?

⚠ Common exam trap

Ensure both data and voice VLANs are configured when devices share a port. Don't confuse duplex or trunk settings with VLAN issues.

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

switchport access vlan 10

When a Cisco IP phone and a PC share one port, the switchport often needs both a data VLAN and a voice VLAN. If the voice VLAN exists but the data access VLAN is wrong or missing, the phone can work while the PC fails.

Answer analysis

Option-by-option breakdown

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

  • switchport mode dynamic auto

    Why it's wrong here

    The 'switchport mode dynamic auto' command sets the port to negotiate trunking via DTP, but it does not assign a specific VLAN for untagged traffic. On a port connected to an IP phone and PC, the switchport typically must be in access mode so that the PC's frames are placed in the configured access VLAN. Dynamic auto could also cause the link to become a trunk if the phone or PC sends DTP frames, which would disrupt the expected VLAN classification.

    When this WOULD be correct

    This command would be correct when the question asks for a switchport configuration that allows dynamic trunk negotiation with a neighboring switch, such as in a scenario where you want the port to become a trunk if the neighbor is set to 'dynamic desirable' or 'trunk'.

  • switchport voice vlan 20

    Why it's wrong here

    The voice VLAN (VLAN 20) is already functioning correctly because the IP phone is operating, indicating the phone has received its VLAN information via CDP or LLDP. The reported problem concerns the PC's data traffic, which is sent untagged from the PC and must be carried in the access VLAN. Changing 'switchport voice vlan 20' would alter only the tagged voice traffic and would not fix the PC's missing data connectivity, so it is not the appropriate corrective action.

    When this WOULD be correct

    In a scenario where a phone and PC are connected to the same switchport, and the phone works but the PC cannot reach the data network, the missing setting is the access VLAN for the PC. Option C (switchport access vlan 10) would be correct if VLAN 10 is the data VLAN.

  • switchport access vlan 10

    Why this is correct

    The PC fails to reach the network because it is untagged on the access port while the switchport is likely in its default VLAN 1 or a mismatched VLAN. Issuing 'switchport access vlan 10' explicitly assigns the data VLAN to the port, ensuring the PC's traffic is placed in the correct Layer 2 domain. The phone can still tag its voice traffic with VLAN 20 via the voice VLAN feature, but the access VLAN governs the untagged PC traffic.

  • spanning-tree guard root

    Why it's wrong here

    Root Guard is a Spanning Tree Protocol (STP) enhancement that prevents a designated port from becoming a root port if a superior BPDU arrives. It does not influence VLAN assignment or untagged traffic classification on an access port. The PC's lack of connectivity is a data-plane VLAN membership issue, not a control-plane STP topology issue, so enabling Root Guard would leave the symptom unchanged.

    When this WOULD be correct

    A question where a switchport is connected to a switch that should not become the root bridge, and the network experiences instability due to rogue root bridge elections. The correct answer would be to enable root guard on that port.

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.

switchport access vlan 10Correct answer

Why this is correct

The PC fails to reach the network because it is untagged on the access port while the switchport is likely in its default VLAN 1 or a mismatched VLAN. Issuing 'switchport access vlan 10' explicitly assigns the data VLAN to the port, ensuring the PC's traffic is placed in the correct Layer 2 domain. The phone can still tag its voice traffic with VLAN 20 via the voice VLAN feature, but the access VLAN governs the untagged PC traffic.

switchport mode dynamic autoWrong answer — click to see why

Why this is wrong here

The phone works but the PC cannot reach the data network, indicating the PC is not in the correct VLAN. 'switchport mode dynamic auto' sets the port to negotiate trunking via DTP, which does not assign a data VLAN to the PC.

★ When this WOULD be the correct answer

This command would be correct when the question asks for a switchport configuration that allows dynamic trunk negotiation with a neighboring switch, such as in a scenario where you want the port to become a trunk if the neighbor is set to 'dynamic desirable' or 'trunk'.

Why candidates choose this

Candidates may confuse dynamic trunking protocols with VLAN assignment, thinking that 'dynamic auto' will automatically assign the PC to the correct VLAN, but it only affects trunking mode, not access VLAN.

switchport voice vlan 20Wrong answer — click to see why

Why this is wrong here

The PC cannot reach the data network because the switchport is likely configured as a voice VLAN only, but the data VLAN (access VLAN) is missing. Option B configures the voice VLAN, which is correct for the phone, but does not set the access VLAN for the PC.

★ When this WOULD be the correct answer

In a scenario where a phone and PC are connected to the same switchport, and the phone works but the PC cannot reach the data network, the missing setting is the access VLAN for the PC. Option C (switchport access vlan 10) would be correct if VLAN 10 is the data VLAN.

Why candidates choose this

Candidates may think that since the phone works, the voice VLAN is correctly configured, and they might overlook that the PC needs a separate data VLAN. They might assume the voice VLAN setting is the missing piece, but it is already present.

spanning-tree guard rootWrong answer — click to see why

Why this is wrong here

The issue is that the PC cannot reach the data network, which is typically configured via the access VLAN. Spanning-tree guard root is unrelated to VLAN assignment; it prevents a switch from becoming the root bridge, not connectivity issues on a specific VLAN.

★ When this WOULD be the correct answer

A question where a switchport is connected to a switch that should not become the root bridge, and the network experiences instability due to rogue root bridge elections. The correct answer would be to enable root guard on that port.

Why candidates choose this

Candidates may confuse root guard with other security features or think that spanning-tree issues could cause connectivity loss for the PC, but the symptom here is VLAN-specific, not spanning-tree related.

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

About these practice questions

This 200-301 question is part of Courseiva's 1,389-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.