A VLAN (virtual local area network) is used to split one physical network into separate logical networks, so devices in different groups cannot talk to each other directly. The main uses are network segmentation, security isolation, reducing broadcast traffic, separating voice, guest and IoT traffic, and organizing devices by department or function instead of by physical location. VLANs work at Layer 2 using IEEE 802.1Q tags.
Key takeaways
- A VLAN creates a separate broadcast domain on shared hardware, so one switch can behave like several isolated networks.
- Common uses are separating departments, guest Wi-Fi, VoIP phones, IoT devices and servers from each other.
- A VLAN alone is not full security: inter-VLAN traffic needs a router or firewall, and VLAN hopping attacks exploit misconfigured trunks.
Without VLANs, every device on a network can see every other device. Your guest Wi-Fi users could reach your file server, a compromised security camera could probe your finance PCs, and one chatty device could flood the whole network with broadcast traffic. A VLAN fixes that without buying a second set of switches.
What is a VLAN?
A virtual local area network (VLAN) is a logical network created inside a physical network. It groups devices into a shared broadcast domain regardless of where they sit physically, so traffic in one VLAN is kept separate from traffic in another.
The key idea is that membership is configured in software, not by rewiring. Two PCs plugged into the same switch can be in different VLANs and unable to talk to each other, while two PCs in different buildings can be in the same VLAN.
As the VLAN reference explains, VLANs let devices that must be kept separate share the cabling of a physical network while being prevented from directly interacting with one another.
VLANs operate at Layer 2 of the OSI model. The switch decides which VLAN a frame belongs to, and frames are tagged with the VLAN ID using the IEEE 802.1Q standard when they travel between switches.
What is a VLAN used for?
VLANs are used to segment a network into smaller, isolated groups. The most common uses are separating departments, isolating guest Wi-Fi, keeping voice traffic apart from data, and quarantining IoT and camera devices from the systems that hold sensitive data.
They also solve a performance problem. In a flat network, broadcast traffic — the "who has this address?" messages devices send constantly — reaches every device. Breaking a large network into smaller broadcast domains reduces the broadcast traffic each device has to process, which keeps large networks fast and stable.
And they simplify management. When someone moves desks or a department reorganizes, an administrator changes a port assignment in the switch instead of running new cable. Grouping is by function, not by geography.
The 7 most common VLAN uses
Most networks end up with a similar set of VLANs. Here are the ones you will see in almost every business, school and well-run home network.
| VLAN use | Typical devices | Why it is separated |
|---|---|---|
| Staff / departments | Employee PCs, by team | Limits lateral movement; a compromise in one team stays there |
| Guest Wi-Fi | Visitor phones and laptops | Guests get internet only, no access to internal systems |
| Voice (VoIP) | Desk phones | Priority and quality of service; voice traffic is time-sensitive |
| IoT and smart devices | Cameras, printers, smart TVs | Cheap devices with weak security cannot reach PCs or servers |
| Servers and infrastructure | Servers, storage, backups | Only specific VLANs can reach them, through firewall rules |
| Management | Switch and firewall admin interfaces | Admin access is reachable only from trusted devices |
| Payment / sensitive data | Card terminals, HR systems | Isolation helps meet PCI DSS and similar compliance rules |
How does a VLAN work?
A VLAN works by tagging Ethernet frames with a VLAN ID and by controlling which switch ports belong to which VLAN. Devices in the same VLAN communicate directly; devices in different VLANs cannot, unless a router or Layer 3 switch forwards the traffic between them.
When a frame enters a switch port assigned to a VLAN, the switch knows which broadcast domain it belongs to. When the frame needs to cross to another switch, the IEEE 802.1Q standard inserts a 4-byte tag into the Ethernet frame between the source MAC address and the type field.
The tag carries a 12-bit VLAN ID, which is why there are 4,096 possible VLAN IDs, with 1 to 4094 usable.
Access ports: one VLAN per device
An access port belongs to a single VLAN and connects to an endpoint such as a PC, printer or phone. Frames leave and arrive untagged, so the connected device does not even know VLANs exist — the switch keeps track internally. Cisco's configuration guide defines an access port as a port that carries traffic only to and from the specific VLAN assigned to it.
Trunk ports: many VLANs over one cable
A trunk port carries traffic for multiple VLANs, usually between two switches or between a switch and a router. Each frame is tagged with its VLAN ID so the switch at the other end knows which VLAN it belongs to.
Exactly one VLAN on a trunk travels untagged: the native VLAN, which is VLAN 1 by default. Cisco's guide notes that a trunk port is capable of carrying traffic for any or all the VLANs accessible by a specific switch.
Inter-VLAN routing: how VLANs talk to each other
By default, devices in different VLANs cannot communicate at all. When they need to — for example, staff PCs reaching a server VLAN — the traffic goes through a router or a Layer 3 switch, which can apply firewall rules and access control lists to decide what is allowed. This is where real security policy lives: the VLAN creates the separation, and the router or firewall enforces it.
What are the benefits of using VLANs?
Security. A compromised device in the guest VLAN cannot reach your servers, and a hacked camera cannot probe your finance PCs. VLANs limit lateral movement, which is how most breaches spread.
Performance. Smaller broadcast domains mean less broadcast traffic per device, which matters as networks grow past a few dozen devices.
Organization. Devices are grouped by function, not by which switch port they happen to be plugged into. A new hire in sales joins the sales VLAN wherever they sit.
Cost. One set of switches and cables carries many logical networks. Without VLANs, each isolated group would need its own hardware.
Compliance. Separating card payment terminals or health data onto their own VLAN is a common step toward PCI DSS and HIPAA compliance, because it shrinks the scope of what auditors must examine. Our small business cybersecurity checklist covers network segmentation alongside the other controls auditors look for.
VLAN vs subnet: what's the difference?
A VLAN and a subnet are often confused because they are usually configured together, but they work at different layers. A VLAN is a Layer 2 construct: it separates broadcast domains on switches. A subnet is a Layer 3 construct: it is a range of IP addresses.
| VLAN | Subnet | |
|---|---|---|
| OSI layer | Layer 2 (data link) | Layer 3 (network) |
| What it separates | Broadcast domains on switches | IP address ranges |
| Configured on | Switches | Routers and host IP settings |
| Needs the other? | No, but usually paired with one subnet per VLAN | No, but usually mapped to one VLAN |
| Traffic between them | Needs a router or Layer 3 switch | Needs a router or Layer 3 switch |
In practice, the standard design is one subnet per VLAN: VLAN 10 gets 192.168.10.0/24, VLAN 20 gets 192.168.20.0/24, and so on. The VLAN keeps the traffic apart at Layer 2, and the subnet gives each group its own addresses at Layer 3.
What VLANs can't do: limits and security risks
A VLAN is a segmentation tool, not a security product. It does not encrypt traffic, it does not inspect packets, and it does not stop an attacker who is already inside the same VLAN. Three limits matter most.
VLAN hopping. If a trunk port is misconfigured — for example, if it accepts untagged frames on the native VLAN or negotiates trunking automatically — an attacker can send double-tagged frames or spoof a trunk to reach other VLANs. The fixes are simple: disable automatic trunk negotiation, set the native VLAN to an unused VLAN, and allow only the VLANs each trunk needs.
Same-VLAN attacks. Devices in the same VLAN can talk freely. If an attacker lands on a staff PC, other staff PCs in that VLAN are reachable. VLANs reduce the blast radius; they do not eliminate it.
No inspection. A VLAN never looks inside a packet. Malware, phishing links and malicious traffic pass through a VLAN unimpeded. Firewalls, endpoint protection and monitoring still have to do that work. For stronger isolation, modern networks add microsegmentation, which enforces identity-based rules between individual workloads rather than whole groups.
How to set up a VLAN: the basic steps
The exact menus differ by vendor, but the sequence is the same on Cisco, UniFi, TP-Link and most managed switches.
- Plan your VLANs. List the groups you need — staff, guest, IoT, servers, management — and assign each a VLAN ID and an IP subnet.
- Create the VLANs on the switch. In Cisco IOS, that is
vlan 10followed byname STAFF. In a web interface, it is VLAN Management, then Add, then the ID and name. - Assign access ports. Put each endpoint port in its VLAN:
switchport mode accessthenswitchport access vlan 10. - Configure trunks between switches. Set the uplink ports to trunk mode, set the native VLAN to an unused number, and allow only the VLANs that need to cross.
- Set up inter-VLAN routing. Create a switched virtual interface (SVI) or router sub-interface for each VLAN, and add firewall rules that allow only the traffic each group genuinely needs. If you are doing this on a home network, start with our guide to securing your Wi-Fi network first.
- Verify. Use
show vlan briefand test that a device in one VLAN cannot reach a device in another except through the rules you defined.
The bottom line
A VLAN is used to turn one physical network into several separate logical networks, so guests, IoT devices, phones and staff systems can share the same switches and cables without being able to reach each other. It cuts broadcast traffic, simplifies management, and sharply limits how far a compromise can spread.
Just remember its limits: a VLAN is separation, not inspection. Pair it with a firewall between VLANs, an unused native VLAN, and trunk allow-lists — and put your cameras and smart devices on their own VLAN, as we explain in our guide to securing your Wi-Fi network.
Frequently asked questions
What is a VLAN in simple terms?
A VLAN is a way to make one physical network behave like several separate networks. Devices in the same VLAN can talk to each other as if they were on their own switch, while devices in other VLANs are kept apart unless a router deliberately connects them.
What is a VLAN used for in a home network?
In a home or small office, VLANs are mainly used to isolate guest Wi-Fi, smart-home and IoT devices, and security cameras from your main computers. If a cheap camera is compromised, the attacker cannot reach your laptop or NAS on another VLAN.
Is a VLAN the same as a subnet?
No, but they usually go together. A VLAN is a Layer 2 construct that separates broadcast domains on switches, while a subnet is a Layer 3 IP addressing concept. In practice each VLAN is normally given its own IP subnet, so the two are often configured as a pair.
Do VLANs improve security?
Yes, but only as one layer. VLANs stop devices in different groups from talking directly and contain broadcast traffic, which limits how far an attacker can move. They do not encrypt traffic, and a misconfigured trunk port can let an attacker hop between VLANs, so firewall rules and access lists are still needed.
What is the difference between a VLAN and a VPN?
A VLAN segments a local network into virtual groups at the switch level, while a VPN encrypts traffic over the internet so a remote device can join a network securely. They solve different problems and are often used together.
How many VLANs can you have?
IEEE 802.1Q uses a 12-bit VLAN ID field, which gives 4,096 possible values. VLAN IDs 1 to 4094 are usable; 0 and 4095 are reserved, and VLAN 1 is the default VLAN on most switches.
What is a trunk port vs an access port?
An access port belongs to one VLAN and carries untagged traffic to an endpoint such as a PC or printer. A trunk port carries traffic for multiple VLANs between switches, tagging each frame with its VLAN ID so the switch at the other end knows which VLAN it belongs to.
Do I need a VLAN for my small business?
If you have guest Wi-Fi, security cameras, or devices that handle payment or sensitive data, yes. Even a simple three-VLAN setup — staff, guests, and IoT — sharply reduces the damage a single compromised device can do, and most managed switches support it.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against the IEEE 802.1Q model as documented in Cisco's VLAN administration and configuration guides and the VLAN reference on Wikipedia.
How we write and fact-check →