What is the difference between VLAN and VPN?.


Who is Participating?
whermansConnect With a Mentor Commented:
A VLAN is a virtual way to create and maintain LAN networks on a switch or router.  You can have for instance one switch with 24 ports, in which you define the first 12 to be one LAN VLAN, and the other a DMZ VLAN.  The programming in the switch will make sure that, while you are using just one hardware switch, the switch acts like two independent switch connected to other networks.  A router/switch can "fake" routing and 2 or more separate switches in just one hardware box.

A VPN is a way to connect two networks in a secure way to each other, over an insecure network such as the internet.  On both sides, you set up tunnel "entrances" and data entering the VPN tunnel through one side will be encrypted and encapsulated and sent to the tunnel 'exit' on the other end.
johanvz1Author Commented:
So that does mean if I have a router and I split half the ports for one vlan and the other half for another vlan that it is like 2 completely different networks ie Different subnets and wont be able to access each other?. And what is a DMZ VLAN?.
The Firewall Audit Checklist

Preparing for a firewall audit today is almost impossible.
AlgoSec, together with some of the largest global organizations and auditors, has created a checklist to follow when preparing for your firewall audit. Simplify risk mitigation while staying compliant all of the time!

two completely different networks, which you can configure to connect to each other by routing and policy rules.

DMZ stands for Demilitarized Zone, and is a firewall term.
VLAN belong to the layer2 while VPN belong to the layer3. They have 2 different goals.

VLANs may be defined at the switch level, not router.  The router will be used only for inter-VLAN communication ruels when required.  VLAN is a way to logically group hosts that would need to be on a same physical broadcast domain. That way a computer in accounting dept may be transfered to the ingeniering team within 1 minute without any cabling change.

Subneting with a router is just another way to do the same thing at a different level.  The thing is that VLAN will work faster and give more flexibility.  If you have a router with VLAN capabilities, for each physical interface you may create multiple logical interfaces assigned to a specific VLAN with their own subnet,  IP and mask.

For the VPN, Whermans gave you a good description! In clear VPN has nothing to do with VLANs.
VPN is a DIRECT connect from one system to the other, using the internet, but 1-1 specific computer to computer.  Think of it like a long ethernet cable, two computers use the internet to connect as if they were in the same building, usually for file transfer, etc.

A VLAN is kind of the opposite, it is a way to connect many computers, spread all across the planet, into a "local" area network where they can collaborate on the same file sharing like VPN, but it is across a whole range of computers spread across the globe.

So in terms of connections, the VPN is one-to-one, whereas the VLAN is many to many -- both use the internet.
Sorry, scratchyboy you are wrong about VPN and VLAN

VPN have two modes: "Transport mode" (as described scratchyboy`s post) and "Tunnel mode".  Tunnel mode is used to link two local network (composed of multiple hosts) over internet.  

VLAN, as i said i previous my post work at layer2, then it work on local network ONLY!!  VLAN tagging is applied to the frames (layer2), not to the packets (layer3).  Then VLAN tags are removed before the packet leave the subnet. The packets are encapsulated in a new frame each time it traverse a new subnet.
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.