- Joined
- Jan 17, 2001
- Messages
- 8,665
- Reaction score
- 4,673
Thanks to @TanKianW who helped straighten out my misunderstanding, I've gotten my 802.1q VLAN info refreshed.
VLANs = Virtual LANs. Simplistically, it's a way to use the same hardware you have in place - including cabling, and subdivide it into smaller networks. Here are some reasons why people may want to do this at home.
There are 2 types of devices - VLAN aware and non-VLAN aware. VLAN aware devices include some Routers, Managed Switches, some APs, servers. We tag at the switch/infrastructure level, and usually do not 802.1q tag individual clients since it's too easy for users to change the configuration on their own PCs. But conversely, we configure tagging at the servers rather than on the switch ports - but it's your choice.
Terminology is confusing. Let's stick to Tagged (Cisco: Trunk), Untagged (Cisco: "Access"), Native, Default.
Practical example, an exaggeration of my case. (My own network has simplified from this - this was an early example, but it's good to show separation of networks into 5 levels to demonstrate the principles). Let's assume that we are using 2 of the cheapest VLAN capable switches on the market, the 8-port TP-Link SG108e. It's around $50 brand new, has simple management capabilities.
So, the VLAN tags (T = Tagged, U = Untagged)
If instead you were using it for Tenants, then VLAN22 is for Tenant 1 and VLAN 33 for Tenant 2... The Wifi SSIDs will be updated to reflect their own personal access, or you can plug in their own room Access Point to their assigned Switch Port (and you untag at the switch so that all their traffic going through that port is on that VLAN 22/33 respectively). No need to configure any VLAN tagging inside their own room APs. Just plug and play.
If I had SingtelTV, I could probably save one cable run and arbitrarily use Port #6 on both switches to a unique VLAN TAG (eg, VLAN 77, remember to also Tag Port 7/8 on the respective switches) and pass through SingtelTV rather than run an extra physical line from the DB box to the TV Switch.
Changelog:
VLANs = Virtual LANs. Simplistically, it's a way to use the same hardware you have in place - including cabling, and subdivide it into smaller networks. Here are some reasons why people may want to do this at home.
- Some users want to divide servers (NAS, Printer, other servers) from other Client (PCs, Laptops, Tablets and Phones), Media (TVs, Playstation, Wireless speakers), IoT (Smart devices like Home surveillance cameras, Fridge, Washing Machine, Doorbell, Lightbulbs, etc...) This creates separate networks and improves privacy and protection as it isolates the various groups away from each other. Your firewall rules will decide who you allow to communicate to each other.
- VPN-on-Router setups. If you have your VPN configured on the router on its own VLAN, all devices on that VLAN share the same VPN connection. Since many VPN providers limit the number of client devices, the router itself is considered one connection instance - and you don't have to toggle on/off devices just to access the VPN - just connect to a different wireless SSID.
- Some may be renting a room or two out, and want to create separate networks for their tenants, so that their tenants cannot access their own personal computers/infrastructure. It also protects the tenants' privacy, so that's a good thing too.
There are 2 types of devices - VLAN aware and non-VLAN aware. VLAN aware devices include some Routers, Managed Switches, some APs, servers. We tag at the switch/infrastructure level, and usually do not 802.1q tag individual clients since it's too easy for users to change the configuration on their own PCs. But conversely, we configure tagging at the servers rather than on the switch ports - but it's your choice.
Terminology is confusing. Let's stick to Tagged (Cisco: Trunk), Untagged (Cisco: "Access"), Native, Default.
- DEFAULT VLAN = 1. We can't change it.
- The NATIVE VLAN is the only VLAN which is not tagged in a trunk.
- It works as if there is no VLAN configured like in an unmanaged switch - native VLAN frames are transmitted unchanged.
- It's set out-of-the-factory at 1, but can be changed by the user as needed.
- In a corporate setting, it's usually changed out of 1 to something the network admins will internally know.
- The UNTAGGED VLAN is set at the port,
- It is for devices that are not 802.1q capable. The device connected to this port is "set" on the VLAN.
- For example, if I untag Port 4 as VLAN 88, it means that my computer plugged into Port 4 is on VLAN 88.
- The TAGGED port allows you to pass traffic for multiple VLANs. It is used to connect multiple VLAN-infrastructure devices like the Router, Switch, Access Point.
- For example, if Port 8 on my Switch is to pass through VLANs 11, 22, 33, 44, 88, and 99, I have to tag port 8 for all these VLANs.
Practical example, an exaggeration of my case. (My own network has simplified from this - this was an early example, but it's good to show separation of networks into 5 levels to demonstrate the principles). Let's assume that we are using 2 of the cheapest VLAN capable switches on the market, the 8-port TP-Link SG108e. It's around $50 brand new, has simple management capabilities.
- I intend to have the following VLANs
- 1 - Default. I leave my Router, both Switches SW01 & SW02, wireless Access Points wAP1, wAP2, wAP3 on this VLAN. 192.168.1/28, each device has its reserved IP. DHCP is on for 5 additional devices (nothing should be on this anyway). ARPwatch on.
- 11 - Servers, for my NAS, Printer. 192.168.11/28, each device has reserved IP. DHCP off. ARPwatch on.
- 22 - Clients. This is for all my computers, tablets, and phones 192.168.22/26, DHCP on
- 33 - Media. This is for hall TV, parents room TV, Android TV box, Playstation, Google Home devices 192.168.33/28, DHCP on
- 88 - Guests. This is for all other devices, including IoT. 192.168.88/24, DHCP on
- (Optional) 77 - IPTV. This is to demonstrate a "private line" to connect a device, as if you physically lay a separate cable to connect the two ends. This is very useful to show that you can share a single laid physical cable for multiple networks.
- Assume all VLANs configured on router with Firewall rules established. That is a separate topic.
| SW01 - Router/DB | Device | VLAN Tags | SW02 - Hall TV Area | Device | VLAN Tags | |
|---|---|---|---|---|---|---|
| Port #1 | wAP1 | 11U, 22T, 88T | Port #1 | NAS | 11T, 22U, 33U | |
| Port #2 | wAP2 | 11U, 22T, 88T | Port #2 | Printer | 11T, 22U, 88U | |
| Port #3 | wAP3 | 11U, 22T, 88T | Port #3 | Android TV Box | 33U | |
| Port #4 | Parents' Room TV | 33U | Port #4 | TV | 33U | |
| Port #5 | Port #5 | PS4 | 33U | |||
| Port #6 | (Optional Singtel TV) | 77U | Port #6 | (Optional Singtel TV) | 77U | |
| Port #7 | Connect to Sw02 | 11T, 22T, 33T, 88T(, 77T) | Port #7 | |||
| Port #8 | Connect to Router | 11T, 22T, 33T, 88T(, 77T) | Port #8 | Connect to Sw01 | 11T, 22T, 33T, 88T(, 77T) |
So, the VLAN tags (T = Tagged, U = Untagged)
- Sw01, Sw02 - see table above. By convention, I use the last ports as uplink/downlink. Feel free to use from the first port if you feel better about it - just be aware which ports you have decided to use for whichever purpose.
- wAP
- Wifi Network A - VLAN22
- Wifi Network B - VLAN88
If instead you were using it for Tenants, then VLAN22 is for Tenant 1 and VLAN 33 for Tenant 2... The Wifi SSIDs will be updated to reflect their own personal access, or you can plug in their own room Access Point to their assigned Switch Port (and you untag at the switch so that all their traffic going through that port is on that VLAN 22/33 respectively). No need to configure any VLAN tagging inside their own room APs. Just plug and play.
If I had SingtelTV, I could probably save one cable run and arbitrarily use Port #6 on both switches to a unique VLAN TAG (eg, VLAN 77, remember to also Tag Port 7/8 on the respective switches) and pass through SingtelTV rather than run an extra physical line from the DB box to the TV Switch.
Changelog:
- Simplified with Table.
- Added VLAN 77 to demonstrate a "private line" over a physical line using managed switches. Useful if you want to use it to run a separate line to connect a device, for example. Or if you feel like reorganising your hardware and moving it around your home to suit your deployment better - one managed switch in the DB box and one managed switch at a more accessible central location can do wonders - with just one physical cable laid in between the 2 points.
Last edited: