VLAN and trunking practice questions

Updated October 9, 2026

Fifteen free VLAN and trunking practice questions with explained answers, written for CCNA candidates. A VLAN splits one switch into separate Layer 2 broadcast domains, and a trunk carries several VLANs between devices with 802.1Q tags; traffic between VLANs needs routing. The topic is tested in the Network Access domain of CCNA 200-301. All questions are original and use Cisco IOS behavior.

How to use these questions

Try each question before opening the answer, and commit to one letter. Underline the constraint word in the stem, such as “untagged”, “same VLAN”, “different VLANs” or “one physical link”, because it usually points to the right mechanism. Read every explanation, including for questions answered correctly, since each one says why the other options fail. The background is in the VLANs and trunking topic guide.

Warm-up: access ports and the basics

Question 1. A PC must be placed in VLAN 10, which already exists, on port GigabitEthernet0/5 of an access switch. Which configuration on the port does this?

  • A. switchport trunk allowed vlan 10
  • B. switchport voice vlan 10
  • C. switchport mode access, then switchport access vlan 10
  • D. switchport trunk native vlan 10
Show answer

Answer: C

An end-host port is configured as an access port with switchport mode access and assigned to its VLAN with switchport access vlan 10. The trunk allowed-VLAN command applies only to trunk ports and does not assign a host to a VLAN. The voice VLAN command is for an attached IP phone, not for the PC data traffic. The native VLAN command sets the untagged VLAN on a trunk and has no effect on an access port.

Question 2. Two PCs are connected to different ports of the same factory-default Catalyst switch with no VLAN configuration at all. The PCs are in the same IP subnet. Can they communicate?

  • A. Yes, both ports are in the default VLAN 1
  • B. No, each port must first be assigned to a VLAN
  • C. No, a trunk must be configured first
  • D. No, ip routing must be enabled first
Show answer

Answer: A

On a default switch every port is in VLAN 1, the default VLAN, so both PCs are in the same broadcast domain and same-subnet traffic is switched between them. No VLAN assignment is required first. A trunk connects switches, not ports within one switch. ip routing is needed only to route between different VLANs or subnets, which is not the case here.

Question 3. Two switches are joined by an 802.1Q trunk. VLAN 30 exists on both switches, and PCs in VLAN 30 on each switch cannot reach each other, while VLAN 10 and VLAN 20 work. The output of show interfaces trunk lists VLANs 10,20 as allowed on the trunk. What is the most likely cause?

  • A. A router-on-a-stick configuration is missing
  • B. The native VLAN is different on the two switches
  • C. ip routing is not enabled on the switches
  • D. VLAN 30 is not in the trunk allowed VLAN list
Show answer

Answer: D

Only VLANs in the allowed list cross a trunk, so VLAN 30 frames are not forwarded over the link. Adding VLAN 30 to the allowed list fixes it. A native VLAN mismatch affects untagged traffic, not tagged VLAN 30 frames. Missing ip routing matters only between VLANs, and these PCs are in the same VLAN. Router-on-a-stick is also for routing between VLANs and is not needed for same-VLAN traffic.

Question 4. PC1 is in VLAN 10 and PC2 is in VLAN 20, both on the same switch, and they must stay in separate VLANs. They cannot ping each other. What is required for them to communicate?

  • A. A second trunk link between the switch and the access layer
  • B. A router or Layer 3 switch routing between the two VLANs
  • C. A different native VLAN on the switch
  • D. A faster uplink from the switch
Show answer

Answer: B

Different VLANs are different broadcast domains, so traffic between them must be forwarded by a Layer 3 device, either a router or a Layer 3 switch with SVIs and ip routing. A second trunk or a faster uplink moves frames but never routes between VLANs. Changing the native VLAN affects only untagged frames on a trunk.

Question 5. A Cisco IP phone is plugged into a switch port, and a PC is plugged into the phone. The PC data belongs in VLAN 10 and the phone voice traffic in VLAN 150. Which configuration is the standard Cisco approach for this port?

  • A. switchport mode access, access vlan 10, voice vlan 150
  • B. switchport mode trunk, allowed vlan 10,150
  • C. switchport mode access, access vlan 10, voice vlan 10
  • D. switchport mode access, access vlan 10, then access vlan 150
Show answer

Answer: A

The port is configured as an access port with switchport mode access, switchport access vlan 10 for the PC, and switchport voice vlan 150 for the phone, and the CCNA treats this as an access port with a voice VLAN. A full trunk with an allowed list is not the Cisco voice VLAN feature. Using the same VLAN for data and voice defeats the purpose. A second access vlan command replaces the first instead of adding a second VLAN.

Scenarios: trunks and inter-VLAN routing

Question 6. A router uses subinterfaces GigabitEthernet0/0/0.10 and .20, each with encapsulation dot1q for its VLAN, to route between VLAN 10 and VLAN 20. Which mode must the connected switch port use?

  • A. Access port in VLAN 10
  • B. Access port in VLAN 1
  • C. dynamic auto
  • D. Trunk
Show answer

Answer: D

Router-on-a-stick sends tagged frames for several VLANs over one link, so the switch port must be a trunk: switchport mode trunk. An access port in VLAN 10 or VLAN 1 would carry only one VLAN, untagged, and the other subinterface would never receive its traffic. dynamic auto waits for the neighbor to start negotiation, and a router does not send DTP, so the port would stay an access port.

Question 7. In a router-on-a-stick design, hosts in VLAN 20 cannot reach their gateway. The router subinterface is configured as interface GigabitEthernet0/0/0.20 with encapsulation dot1q 200 and ip address 192.168.20.1 255.255.255.0. The switch trunk carries VLAN 20. What is the fix?

  • A. Rename the subinterface to .200
  • B. Enable IP routing on the router
  • C. Change the command to encapsulation dot1q 20
  • D. Set the switch native VLAN to 20
Show answer

Answer: C

The number after encapsulation dot1q must match the VLAN ID the hosts are in, so it must be 20. The subinterface number is only a label and does not need to match the VLAN. Router IP routing is on by default and not the issue. Changing the native VLAN would not make the router accept tag 20 on this subinterface.

Question 8. A switch logs the message %CDP-4-NATIVE_VLAN_MISMATCH on a trunk port. What does it indicate?

  • A. A duplex mismatch between the two switches
  • B. The native VLAN differs on the two ends of the trunk
  • C. The VTP domain names differ
  • D. The allowed VLAN lists differ on the two ends
Show answer

Answer: B

This CDP message reports that the native VLAN configured on the local trunk port differs from the native VLAN on the neighbor, so untagged traffic lands in different VLANs. A duplex mismatch produces a different message, DUPLEX_MISMATCH. A VTP domain mismatch and an allowed-list difference are not reported by this message.

Question 9. On a Layer 3 switch, interface vlan 10 is configured with an IP address and no shutdown, VLAN 10 exists in the VLAN database, and ip routing is enabled. The SVI still shows down. Which condition explains this?

  • A. ip routing was enabled after the SVI was created
  • B. The native VLAN of the switch is still 1
  • C. switchport voice vlan is missing from the uplink
  • D. No active port exists in VLAN 10 on the switch
Show answer

Answer: D

An SVI comes up only if its VLAN exists and at least one Layer 2 port in that VLAN, an access port or a trunk carrying it, is up. If every port in VLAN 10 is down or unassigned, the SVI stays down. ip routing, the native VLAN and the voice VLAN do not decide whether the SVI is up.

Question 10. Switch SW2 shows in show interfaces trunk that the allowed list is 1-4094, but the list of VLANs allowed and active in the management domain is only 1 and 10. Users in VLAN 20 on SW1 cannot reach users in VLAN 20 connected to SW2. What explains this?

  • A. VLAN 20 has not been created on SW2
  • B. The trunk allowed list excludes VLAN 20
  • C. The native VLAN is set to 1
  • D. ip routing is disabled on SW2
Show answer

Answer: A

The allowed-and-active list contains only VLANs that exist on the switch. VLAN 20 is allowed on the trunk but is not in the VLAN database of SW2, so SW2 does not forward its traffic; creating the VLAN fixes it. The allowed list already includes all VLANs. The native VLAN is irrelevant to tagged VLAN 20 traffic, and ip routing is irrelevant to hosts that are in the same VLAN.

Edge cases and traps

Question 11. A trunk currently allows VLANs 10 and 20. An administrator enters switchport trunk allowed vlan 30 on the trunk interface, intending to add VLAN 30. What is the result?

  • A. VLANs 10, 20 and 30 are allowed
  • B. Only VLAN 30 is allowed on the trunk
  • C. The trunk goes down until VLAN 30 is created
  • D. VLAN 30 becomes the native VLAN
Show answer

Answer: B

Without the add keyword the command replaces the whole allowed list, so only VLAN 30 is allowed and VLANs 10 and 20 stop crossing the trunk. The correct command to extend the list is switchport trunk allowed vlan add 30. The list is not merged automatically, the trunk does not go down, and the command does not change the native VLAN.

Question 12. Two Catalyst switches have DTP enabled with default settings. SW1 is configured with switchport mode trunk on the interconnecting link, and SW2 with switchport mode dynamic auto. What is the result?

  • A. The link stays an access link because dynamic auto never initiates
  • B. The link becomes a trunk only after the native VLAN is configured on both ends
  • C. The link becomes a trunk
  • D. The port on SW2 is placed in err-disabled state
Show answer

Answer: C

A port in trunk mode actively tries to convert the link to a trunk, and a dynamic auto port accepts that request, so the link becomes a trunk. Dynamic auto never starts negotiation itself, but here SW1 does. The native VLAN does not need to be set first, and the port is not err-disabled by this combination.

Question 13. A router has correct subinterfaces .10 and .20 with encapsulation dot1q and IP addresses on GigabitEthernet0/0/0, but both subinterfaces show down/down. The switch trunk is up. What is the most likely cause?

  • A. ip routing is not enabled
  • B. The subinterfaces need the switchport command
  • C. VLAN 10 must be the native VLAN
  • D. The physical interface is administratively down
Show answer

Answer: D

Subinterfaces depend on the physical interface, and router interfaces are shut down by default, so the parent interface needs no shutdown. ip routing is not needed on a router. switchport commands do not exist on routed subinterfaces. The native VLAN does not decide whether subinterfaces come up.

Question 14. An administrator deletes VLAN 20 with no vlan 20 while three access ports are still assigned to it. What happens to those ports?

  • A. They stay assigned to VLAN 20 but become inactive
  • B. They move automatically to VLAN 1
  • C. They become trunk ports
  • D. They are err-disabled
Show answer

Answer: A

The ports stay assigned to VLAN 20 but become inactive, so hosts on them cannot communicate until the VLAN is re-created or the ports are reassigned. They are not moved to VLAN 1 automatically. They do not change to trunk mode, and they are not shut down or err-disabled.

Question 15. A standard Ethernet frame with a 1500-byte payload crosses an 802.1Q trunk. What is the maximum size of the tagged frame, including the FCS?

  • A. 1518 bytes
  • B. 1522 bytes
  • C. 1504 bytes
  • D. 1526 bytes
Show answer

Answer: B

A standard untagged Ethernet frame with a 1500-byte payload is 1518 bytes including the FCS. The 802.1Q tag adds 4 bytes (2-byte tag protocol identifier and 2 bytes holding priority, DEI and the 12-bit VLAN ID), giving 1522 bytes. 1518 is the untagged size. 1504 and 1526 do not correspond to the standard sizes.

Where to go next

Review the VLANs and trunking topic guide. The links between switches also depend on loop prevention, so continue with the spanning tree practice questions, and practise the addressing side with the subnetting practice problems. Then take the free CCNA 20-question practice test and read the multiple-choice exam tips.