VLANs – Concepts & Overview
1. What Is a VLAN and Why Does It Matter?
A Virtual Local Area Network (VLAN) is a logical grouping of devices on one or more switches, treated as if they were on their own isolated physical network — regardless of their physical location. Without VLANs, every device connected to the same switch fabric shares a single broadcast domain: one broadcast from any device reaches every other device, wasting bandwidth, exposing traffic to unintended recipients, and making the network harder to manage.
VLANs solve this by partitioning a switch (or group of switches) into multiple virtual broadcast domains at Layer 2. Traffic cannot cross a VLAN boundary without passing through a Layer 3 device — a router or a Layer 3 switch performing inter-VLAN routing.
| Benefit | How VLANs Provide It |
|---|---|
| Reduced broadcast traffic | Each VLAN is its own broadcast domain. Broadcasts stay within the VLAN and are never forwarded to other VLANs |
| Security isolation | Devices in different VLANs cannot communicate directly at Layer 2. ACLs on routers/L3 switches control what inter-VLAN traffic is permitted |
| Logical grouping by function | Users from the same department (e.g., Finance) can be in the same VLAN even if they are on different floors or buildings |
| Simplified management | Adding, moving, or changing a user's VLAN is a software configuration change — no physical rewiring required |
| Better performance | Smaller broadcast domains mean less unnecessary traffic, freeing bandwidth for real data |
| Flexible design | VLANs can span multiple switches using trunk links, enabling campus-wide logical segmentation over a shared physical infrastructure |
Related pages: VLAN Tagging & 802.1Q | show vlan | Inter-VLAN Routing | Voice VLAN | MAC Address Table | Spanning Tree Protocol | VLAN Creation & Management Lab | Trunk Port Configuration Lab
2. Broadcast Domains — With and Without VLANs
Understanding what a broadcast domain is — and how VLANs change its scope — is fundamental to CCNA and to real-world network design.
Without VLANs — One Large Broadcast Domain
Physical topology: 4 departments, all connected to the same switch [PC-Finance-1] --+ [PC-Finance-2] --+ [PC-HR-1] --+-- [Switch] -- [Router] -- Internet [PC-HR-2] --+ [PC-IT-1] --+ [PC-Sales-1] --+ A broadcast from PC-Finance-1 reaches EVERY other device on the switch. One broadcast domain = entire switch. Result: unnecessary traffic, security exposure, difficult troubleshooting.
With VLANs — Multiple Logical Broadcast Domains
Same physical switch, now divided into 3 VLANs: VLAN 10 (Finance): [PC-Finance-1] [PC-Finance-2] VLAN 20 (HR): [PC-HR-1] [PC-HR-2] VLAN 30 (IT): [PC-IT-1] A broadcast from PC-Finance-1 stays within VLAN 10. PC-HR-1 and PC-IT-1 never see it. To communicate across VLANs, traffic must be routed: VLAN 10 <--[Layer 3 device]--> VLAN 20 (inter-VLAN routing)
3. VLAN IDs — Ranges and Significance
Every VLAN is identified by a VLAN ID (VID), a 12-bit number carried in the 802.1Q tag. This gives a theoretical range of 0–4095, though not all values are available for use.
| VLAN ID Range | Name | Description |
|---|---|---|
| 0 | Reserved | Used to indicate that the 802.1Q tag carries only a priority value (CoS) and no VLAN membership. Not configurable. |
| 1 | Default VLAN | Factory default VLAN on Cisco switches. All ports belong to VLAN 1 out of the box. Cannot be deleted or renamed. |
| 2 – 1001 | Normal Range VLANs | Standard user-configurable VLANs. Stored in flash in the
vlan.dat file. Supported by VTP (VLAN Trunking Protocol). |
| 1002 – 1005 | Legacy Reserved | Reserved for Token Ring and FDDI. Present by default on Cisco switches; cannot be deleted. |
| 1006 – 4094 | Extended Range VLANs | Available for large-scale environments (service providers, data
centres). Stored in the running configuration, not vlan.dat.
VTP must be in transparent or off mode to use them. |
| 4095 | Reserved | Reserved by the IEEE 802.1Q standard. Not configurable. |
4. Types of VLANs — Default, Data, Management, Native, Voice
Cisco documentation defines several named VLAN types based on their purpose. These are roles assigned to VLANs — not mutually exclusive technical categories. Any VLAN ID can be assigned any of these roles (with important exceptions for VLAN 1).
4.1 Default VLAN — VLAN 1
VLAN 1 is the default VLAN on all Cisco switches. Every port is assigned to VLAN 1 when the switch ships from the factory. VLAN 1 is also the default native VLAN and default management VLAN unless explicitly changed.
4.2 Data VLAN (User VLAN)
A data VLAN carries standard user-generated traffic — file sharing, web browsing, email, and so on. Each department or logical group is typically assigned its own data VLAN to achieve broadcast isolation and security segmentation.
Typical data VLAN assignment: VLAN 10 -- Finance department VLAN 20 -- Human Resources VLAN 30 -- Engineering / IT VLAN 40 -- Sales VLAN 50 -- Guest Wi-Fi
4.3 Management VLAN
The management VLAN is the VLAN through which network administrators access and manage switches — via SSH, Telnet, SNMP, or a web GUI. An IP address is assigned to the switch's SVI (Switch Virtual Interface) for the management VLAN, which is the only Layer 3 interface a Layer 2 switch has by default.
Configuring the management VLAN SVI on a Cisco switch: Switch(config)# vlan 99 Switch(config-vlan)# name Management Switch(config-vlan)# exit Switch(config)# interface vlan 99 Switch(config-if)# ip address 192.168.99.10 255.255.255.0 Switch(config-if)# no shutdown Switch(config)# ip default-gateway 192.168.99.1
4.4 Native VLAN
The native VLAN is special to trunk links. On an 802.1Q trunk, frames belonging to the native VLAN are sent untagged — no 802.1Q header is added. All other VLANs on the trunk are tagged. The native VLAN must match on both ends of a trunk link, or a VLAN mismatch error occurs and traffic is misdelivered.
Trunk link between Switch A and Switch B: Frame from VLAN 10 → tagged with 802.1Q tag (VLAN ID = 10) → received and decoded Frame from VLAN 20 → tagged with 802.1Q tag (VLAN ID = 20) → received and decoded Frame from VLAN 99 → sent UNTAGGED (native VLAN = 99) → accepted as native VLAN If Switch A native VLAN = 99 but Switch B native VLAN = 1: Untagged frames from Switch A land in VLAN 1 on Switch B → VLAN hopping / data in wrong domain → security and connectivity issue
4.5 Voice VLAN
A voice VLAN is a dedicated VLAN for VoIP (Voice over IP) traffic. IP phones require predictable low latency and jitter, so their traffic is separated from data traffic and marked with a higher QoS class (typically CoS 5 / DSCP EF). A switch access port configured with a voice VLAN effectively operates as two logical ports: one access port for data (for a PC daisy-chained through the phone) and one for voice.
Access port serving both a PC and an IP phone:
[PC] ─── [IP Phone] ─── [Switch port Fa0/1]
│ │
data VLAN 10 voice VLAN 150
Switch config:
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# switchport voice vlan 150
See also: Voice VLAN – Full Guide | Voice VLAN Configuration Lab
5. Access Ports vs Trunk Ports
Switch ports operate in one of two primary modes regarding VLANs: access mode or trunk mode.
| Feature | Access Port | Trunk Port |
|---|---|---|
| VLAN membership | Belongs to exactly one VLAN (the access VLAN) | Carries multiple VLANs simultaneously |
| Frame tagging | Frames are untagged — no 802.1Q header added/expected | Frames are tagged with 802.1Q VLAN ID (except native VLAN) |
| Typical connection | End devices: PCs, printers, IP phones, servers | Switch-to-switch, switch-to-router uplinks |
| Cisco IOS command | switchport mode access |
switchport mode trunk |
| VLAN assignment | switchport access vlan <id> |
switchport trunk allowed vlan <list> |
See also: Access vs Trunk Ports | Trunk Port Configuration Lab
6. How 802.1Q Frame Tagging Works
When a frame travels across a trunk link, the switch inserts a 4-byte 802.1Q tag into the Ethernet frame header — between the Source MAC address and the EtherType/Length field. This tag identifies which VLAN the frame belongs to so the receiving switch knows how to handle it.
802.1Q Tag Structure
Standard Ethernet frame (untagged):
┌──────────────┬──────────────┬──────────┬──────────────────┬─────┐
│ Dest MAC │ Src MAC │ EtherType│ Payload │ FCS │
│ (6 bytes) │ (6 bytes) │ (2 bytes)│ (46-1500 bytes) │(4B) │
└──────────────┴──────────────┴──────────┴──────────────────┴─────┘
802.1Q tagged frame (trunk link):
┌──────────────┬──────────────┬──────────┬──────────┬──────────────────┬─────┐
│ Dest MAC │ Src MAC │ TPID │ TCI │ Payload │ FCS │
│ (6 bytes) │ (6 bytes) │ 0x8100 │ (2 bytes)│ (46-1500 bytes) │(4B) │
└──────────────┴──────────────┴──────────┴──────────┴──────────────────┴─────┘
◄────────── 4-byte 802.1Q tag ──────────►
TCI (Tag Control Information) breakdown — 16 bits total:
┌───────────────────┬───┬────────────────────────────────┐
│ PCP (3 bits) │ DEI│ VID (12 bits) │
│ Priority Code │(1b)│ VLAN Identifier 0–4095 │
│ CoS 0–7 │ │ │
└───────────────────┴───┴────────────────────────────────┘
TPID = Tag Protocol Identifier = 0x8100 (identifies this as an 802.1Q frame)
PCP = Priority Code Point (Class of Service / QoS — 0 lowest, 7 highest)
DEI = Drop Eligible Indicator (formerly CFI)
VID = VLAN ID (the 12-bit value identifying the VLAN: 0–4095)
Tagging Process — Step by Step
1. PC in VLAN 10 sends an untagged Ethernet frame to its switch port (access port).
2. Switch receives the frame on access port Fa0/1 (VLAN 10).
3. Switch looks up destination MAC in the CAM table.
- If destination is on another port in VLAN 10 (same switch): forward untagged.
- If destination is on a trunk link: INSERT 802.1Q tag with VID = 10.
4. Tagged frame travels across the trunk to the next switch (or router).
5. Receiving switch reads the VID (10) → forwards out the correct access port → STRIPS
the 802.1Q tag before delivering the untagged frame to the end device.
End devices never see the 802.1Q tag — tagging/stripping is done by the switch.
See full detail: VLAN Tagging & 802.1Q
7. VLAN Membership — How Ports Are Assigned
A port can be assigned to a VLAN in two ways: statically (by an administrator) or dynamically (by a VMPS or 802.1X policy server). Static assignment is overwhelmingly the most common method in production.
Static VLAN Assignment
The administrator manually assigns each switch port to a VLAN. This is straightforward and predictable — the VLAN membership of a port does not change unless an administrator explicitly changes it.
Assign ports to VLANs on a Cisco switch: ! First, create the VLAN Switch(config)# vlan 10 Switch(config-vlan)# name Finance Switch(config-vlan)# exit Switch(config)# vlan 20 Switch(config-vlan)# name HR Switch(config-vlan)# exit ! Then assign ports Switch(config)# interface fastEthernet 0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 10 ! Finance Switch(config)# interface fastEthernet 0/2 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 20 ! HR ! Verify Switch# show vlan brief
Dynamic VLAN Assignment
Dynamic assignment uses a VLAN Membership Policy Server (VMPS) or 802.1X authentication to assign a VLAN based on device identity (MAC address) or user credentials at login time. This is more complex to implement but allows consistent VLAN membership for a user regardless of which physical port they connect to.
8. VLANs Across Multiple Switches — Trunking
VLANs are not limited to a single physical switch. In a campus network, the same VLAN (e.g., VLAN 10 — Finance) can span multiple switches. The switches carry multiple VLANs over shared trunk links using 802.1Q tagging. This allows users in the same VLAN to be distributed across different floors or buildings while remaining in the same broadcast domain.
Two switches connected by a trunk link, sharing VLANs 10, 20, and 99: Switch A Switch B ┌─────────────────────┐ Trunk (802.1Q) ┌─────────────────────┐ │ Fa0/1 → VLAN 10 │───────────────────►│ Fa0/1 → VLAN 10 │ │ Fa0/2 → VLAN 20 │ VLANs 10,20,99 │ Fa0/2 → VLAN 20 │ │ Fa0/24 (trunk) ─┼───────────────────►│ Fa0/24 (trunk) │ └─────────────────────┘ └─────────────────────┘ A broadcast from a VLAN 10 device on Switch A is forwarded across the trunk and received by all VLAN 10 ports on Switch B — but NOT by VLAN 20 ports on Switch B.
switchport trunk allowed vlan <list>
See also: Access vs Trunk Ports | show vlan Command | Trunk Port Configuration Lab
9. Inter-VLAN Routing — Getting Traffic Between VLANs
Devices in different VLANs cannot communicate at Layer 2. To allow traffic to flow between VLANs, a Layer 3 device is required. There are three main approaches:
| Method | Description | Pros / Cons |
|---|---|---|
| Legacy: Router with separate physical interfaces | One physical router interface per VLAN. Each interface connects to a separate switch port configured as an access port for that VLAN. | Simple but does not scale — requires one physical interface per VLAN |
| Router-on-a-Stick (ROAS) | A single physical router interface is divided into logical sub-interfaces, one per VLAN. The router connects via a trunk port. Each sub-interface has an IP address serving as the default gateway for its VLAN. | Scales to many VLANs on one physical link; the single uplink can become a bottleneck under heavy load |
| Layer 3 Switch (SVI-based routing) | A multilayer switch creates a Switch Virtual Interface (SVI) per VLAN with an IP address. Routing occurs in hardware at wire speed. No external router required for inter-VLAN traffic. | Best performance and scalability for campus networks; higher cost than a Layer 2 switch |
See full guides: Inter-VLAN Routing Overview | Router-on-a-Stick / Inter-VLAN | Layer 3 Switch Routing Lab | ROAS Lab | L3 Switch Inter-VLAN Lab
10. VLAN Summary — Key Facts to Remember
| Topic | Key Fact |
|---|---|
| Default VLAN | VLAN 1 — all ports assigned by default; cannot be deleted or renamed |
| Normal range | VLANs 1–1001 — stored in vlan.dat on flash |
| Extended range | VLANs 1006–4094 — stored in running-config; requires VTP transparent/off |
| Native VLAN | VLAN 1 by default; untagged on 802.1Q trunk; must match on both ends |
| Management VLAN | VLAN assigned an SVI IP for switch administration; should not be VLAN 1 |
| Voice VLAN | Dedicated VLAN for VoIP; tagged at CoS 5 / DSCP EF for QoS priority |
| 802.1Q tag size | 4 bytes inserted between Src MAC and EtherType fields |
| VLAN ID field | 12 bits → values 0–4095 (0 and 4095 reserved) |
| Access port | Belongs to one VLAN; frames are untagged; connects end devices |
| Trunk port | Carries multiple VLANs; frames tagged with 802.1Q; connects switches/routers |
| Inter-VLAN routing | Requires a Layer 3 device (router or L3 switch); VLANs cannot route at L2 |
| vlan.dat | VLAN database file stored in flash; persists across reboots independently of running-config |