Question 382 of 1,819
Switching and Network AccessmediumConfigurationObjective-mapped

Quick Answer

The answer is to configure each port as an access port and assign it to the desired VLAN using the `switchport mode access` and `switchport access vlan` commands. This is correct because an access port carries traffic for only a single VLAN, and the switchport access vlan command places that port into the specified VLAN, separating the PC in VLAN 10 from the server in VLAN 20 at Layer 2. On the CCNA 200-301 v2 exam, this tests your ability to perform basic switch configuration and VLAN segmentation, often appearing in a lab simulation where you must configure ports and verify with `show vlan brief`. A common trap is forgetting to set the port to access mode first, as a port in dynamic desirable mode might not accept the VLAN assignment reliably. Remember the mnemonic "MAV" for the three-step sequence: Mode (access), Assign (vlan), Verify (show vlan brief).

CCNA Switching and Network Access Practice Question

This 200-301 practice question tests your understanding of switching and network access. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Network Topology
G0/1G0/2SW1PCServer

You are connected to SW1 via the console. SW1 is a Layer 2 switch. Port GigabitEthernet0/1 connects to a PC in VLAN 10, and port GigabitEthernet0/2 connects to a server in VLAN 20. Both ports are currently in VLAN 1. Configure SW1 to assign GigabitEthernet0/1 to VLAN 10 and GigabitEthernet0/2 to VLAN 20, and verify the configuration.

Question 1mediumConfiguration
Open the full VLAN trunking answer →

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 switchport mode access switchport access vlan 10 interface GigabitEthernet0/2 switchport mode access switchport access vlan 20 end show vlan brief

Access ports carry traffic for a single VLAN. By assigning G0/1 to VLAN 10 and G0/2 to VLAN 20, the PC and server are placed in their respective VLANs.

Key principle: A trunk being up does not mean the VLAN is allowed across it. Always verify the allowed VLAN list and whether the VLAN exists on both switches.

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 switchport mode access switchport access vlan 10 interface GigabitEthernet0/2 switchport mode access switchport access vlan 20 end show vlan brief

    Why this is correct

    This sequence correctly configures both ports as access ports and assigns them to the specified VLANs. The 'show vlan brief' command verifies the VLAN assignments.

    Related concept

    Access ports place end devices into a single VLAN.

  • interface GigabitEthernet0/1 switchport mode trunk switchport trunk allowed vlan 10 interface GigabitEthernet0/2 switchport mode trunk switchport trunk allowed vlan 20 end show interfaces trunk

    Why it's wrong here

    This is incorrect because trunk ports are used to carry multiple VLANs between switches, not to connect end devices like PCs and servers. Access ports should be used instead.

  • vlan 10 name PC_VLAN vlan 20 name Server_VLAN interface GigabitEthernet0/1 switchport mode access switchport access vlan 10 interface GigabitEthernet0/2 switchport mode access switchport access vlan 20 end show vlan brief

    Why it's wrong here

    This is incorrect because it includes unnecessary VLAN creation and naming steps. While not harmful, the question only asks to assign ports to VLANs, not to create or name them. However, the main issue is that the configuration is valid but not minimal; the question expects only the required commands.

  • interface GigabitEthernet0/1 switchport access vlan 10 interface GigabitEthernet0/2 switchport access vlan 20 end show vlan brief

    Why it's wrong here

    This is incorrect because it omits the 'switchport mode access' command. Without setting the port mode to access, the port may default to dynamic desirable or trunk mode, which could cause issues with VLAN assignment.

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.

interface GigabitEthernet0/1 switchport mode access switchport access vlan 10 interface GigabitEthernet0/2 switchport mode access switchport access vlan 20 end show vlan briefCorrect answer

Why this is correct

This sequence correctly configures both ports as access ports and assigns them to the specified VLANs. The 'show vlan brief' command verifies the VLAN assignments.

interface GigabitEthernet0/1 switchport mode trunk switchport trunk allowed vlan 10 interface GigabitEthernet0/2 switchport mode trunk switchport trunk allowed vlan 20 end show interfaces trunkWrong answer — click to see why

Why this is wrong here

Trunk ports are not appropriate for end devices; they are designed for inter-switch links.

Why candidates choose this

Candidates may confuse trunk ports with access ports or think that 'trunk allowed vlan' assigns a port to a VLAN.

vlan 10 name PC_VLAN vlan 20 name Server_VLAN interface GigabitEthernet0/1 switchport mode access switchport access vlan 10 interface GigabitEthernet0/2 switchport mode access switchport access vlan 20 end show vlan briefWrong answer — click to see why

Why this is wrong here

The question does not require creating or naming VLANs; it only asks to assign ports to existing VLANs.

Why candidates choose this

Candidates may think they need to create VLANs before assigning ports, but VLANs 10 and 20 are assumed to exist or are created automatically when assigned.

interface GigabitEthernet0/1 switchport access vlan 10 interface GigabitEthernet0/2 switchport access vlan 20 end show vlan briefWrong answer — click to see why

Why this is wrong here

The 'switchport mode access' command is required to explicitly set the port as an access port; otherwise, the port might negotiate trunking.

Why candidates choose this

Candidates may assume that 'switchport access vlan' alone is sufficient, but the mode must be set to access for the command to take effect properly.

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?”

Common exam traps

Common exam trap: an active trunk can still block the VLAN you need

A trunk being up does not prove every VLAN is crossing it. Check allowed VLAN lists, native VLAN mismatch, VLAN existence and access-port assignment.

Trap categories for this question

  • Command / output trap

    This is incorrect because it includes unnecessary VLAN creation and naming steps. While not harmful, the question only asks to assign ports to VLANs, not to create or name them. However, the main issue is that the configuration is valid but not minimal; the question expects only the required commands.

Detailed technical explanation

How to think about this question

VLAN questions usually combine access-port and trunking clues. The key is to identify whether the issue is local to one switchport, caused by the trunk, or caused by the VLAN not existing where it needs to exist.

KKey Concepts to Remember

  • Access ports place end devices into a single VLAN.
  • Trunk ports carry multiple VLANs between switches.
  • Allowed VLAN lists decide which VLANs can cross a trunk.
  • Native VLAN mismatch can create confusing symptoms.

TExam Day Tips

  • Use show vlan brief to verify access VLANs.
  • Use show interfaces trunk to verify trunk state and allowed VLANs.
  • Do not treat every same-VLAN issue as a routing problem.

Key takeaway

A trunk being up does not mean the VLAN is allowed across it. Always verify the allowed VLAN list and whether the VLAN exists on both switches.

Real-world example

How this comes up in practice

A help-desk technician troubleshoots why a newly connected PC cannot reach shared printers on the same floor. The cable is good, the switch port is active, but the PC is in VLAN 20 and the printers are in VLAN 10. The uplink trunk only allows VLAN 10. A trunk being up does not mean every VLAN crosses it.

What to study next

Got this wrong? Here's your next step.

Review VLAN allowed lists, native VLAN mismatch detection, and how to verify VLAN membership with show vlan brief and show interfaces trunk. Then practise related 200-301 questions on switching, trunking, and access-port configuration.

Related practice questions

Related 200-301 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 200-301 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this 200-301 question test?

Switching and Network Access — This question tests Switching and Network Access — Access ports place end devices into a single VLAN..

What is the correct answer to this question?

The correct answer is: interface GigabitEthernet0/1 switchport mode access switchport access vlan 10 interface GigabitEthernet0/2 switchport mode access switchport access vlan 20 end show vlan brief — Access ports carry traffic for a single VLAN. By assigning G0/1 to VLAN 10 and G0/2 to VLAN 20, the PC and server are placed in their respective VLANs.

What should I do if I get this 200-301 question wrong?

Review VLAN allowed lists, native VLAN mismatch detection, and how to verify VLAN membership with show vlan brief and show interfaces trunk. Then practise related 200-301 questions on switching, trunking, and access-port configuration.

What is the key concept behind this question?

Access ports place end devices into a single VLAN.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 7, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.