VLANS on Home Networks- Setup and Use (2024)

VLANS on Home Networks- Setup and Use (1)In the early days of networking splitting a network into segments required a router.

VLANS or Virtual LANS is a technology that allows you to split a home network into segments using low cost switches.

Generally a switch will send broadcast traffic to all connected ports, and will allow devices connected on any port to communicate with any other device.

VLANS were created in order to reduce the amount of broadcast traffic on a network.

However on home networks they are used mainly to improve network security.

How Do VLANs Work

If we consider a switch with 8 ports as shown in the schematic below.

A broadcast sent from a device attached to any port will be sent to all ports.

VLANS on Home Networks- Setup and Use (2)

In addition any device attached to any port can communicate with any other device attached to any port.

This becomes problematic when you have untrusted devices with access to your network or as in the case of home automation you have IOT devices that are possibly vulnerable to attack.

However with a VLAN capable switch it is possible to restrict broadcasts and to control which devices can communicate with each other.

This makes it possible to design a more secure home network.

If we now take out 8 port switch and split it into two VLANs which we call VLAN1 and VLAN2 as shown below.

VLANS on Home Networks- Setup and Use (3)

In this configuration we effectively have created two independent networks.

Devices connected to VLAN1 cannot communicate with devices that are connected to VLAN2 and vice versa.

To accomplish this the switch maintains tables of VLANs and MAC addresses.

Just as in normal switch operation it knows the MAC address of the device connected to each port and in VLAN mode it knows to only send the packet to a device with a MAC address on the same VLAN.

VLAN Uses on A Home Network

On Home networks the main use is for security where you want to isolate certain devices from each other.

You will need to choose which devices to use to implement your VLAN and the VLAN mode to use.

VLANs are supported on routers (not all) and on network switches.

On routers the VLANS have different IP subnets.

VLAN Modes

Most devices will support multiple VLAN modes.

The TP link smart switch(TL-SG105E) supports three modes:

  1. MTU VLAN (Multi-Tenant Unit VLAN)
  2. Port Based VLAN
  3. 802.1Q VLAN

which mode you need to use will depend on your network requirements.

MTU VLAN (Multi-Tenant Unit VLAN)

This uses a shared uplink port that is normally connected to the Internet.

The other ports can send and receive data on the uplink port but not between each other as shown in the schematic below:

VLANS on Home Networks- Setup and Use (4)

This is very easy to configure as all you really need to do is choose the uplink port (shared port) and enable it.

For example it can be used to:

  • Create an isolated guest network.
  • create an Isolated smart home network.

The schematic below shows the basic layout:

VLANS on Home Networks- Setup and Use (5)

Port Based VLANS

In this mode a VLAN can consist of several ports but a port can only exist on one VLAN.

It is used when you want to create an isolated network.

A possible configuration is shown in the schematic below:

VLANS on Home Networks- Setup and Use (6)

In this configuration devices on VLAN 1 can access device connected to ports 1,2 and 3 but not devices connected to ports 4,5 (VLAN 2).

Devices connected to ports 4,5 (VLAN 2 ) can connect to each other and have no internet connection, and cannot connect to devices on VLAN 1

802.1Q VLAN

This is the most flexible mode but also the most difficult one to configure.

The IEEE 802.1Q protocol defines a new format for the Ethernet data frame by inserting a VLAN tag in the data frame data frame as shown in the schematic below:

VLANS on Home Networks- Setup and Use (7)

Tagging is used when you have multiple VLAN switches and a distributed VLAN.

As an example imagine you had devices in the living room connected to a smart switch and devices in a home office connected to a second smart switch.

Now you want some devices in the living room to be on the same VLAN.

Because they are physically connected to two different switches you will need to used tagging.

Because this is more complex I will cover it in its own tutorial at a later date but TP-Link include it as an example here.

For this tutorial we will take an example of a single switch with no tagging and configure two VLANs (main and guest ) with both VLANs able to connect to the Internet.

The following schematic is a modified schematic taken from the TP-Link site here.

VLANS on Home Networks- Setup and Use (8)

Although we have only two networks (guest and main) we require 3 VLANs.

As port 1 connects the switch to the router all ports need access to this port and so we configure VLAN1 as the default to include all ports.

VLAN2 is the main network and we will use ports 1,2 and 3. VLAN3 is the guest network with ports 1,4 and 5.

VLANS on Home Networks- Setup and Use (9)

Now the not very obvious configuration is the PVID (port VLAN ID) settings which must be done for this to work the PVID must match the VLAN ID.

VLANS on Home Networks- Setup and Use (10)

TP-Link Router Configuration for Guest Network

This is the configuration I use for a guest network on my home network.

My TP-Link Router also supports VLANS, and so I connect my guest network which is in the basem*nt to LAN1 (port1) and assign it to its own VLAN.

There is no option to assign a Wan Interface as it is automatically allowed.

VLANS on Home Networks- Setup and Use (11)

This is a schematic of my home network using the TP-link router..

VLANS on Home Networks- Setup and Use (12)

Notes:

  • The Wi-Fi router is on the main network VLAN.
  • The Router assigns a different subnet to the second VLAN. The main network uses 192.168.1.0 and the basem*nt VLAN uses 192.168.2.0
  • The basem*nt VLAN has its own WAP

The DHCP server on the router is automatically configured to assign addresses on the new subnet as shown below:

VLANS on Home Networks- Setup and Use (13)

Home Network VLAN Testing

The easiest way of testing is using the ping command.

You should not be able to ping machines on different VLANs.

VLANS on Home Networks- Setup and Use (14)

DHCP server Notes

The DHCP server must be located on a VLAN that is accessible by all other VLANs which usually means it is on the Internet router.

If you want a VLAN to use a separate DHCP server than the one on the router then you can install one on the VLAN without causing a problem to machines on the other VLANs.

However because a VLAN has a DHCP server it doesn’t prevent it from using the central DHCP server, and you cannot guarantee that a client on the VLAN will get the address from the local DHCP server.

Simple Home network Design Example

Example 1

You have lodgers or a guest house and want to isolate guest machines from your main network but give them access to the Internet.

Your router doesn’t support VLANs and guest Wi-Fi doesn’t have the range. You cannot change the router and both the guest and main network need Wi-Fi access

Solution

You will need a VLAN capable switch to split the network. You will also need to Wireless access points and shouldn’t use the WI-Fi provided by the main router.

A schematic is show below:

VLANS on Home Networks- Setup and Use (15)

The above solution can be achieved using 802.1Q VLAN or MTU VLAN modes on the switch.

Quick Questions

Referring to the schematic for solution 1 above.

Q1- If you connect a device to the main Wi-Fi router using Wi-Fi will you be able to ping a devices on the guest and main network? Yes or No.

Q2. Will a device on the main network be able to ping a device on the main network? Yes or No.

Q3: The main router also has 3 spare Ethernet ports. Can you use them?

Q4 On what device do you think the DHCP server is located?

Answers

A1 Yes

A2 Yes

A3 If you do it will not be secure.

A4 The main router

Switches With VLAN Support

Usually if the switch is labelled as a smart switch or managed switch it will have VLAN support but you should read the description to be sure.

Below is screen shot from Amazon of a TP-link switch (£30) that supports VLANs.

VLANS on Home Networks- Setup and Use (16)

VLANS vs Subnets

VLANs work on switches whereas to implement subnets you need a router.

A routed network is more difficult to setup than a switched network.

However a routed network does create separate broadcast domains while a switched network doesn’t unles you use VLANs.

The general rule is switch when you can and route when you must.

See Home Network Subnet Mask Explained

Summary

The main benefit of VLANs is that they provide an excellent and low cost method of greatly improving you home network security.

Although they also reduce broadcast traffic this is not usually necessary on a home network.

However if you have several hundred devices then this is a distinct advantage and so VLANs should be used.

Terms Used in this Tutorial

broadcast traffic– traffic that is end to all hosts(devices) on an network. Many network services rely on this type of traffic e.g ARP and DHCP.

ARP– protocol used to resolve obtain the MAC address of a device using and iP address.

DHCP– Protocol for obtaining an IP address. See Understanding DHCP on Home Networks

Related Tutorials and Resources

Please Let me Know if you found it Useful

[Total: 31 Average: 4.4]

VLANS on Home Networks- Setup and Use (2024)
Top Articles
Latest Posts
Article information

Author: Twana Towne Ret

Last Updated:

Views: 5757

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Twana Towne Ret

Birthday: 1994-03-19

Address: Apt. 990 97439 Corwin Motorway, Port Eliseoburgh, NM 99144-2618

Phone: +5958753152963

Job: National Specialist

Hobby: Kayaking, Photography, Skydiving, Embroidery, Leather crafting, Orienteering, Cooking

Introduction: My name is Twana Towne Ret, I am a famous, talented, joyous, perfect, powerful, inquisitive, lovely person who loves writing and wants to share my knowledge and understanding with you.