Courseiva
Infrastructure →easyMultiple Choice

CCNP Infrastructure Practice Question

A network administrator is configuring a Cisco Catalyst switch and needs to assign a port to VLAN 20 as an access port. The port is currently in VLAN 1. Which command sequence correctly configures the interface?

⚠ Common exam trap

Many candidates confuse access and trunk configuration, or using the wrong order of commands that might leave the port in a dynamic state.

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

✓

interface GigabitEthernet0/1, then switchport mode access, then switchport access vlan 20

To configure a switch port as an access port in VLAN 20, you enter interface configuration mode, set the mode to access with switchport mode access, and then assign the VLAN with switchport access vlan 20. This ensures the port operates as a static access port and carries untagged traffic for VLAN 20.

Answer analysis

Option-by-option breakdown

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

  • ✗

    interface GigabitEthernet0/1, then switchport access vlan 20, then switchport mode access

    Why it's wrong here

    Although this sequence assigns VLAN 20 and then sets access mode, the order is less conventional and may not take effect if the port is in dynamic mode. The recommended order is to set the mode first, then assign the VLAN. The correct sequence ensures the port is explicitly an access port before VLAN assignment.

  • ✗

    interface GigabitEthernet0/1, then switchport trunk allowed vlan 20, then switchport mode trunk

    Why it's wrong here

    This sequence configures the port as a trunk and restricts allowed VLANs to 20. That is incorrect because the requirement is an access port for VLAN 20, not a trunk. A trunk port carries multiple VLANs and uses tagging, which is not desired for a single VLAN access connection.

  • ✗

    interface GigabitEthernet0/1, then switchport mode dynamic auto, then switchport access vlan 20

    Why it's wrong here

    Setting the port to dynamic auto allows it to negotiate trunking, which is not suitable for a dedicated access port. The switchport access vlan command may not apply correctly if the port becomes a trunk. For a static access port, the mode must be explicitly set to access.

  • ✓

    interface GigabitEthernet0/1, then switchport mode access, then switchport access vlan 20

    Why this is correct

    This sequence enters interface configuration mode, sets the port to access mode, and assigns VLAN 20. It is the correct and standard method to configure an access port on a Cisco Catalyst switch. The port will carry untagged traffic for VLAN 20, and any existing VLAN 1 assignment is overridden.

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 350-401 question is part of Courseiva's 1,923-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 350-401 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 350-401 exam.