Courseiva

CCNA Switching and Network Access Practice Question

A network administrator is configuring a new switch port for a server that will host multiple VLANs. The server's NIC supports 802.1Q tagging. The administrator wants to ensure that only VLANs 10, 20, and 30 can traverse the link. Which two commands must be configured on the switch port to achieve this? (Choose two.)

⚠ Common exam trap

The trap here is thinking that setting an access VLAN or voice VLAN is sufficient for a trunk port, or that disabling DTP negotiation restricts VLANs.

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 mode trunk

To configure a trunk port that carries only VLANs 10, 20, and 30, you must set the port to trunk mode and then specify the allowed VLANs. The switchport mode trunk command enables trunking, and the switchport trunk allowed vlan 10,20,30 command restricts the trunk to those VLANs. This ensures the server can communicate on the required VLANs while blocking others.

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 trunk

    Why this is correct

    This command sets the port to trunk mode, which is required for carrying multiple VLANs with 802.1Q tagging. A trunk port allows traffic from multiple VLANs to pass through a single physical link. Without trunk mode, the port would only support a single VLAN, and the server would not be able to communicate on multiple VLANs.

  • ✗

    switchport access vlan 10

    Why it's wrong here

    This command assigns the port to VLAN 10 as an access port. However, the port is configured as a trunk, so this command would not have the desired effect. In trunk mode, the access VLAN is used only for untagged traffic, but the requirement is to allow multiple tagged VLANs. This command does not restrict the allowed VLANs on the trunk.

  • ✗

    switchport voice vlan 20

    Why it's wrong here

    This command is used to configure a voice VLAN for an IP phone, not for a server trunk. It enables the port to carry voice traffic tagged with a specific VLAN. This is irrelevant to the scenario, as the server needs to carry multiple data VLANs, not voice traffic. Using this command would not restrict the allowed VLANs on the trunk.

  • ✓

    switchport trunk allowed vlan 10,20,30

    Why this is correct

    This command restricts the trunk to only allow VLANs 10, 20, and 30. By default, a trunk allows all VLANs. Using this command ensures that only the specified VLANs can traverse the link, which is a security and performance best practice. It prevents unnecessary broadcast traffic from other VLANs.

  • ✗

    switchport nonegotiate

    Why it's wrong here

    This command disables Dynamic Trunking Protocol (DTP) negotiation on the port. While it can be used on trunk ports to prevent DTP frames, it does not define which VLANs are allowed. The requirement is to allow only VLANs 10, 20, and 30, which is accomplished with the allowed VLAN command, not by disabling negotiation.

Visual reference

Switch VLAN 10 Sales (192.168.10.0/24) PC-A PC-B VLAN 20 HR (192.168.20.0/24) PC-C PC-D Router VLANs isolate traffic — inter-VLAN routing requires a Layer 3 device

About these practice questions

This 200-301 question is part of Courseiva's 1,450-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Cisco exam blueprint

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.