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?
LVL 1
frukeusAsked:
Who is Participating?
 
Aaron StreetInfrastructure ManagerCommented:
the main reson VLANs where introduced is that on a network of more than about 250 to 500 devices (depending how chatty they are) the broadcast traffic gets very high and interfears with the network.

Rember devices are constantly sendign out hello packets (ARP packet each time they start a conversation) these packets hit every device on that VLAN!! in a large falt network of 1500 devices (my old network) the exchange server was reciving about 40 packets a second of broadcast traffic (99.9% of which where not for it)

The idea with a vlan is you breack up this broadcast domain.

Idealy you have devices that dont talk to each other in the same VLAN. so all the client PC's in one vlan and all the servers in a second VLAN. each with a seperae IP Address range.

now not only have you reduced broadcasts becasue there are less devices on each network. but also the PC's being on seperate IP ranges, the Clients will forward packets to there default gate way (this is what happens when the PC works out the ip it is sending to is on a seperate network range)

now the client will send one ARP out first to find out the MAC address of the gateway. but if it is trying to talk to more than one server. it will always forward to the default gate way. so it wont have to send out a ARP packet each time.

It is actuly the subnet that reduces the broadcast domain size. VLANs are jsut a nice way of segmenting them up.

To plan VLAn/SUbneting correctly. First decided on the ip address ranges and hwo you want them to be. Ie. range for servers, range for clients, range for Printers, range for managment, range for backup data.. etc ...etc...

then once you have these sorted out. use VLAN's to seperate the subnets in to seperate physical networks. I just think of VLANs as a way to create seperate switchs. a way to achive physical seperation of networks with out having to purchase extra switches.
0
 
JFrederick29Commented:
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.
0
 
Don JohnstonInstructorCommented:
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.
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
frukeusAuthor Commented:
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?


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


0
 
Aaron StreetInfrastructure ManagerCommented:
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.
0
 
Aaron StreetInfrastructure ManagerCommented:
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..
0
 
frukeusAuthor Commented:
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
0
 
frukeusAuthor Commented:
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).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.