Link to home
Start Free TrialLog in
Avatar of frukeus
frukeusFlag for Singapore

asked on

VLAN vs SUBNET: Can you create a VLAN that spans IPs from multiple subnet

I am confused by VLANs as I was often told that a VLAN must be a single Subnet.
ie.
VLAN10 is 192.168.10.0/24
VLAN20 is 192.168.20.0/24

But when I read the definition of VLAN, it is merely a broadcast domain to contain multicast traffic. Does that mean I can have the following:
User A from Accounts has workstation on 192.168.10.1
Accounts has a printer on 192.168.20.1
I want to create a VLAN to contain Accounts traffic
VLAN Acct is tagged on the ports of the switch which goes to 192.168.10.1 and 192.168.20.1?
Avatar of JFrederick29
JFrederick29
Flag of United States of America image

You need a router or routing capable switch to route between the subnets/VLAN's.  Without routing, the two VLAN's/subnets can't communicate.
Avatar of Don Johnston
A VLAN is a broadcast domain is a network. So basically, you have three terms to describe the same thing.

If you want devices to have IP addresses on different networks, then they will be on different broadcast domains and different VLANs.

Routers are used to connect different networks/broadcast domains/VLANs.
Avatar of frukeus

ASKER

ok, assuming I have my router or layer 3 switch in place - the subnets can communicate.
Am I correct in my design of the VLAN - minimising broadcast traffic by grouping users with their often used machines?


Avatar of frukeus

ASKER

if VLAN is just a subnet is a broadcast domain, why do we need the 3 different terminologies?
The same reason a car is an automobile is a vehicle is a method of transportation <8-]
Well said JFred. :-)


a vlan and a subnet are very different things!!

VLAN is a lay two seperation of a switch in to seperate physical networks (in effect creating two or more seperate switched networks from a single switch)

A Subnet is seperate ip address ranges. now you can if you want run two seperate subnets on a single vlan. there are very limited reasons to do this. but there is no reson it cant be done.

for example plug a router in to port 1 and a second router in to port 2. give one the ipaddress 192.168.0.1/24 and the other 192.168.1.1/24 and then you could have some devices running on the 192.168.0.X range and some on the 192.168.1.X range. both on the same VLAN but still nto able to communicate with each other as they are on seperate ip ranges (subnets)

You can also with a bit of fiddling with routers have an ip range split across VLAN's (much more compculated)

however the two are different things.. VLAn is seperation at layer 2 of the OSI, Subnets is seperation at layer 3. Now in most cases you use them togther,, but that does not mean they are the same thing.

At the end of the day there is one important thing to rember. Devices on seperate subnets (ip address ranges) need a router to communicate (or at least some kind of routing protocol)!!!!

 Devices on seperate Vlans do not nesseraly need a router to communicate as long as they are on the same ip address range. however it is very unusualy in a production envirment to span subnets across vlans.
Oh by the way running mutiply ip ranges in teh same VLAN is not recomended!!! just that it can be done if you wanted to..
Avatar of frukeus

ASKER

can you give some real life examples of how VLAN is deployed in a meaningful manner, say in a network size of 100 users? thx
ASKER CERTIFIED SOLUTION
Avatar of Aaron Street
Aaron Street
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of frukeus

ASKER

found a good description-

Why not just subnet my network?

A common question is why not just subnet the network instead of using VLANs? Each VLAN should be in its own subnet. The benefit that a VLAN provides over a subnetted network is that devices in different physical locations, not going back to the same router, can be on the same network. The limitation of subnetting a network with a router is that all devices on that subnet must be connected to the same switch and that switch must be connected to a port on the router.

With a VLAN, one device can be connected to one switch, another device can be connected to another switch, and those devices can still be on the same VLAN (broadcast domain).