Microsegmentation implementation
What Is a VLAN? Meaning, How It Works and When to Use One
A plain explanation of VLANs: what they are, how tagging and trunks work, and what they don't do.
Jorge HorstUpdated Based on public sources, not lab tested
A VLAN, or virtual local area network, splits one physical network into separate logical networks. Each VLAN is its own broadcast domain, so devices in one don’t see the local traffic of another, even on the same switch. VLANs are a low-cost way to group devices by purpose, but they need firewall rules or ACLs between them to act as a security control.
What is a VLAN in simple terms?
A VLAN makes one switch behave like several separate switches. NIST SP 800-82 gives a simple example: on an 8-port switch, ports 1 to 4 can belong to one VLAN and ports 5 to 8 to another. Devices on ports 1 to 4 then can’t reach those on ports 5 to 8 directly, even though they share the same hardware.
Cisco’s configuration guide describes a VLAN as a network segmented logically by function, team or application, regardless of physical location. It also says unicast, broadcast and multicast traffic goes only to stations in the same VLAN.
How does a VLAN work?
A VLAN works by giving traffic a numeric ID, then letting switches forward it only within that ID. A few terms explain most of it.
| Term | What it means |
|---|---|
| VLAN ID | The number that identifies a VLAN. Cisco lists IDs 1 to 4094 |
| Tagging | Marking traffic with its VLAN ID. IEEE 802.1Q is the standard that covers VLAN bridges |
| Access port | A switch port that belongs to one VLAN, usually connected to an end device |
| Trunk port | NIST SP 800-125B describes these as able to send and receive traffic for multiple VLANs |
| Native VLAN | The VLAN a trunk uses for untagged traffic. CISA advises an unused VLAN here |
| Broadcast domain | The group of devices that receive each other’s broadcasts. CISA treats each VLAN as one |
CISA also separates VLANs into static and dynamic categories. Static VLANs are based on the switch port, and that is the example NIST uses above.
What are VLANs used for?
VLANs are used to separate traffic that has different purposes or sensitivity. NIST SP 800-125B lists these examples for virtualized data centers, and the idea applies to many networks.
| VLAN | Carries |
|---|---|
| Management | Commands used to configure and manage systems |
| Storage | NFS or iSCSI storage traffic |
| VM migration | Traffic created when moving VMs between hosts |
| Logging | Traffic used for fault-tolerant logging |
| Desktop | Traffic from virtual desktops |
| Production | Business applications, often one VLAN per tier: web, application and database |
CISA, the NSA, the FBI and partners also advise putting devices with similar purposes in the same VLAN, in guidance on hardening communications infrastructure. Grouping like this is also a common way to keep IoT devices away from business systems.
How do devices in different VLANs communicate?
Devices in different VLANs communicate through a layer 3 device, such as a router, firewall or multilayer switch. CISA notes that many routers and firewalls support tagged frames, so one physical interface can route between several logical networks.
This is where security comes in. In our view, routing only connects VLANs, and the protection comes from the firewall rules or ACLs on that path. Our guide to VLAN segmentation covers those controls, how VLANs differ from subnets, and how to stop VLAN hopping.
What are the limits of VLANs?
VLANs have limits on security, scale and upkeep.
- Security: CISA warns that default and standard configurations aren’t inherently secure, and it names VLAN hopping, double tagging and switch spoofing as exploits.
- Granularity: NIST SP 800-215 says VLAN-based policies apply to subnets, not individual hosts, so devices in the same VLAN usually aren’t separated from each other.
- Scale: NIST SP 800-125B says that just over 4,000 VLANs is limiting for large data centers. Overlays such as VXLAN allow about 16 million segments.
- Upkeep: the same publication warns about VLAN sprawl, where large VLANs increase broadcast traffic and configuration mismatches.
If one compromised device could reach too much inside a VLAN, you may need finer controls. See microsegmentation vs network segmentation, or start with what microsegmentation is.
Do you need a VLAN?
You likely benefit from VLANs if different groups of devices share switches but have no reason to talk freely. This is our general guidance, not a standard, and it depends on your network.
| Situation | Are VLANs a good fit? |
|---|---|
| Separating guests, staff and servers in an office | Usually, with firewall rules between them |
| Keeping smart devices away from your main devices | Often, if your router and switch support VLANs |
| A few trusted devices on a simple home network | Probably not worth the complexity |
| Controlling traffic between individual servers | Not on their own. See data center microsegmentation |
Your equipment has to support them, so check your router and switch before you plan around VLANs. For a wider view of the options, read what network segmentation is.
Sources
- NIST SP 800-82 Rev. 3, September 2023, Appendix E.1.3: doi.org/10.6028/NIST.SP.800-82r3
- NIST SP 800-125B, March 2016, section 2.4: doi.org/10.6028/NIST.SP.800-125B
- NIST SP 800-215, November 2022, section 5.1.2: doi.org/10.6028/NIST.SP.800-215
- CISA, Recommended Practice: Improving ICS Cybersecurity with Defense-in-Depth Strategies, September 2016, section 2.4.3, pp. 21-22: cisa.gov/sites/default/files/recommended_practices/NCCIC_ICS-CERT_Defense_in_Depth_2016_S508C.pdf
- CISA, NSA, FBI and partners, Enhanced Visibility and Hardening Guidance for Communications Infrastructure, December 2024, p. 4: cisa.gov/sites/default/files/2024-12/joint-guidance-enhanced-visibility-hardening-guide-for-comms-infrastructure-508c.pdf
- Cisco, VLAN configuration guide, Catalyst 9200, IOS XE 17.12: cisco.com/c/en/us/td/docs/switches/lan/catalyst9200/software/release/17-12/configuration_guide/vlan/b_1712_vlan_9200_cg/configuring_vlans.html
- IEEE 802.1Q-2022, standards page: standards.ieee.org/ieee/802.1Q/10323
- RFC 5517, Cisco Systems’ Private VLANs, February 2010 (informational): rfc-editor.org/rfc/rfc5517.html
Frequently asked questions
What does VLAN stand for?
VLAN stands for virtual local area network. It is a logical network created on switches, so devices can be grouped by purpose even when they share the same physical equipment.
What is the difference between a VLAN and a LAN?
A LAN is a local network of connected devices. A VLAN divides a physical network into smaller logical networks on the same switches. CISA describes each VLAN as a single broadcast domain, isolated from the traffic of other VLANs.
How many VLANs can you have?
The VLAN ID field is 12 bits long, and RFC 5517 gives a theoretical maximum of 4,094 VLANs, because IDs 0 and 4095 are reserved. Your switch may support fewer, so check its documentation.
Do you need a router for VLANs?
You need a router, firewall or multilayer switch for traffic to move between VLANs. Devices in the same VLAN can talk without one. CISA notes that many routers and firewalls support tagged frames, so one physical interface can route between several VLANs.
Is a VLAN a security feature?
It helps, but it isn't enough alone. A VLAN separates traffic, and you still need firewall rules or ACLs between VLANs. CISA warns that default VLAN configurations aren't inherently secure.
Related articles
VLAN Segmentation: How It Works, VLAN vs Subnet and How to Secure It
How VLANs segment a network, where their limits are and how CISA says to harden them.
Data Center Microsegmentation: Enforcement Options and How to Roll It Out
How to control server-to-server traffic in a data center, with the trade-offs NIST and CISA describe for each enforcement option.
IoT Network Segmentation: Why Agents Don't Fit and What to Use Instead
How to separate IoT devices when you can't install anything on them, based on official guidance.
Microsegmentation vs Network Segmentation: What Changes and When It Matters
How macrosegmentation, VLANs and microsegmentation differ, based on CISA and NIST guidance.