Question What is the difference between subnets and vlan ip addresses?

Jan 8, 2019
5
0
10
A subnet would be like

Accounts Department
Network: 192.168.1.0/26
Subnet mask: 255.255.255.192
Usable IP: 192.168.1.1-192.168.1.62
Broadcast address: 192.168.1.63


Sales Department
Network address: 192.168.1.64/27
Subnet mask:255.255.255.224
Usable IP:192.168.65.-192.168.1.94
Broadcast address:192.168.1.95




But I have seen people describe VLANs like

Accounts Department
VLAN 2: 192.168.20.1

Sales Department
VLAN 3: 192.168.40.2


What is the difference between subnets and vlan addresses?
 
They are sorta related but not directly.

A subnet could for example be assigned to a server for bunch of different web servers running on the physical box.

A vlan is best though of as a switch. The machines on the vlan must have a subnet to function.

So vlans need subnets but subnets can be used for more than just vlans.
 

AtkinsFriendly

Reputable
May 26, 2015
26
1
4,530
This might be difficult to explain without getting technical..

So your description of a subnet is accurate. Everything in that 'Accounts Department' broadcast domain is a subnet. Normally, a VLAN would consist of that entire broadcast network BUT, you can actually have multiple subnets within the same VLAN.

For instance, VLAN1 can have 192.168.1.0/25 subnet AND 192.168.1.128/25 subnet. But two subnets would not be part of the same broadcast domain and would need to be routed to do so.

VLANs also allow traffic to be separated via tagging so they can span across multiple devices. For instance, lets say you have a router connecting two switches in two different buildings, you have a few ports for VLAN2 on switch 1 and more ports of VLAN2 on switch 2. Setup correctly, they will all be part of the same broadcast domain even though they are on different switches

Hope this helps!
 
What is the difference between subnets and vlan addresses?

VLANs are not addresses. As others have said it is hard to explain without getting technical. VLAN's work at LAYER2 of the OSI model and Subnets work at Layer3 of the OSI model. Layer 2 is what your basic switch works at and Layer 3 is where your basic router works at. Layer 2 is where your MAC address is and Layer 3 is where your IP address is.
Ok so yea its technical. Its best to think of VLANs like this. Say you have two different LAN's at your house. Computer A connected to Switch A connected to the internet. Computer B connected to switch B connected to the internet. So two LAN's, A and B, physically separated from each other and cannot talk to each other. Now what if you could do the same kind of separation, but virtually, or VLAN. So you could use the same switch and cables for both LAN's but have them isolated from each other. That is what VLAN's do.