Wi-Fi & Home Networking

VLANs at Home: Separating Work, Guests and Gadgets

Plan and build separate virtual networks at home so gadgets and guests can't reach your work and personal devices.

Key takeaways

  • A VLAN splits one physical network into logical ones, each with its own address range and rules.
  • The separation only protects you if the router's firewall controls what may pass between VLANs.
  • Tagged trunk links carry several VLANs on one cable, while access ports give a single device one VLAN.
  • Start with two or three networks, change one thing at a time and keep a way back into the admin page.

A VLAN, or virtual local area network, lets one set of cables, switches and access points behave like several separate networks. At home, the usual goal is to keep your work laptop and personal computers apart from smart gadgets and visitors, so that a problem on one side does not spread to the other.

To do it you need a router that can create several networks and apply firewall rules between them, a managed switch if you have wired devices to separate, and access points that can tie a Wi-Fi name to each VLAN. If your needs are simply "keep guests off my stuff", a guest network may already do the job.

What a VLAN actually does

Normally every device plugged into your switch or joined to your Wi-Fi can reach every other one. Broadcast messages, the kind used to discover printers or find a hardware address, reach everybody.

A VLAN limits that. Devices in VLAN 10 hear broadcasts only from VLAN 10 and cannot talk directly to VLAN 20, even if they share the same switch. To get from one to the other, traffic has to pass through a router, which can allow or block it.

The standard behind this is IEEE 802.1Q. It adds a small tag to an Ethernet frame, including a 12-bit VLAN identifier, which gives usable numbers from 1 to 4094. Each VLAN normally gets its own IP subnet, such as 192.168.10.0/24 for the main network and 192.168.20.0/24 for gadgets. If subnets are new to you, subnetting from the ground up explains the notation.

Tagged and untagged ports

Most end devices know nothing about VLANs. The switch handles it for them.

An access port belongs to one VLAN. Frames arrive without tags, the switch assigns them to that VLAN, and removes any tag on the way back out. Your TV plugs into an access port for the gadget VLAN and never knows.

A trunk port carries several VLANs over one cable, using tags to keep them apart. You use trunks between the router and switch, between switches, and from a switch to an access point that broadcasts several network names.

Many trunks also have one untagged or native VLAN for frames without a tag. Terms differ between vendors: you may see "tagged", "untagged" and a port VLAN ID, or PVID, which sets where incoming untagged frames go. Mismatched settings at the two ends of a link are the most common mistake.

Parts of an 802.1Q VLAN tag
0x8100 1 PCP 2 DEI 3 VID 4 Tag identifier Marks the frame as carrying a VLAN tag. 1 Priority Three bits for traffic priority. 2 Drop eligible One bit flagging frames that may be dropped first. 3 VLAN ID Twelve bits naming which VLAN the frame belongs to. 4 0x8100 1 PCP 2 DEI 3 VID 4 Tag identifier Marks the frame as carrying a VLAN tag. 1 Priority Three bits for traffic priority. 2 Drop eligible One bit flagging frames that may be dropped first. 3 VLAN ID Twelve bits naming which VLAN the frame belongs to. 4

A sensible home plan

Resist making a network for every category. Each one adds rules to maintain. A practical starting design looks like this:

VLAN Name Example subnet Who goes there
10 Main 192.168.10.0/24 Your computers, phones, storage
20 Work 192.168.20.0/24 Employer laptop and desk gear
30 Gadgets 192.168.30.0/24 TVs, plugs, cameras, speakers
40 Guest 192.168.40.0/24 Visitors

If you rarely work from home, drop the work network. If visitors only need internet, your router's built-in guest option may replace VLAN 40.

Then write the traffic rules in plain words before touching any settings. For example: main may reach gadgets; gadgets may reach the internet only; work may reach the internet only; guests may reach the internet only; nothing from gadgets or guests may open connections into main or work.

The hardware you need

A router or firewall that supports VLAN interfaces. Many consumer routers do not, or offer only a fixed guest network. Prosumer routers, small business gear, a PC running firewall software, or some open-source router firmware can do it.

A managed or smart switch, if wired devices need to be on different VLANs. A basic unmanaged switch cannot assign VLANs. It may pass tagged frames through, but you should not rely on that for separation. See network switches explained.

Access points that support multiple network names mapped to VLAN IDs. Without that, all your wireless devices stay together.

Mesh systems vary widely. Some support VLANs only on the main unit, some not at all. Check before buying.

A segmented home network
Router and firewall Only route between VLANs, under your rules. Internet Reached through the firewall. Guest VLAN Visitors, isolated. Main VLAN Trusted computers and phones. Work VLAN Employer devices, internet only. Gadget VLAN TVs, cameras and plugs. Router and firewall Only route between VLANs, under your rules. Main VLAN Trusted computers and phones. Work VLAN Employer devices, internet only. Gadget VLAN TVs, cameras and plugs. Guest VLAN Visitors, isolated. Internet Reached through the firewall.

Setting it up

Menus differ greatly, but the order is the same.

  1. Back up the router and switch configurations.
  2. Create the VLANs on the router, giving each an ID, a gateway address and a DHCP pool.
  3. Add firewall rules. Allow each VLAN to get an address, resolve names and reach the internet. Then block traffic to other private ranges, and block access to the router's admin page from untrusted VLANs.
  4. Configure the trunk between router and switch, tagging every new VLAN.
  5. Assign access ports on the switch for wired devices.
  6. Create Wi-Fi names on the access points and map each to a VLAN.
  7. Move devices one group at a time and test.

Leave one port in the main or management VLAN untouched until everything works. If you change the settings of the port you are using to manage the switch, you can lock yourself out, and recovery may mean a factory reset.

Many routers allow all traffic between VLANs by default, so creating them alone does not isolate anything. Test from a device in the gadget network: try to reach your computer's address and the router's login page. Both should fail.

The discovery problem

The most frequent complaint after segmenting is that casting, printing or a speaker app stops working. Many of these features find devices using multicast DNS and similar broadcasts, which stay inside one VLAN.

Options include:

  • Running a multicast DNS reflector or repeater on the router, which copies announcements between chosen VLANs.
  • Adding specific firewall rules so your main network can connect to the device, while the device cannot start connections back.
  • Moving the one device that causes grief to the main network and accepting the trade.

Reflectors help discovery only. You still need rules permitting the actual connection, and some products use their own broadcast methods that reflectors do not cover.

Work devices

A separate work VLAN keeps your employer's laptop from seeing your household devices, and keeps your household devices from seeing it. Most remote work uses a VPN that tolerates this fine. Check whether you need a local printer, and add a narrow rule if so.

Do not assume segmentation meets any employer or regulatory requirement. Follow your organization's policy, and ask its IT team before adding networking equipment in front of their device if they have rules about it. Businesses face a broader version of this design, covered in network segmentation for small businesses.

Testing and troubleshooting

Verify each network from a device inside it, since a configuration that looks right on screen can still be wrong. Join the Wi-Fi name or plug into the port, then check four things in order.

  1. Address. Is it in the expected subnet? An address from another range means the port or network name is mapped to the wrong VLAN. An address starting with 169.254 means no DHCP reply arrived, often because a trunk is not carrying that VLAN.
  2. Gateway. Can the device reach the router's address for its VLAN?
  3. Internet and names. Can it open a site? If addresses work but names fail, the firewall is probably blocking DNS requests to the router.
  4. Isolation. Can it reach devices it should not? Try a few, including the router admin page and the switch's management address.

When something fails, follow the path one link at a time from the device to the router, checking that the VLAN ID is allowed on every trunk along the way. A single switch that was left with old settings will silently drop the traffic.

Managing the management

Your router, switches and access points have addresses and login pages of their own. Decide which VLAN may reach them, usually only the main network or a small dedicated management network. Change their default passwords and keep their firmware current.

Use fixed or reserved addresses for this equipment so you can always find it. Write them on a note kept near the hardware. If a change goes wrong, a laptop plugged into the untouched port with a manual address in the right range is often enough to get back in.

Finally, make changes when nobody is depending on the connection. A mistake in a trunk setting can take down every network at once, and your household will notice faster than you do.

What VLANs do not do

VLANs do not encrypt anything, remove malware or stop a compromised gadget from misbehaving on the internet. Devices in the same VLAN can still attack each other unless you enable client isolation. A misconfigured trunk or a permissive rule can quietly undo the separation.

They also add maintenance. Every new device needs a home, and every odd problem now includes the question of whether a rule is blocking it. Keep a written plan listing IDs, subnets, port assignments and rules with the reason for each.

Is it worth it?

If your home has a handful of devices and a router with a decent guest network, put visitors and gadgets there and stop. That delivers much of the benefit with almost no work.

Build VLANs if you want finer rules than guest mode allows, have wired devices to separate, handle sensitive work at home, run services others can reach, or want to learn networking. For that last group, it is an excellent project, and it pairs well with a home lab where mistakes do not take down the family's internet.

Common questions

Can I use VLANs behind my provider's gateway?

Often yes, by adding your own router and putting the provider unit in bridge or passthrough mode. Some services, such as provider TV boxes, may need particular settings.

Does a VLAN slow things down?

Traffic within a VLAN runs at switch speed. Traffic between VLANs must pass through the router, so a modest router can limit large transfers across them.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Wi-Fi & Home Networking →

Latest news on this topic