VLANs, Trunking & InterVLAN Routing

CCNA 200-301 · Network Access

By Abu Anns · Last updated 20 November 2026Exam version: 200-301 v1.1 (current until 2 Feb 2027)

A VLAN (Virtual Local Area Network) is a logical grouping of switch ports that behaves like a separate physical network. Two devices in different VLANs cannot communicate directly even if they are plugged into the same switch — they need a router, exactly as if they were on different switches in different buildings. VLANs are how a single switch serves several departments, each isolated from the others, and they are one of the most heavily tested topics on the CCNA. The concepts are few, but the exam tests them through configuration and troubleshooting scenarios, so you need to know both the ideas and the commands.

What a VLAN is and why it matters

By default, every port on a Cisco switch belongs to VLAN 1, the default VLAN, and all ports in VLAN 1 share one broadcast domain. When you create additional VLANs — say VLAN 10 for Sales and VLAN 20 for Engineering — each VLAN becomes its own broadcast domain. A broadcast sent by a device in VLAN 10 is forwarded only to other ports in VLAN 10. This gives three benefits the exam cares about: segmentation (departments are isolated from each other), security (traffic between VLANs must pass through a router or Layer 3 switch, where access lists can control it), and reduced broadcast traffic (broadcasts stay inside their own VLAN instead of reaching every device on the switch). VLAN numbers run from 1 to 4094. The normal range is 1 to 1005 and is the range the CCNA covers; VLANs 1002 to 1005 are reserved for legacy Token Ring and FDDI and cannot be deleted; the extended range (1006 to 4094) is used less commonly.

Creating a VLAN is simple: vlan 10 in global configuration mode, optionally with name Sales. Assigning a port to it takes two commands in interface mode: switchport mode access and switchport access vlan 10. Verify with show vlan brief, which shows every VLAN and its member ports, and show interfaces switchport for a single port's details.

Access ports and voice VLANs

An access port belongs to exactly one VLAN and carries traffic for that VLAN untagged — the connected device has no idea VLANs exist. That is the correct port type for endpoints: PCs, printers, and servers. A common exam scenario is the voice VLAN: an IP phone connects to the switch port, and the user's PC connects through the phone. The switch port is configured as an access port for the data VLAN plus a voice VLAN (switchport voice vlan 150), so the phone's traffic is tagged for the voice VLAN while the PC's traffic stays untagged on the data VLAN. The two devices share one cable and one port but live in different VLANs, which lets the network prioritise voice traffic and keep it separate from data.

Trunk ports and 802.1Q

When VLANs span multiple switches, the link between the switches must carry traffic for several VLANs at once. That link is a trunk port, and it identifies each frame's VLAN by tagging it. The tagging standard is IEEE 802.1Q: the switch inserts a 4-byte tag into the Ethernet frame, including a 12-bit VLAN ID (which is why VLAN numbers go up to 4094). The receiving switch reads the tag, removes it, and forwards the frame to the right VLAN. Endpoints never see tags — tagging happens only between switches (and between a switch and a router doing interVLAN routing).

One VLAN on a trunk is special: the native VLAN. Traffic for the native VLAN crosses the trunk untagged, for compatibility with devices that do not understand tagging. By default the native VLAN is VLAN 1, and it must match on both ends of the trunk — a native VLAN mismatch is a classic exam troubleshooting scenario, producing errors and unpredictable forwarding of untagged traffic. Best practice is to change the native VLAN to an unused VLAN number (such as 99) on both sides, which also closes a VLAN-hopping security hole. Configure a trunk with switchport mode trunk and set the native VLAN with switchport trunk native vlan 99. You can limit which VLANs cross a trunk with switchport trunk allowed vlan 10,20; by default, all VLANs are allowed.

Trunk negotiation is handled by DTP (Dynamic Trunking Protocol). A port in dynamic desirable mode actively tries to form a trunk; a port in dynamic auto mode forms a trunk only if the other side asks. Two ports both in dynamic auto will not form a trunk — a favourite exam trap. For exam purposes, the reliable approach is to set trunk mode explicitly on both sides and disable negotiation with switchport nonegotiate where appropriate. Verify trunk status with show interfaces trunk, which shows the mode, encapsulation, native VLAN, and allowed VLANs for every trunk.

InterVLAN connectivity

Devices in different VLANs need a Layer 3 device to talk to each other. The traditional method is router on a stick: a single router interface connects to a switch trunk port, and the router uses subinterfaces — one per VLAN — each with its own IP address and 802.1Q encapsulation. For VLAN 10, the configuration is interface GigabitEthernet0/0.10, encapsulation dot1Q 10, ip address 192.168.10.1 255.255.255.0. The physical interface itself has no IP address; the subinterfaces do the routing. Router on a stick is simple and cheap, but all interVLAN traffic shares one physical link, which becomes a bottleneck in larger networks.

The modern method is a Layer 3 switch with switched virtual interfaces (SVIs): interface vlan 10 with an IP address, plus ip routing enabled globally. Each SVI is the default gateway for its VLAN, and routing between VLANs happens in hardware at wire speed. The exam tests both methods, and the troubleshooting questions are usually the same in either case: if a host cannot reach another VLAN, check that its default gateway is the correct SVI or subinterface address, that the gateway is up, and that the trunk between the switch and the router carries the VLAN.

Advertisement

Exam traps to watch for

Practice questions

Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.

Q1.Two PCs are connected to the same switch but are in different VLANs. Why can they not communicate directly?

Report an error

Q2.What does the 802.1Q protocol do on a trunk link?

Report an error

Q3.A trunk link has VLAN 1 as the native VLAN on one switch and VLAN 99 as the native VLAN on the other. What is the result?

Report an error

Q4.Which command assigns switch port GigabitEthernet0/5 to VLAN 20 as an access port?

Report an error

Q5.Two switches are connected, and both ports are in dynamic auto mode. What happens?

Report an error

Q6.In a router-on-a-stick design, a router subinterface is configured for VLAN 30 with the command encapsulation dot1Q 30. What is the purpose of this command?

Report an error

Q7.A user PC connects through an IP phone to a single switch port. Which configuration lets the phone traffic and PC traffic travel in different VLANs?

Report an error

Q8.Which VLAN range is the normal range that the CCNA exam covers for VLAN configuration?

Report an error

Q9.An engineer configures a Layer 3 switch for interVLAN routing. Which two steps are required for hosts in VLAN 10 to reach hosts in VLAN 20?

Report an error