To understand the concept of VLAN, first you have to understand what is LAN? And what is broadcast domain. Understanding of these two is very important to learn the VLAN concept.
Let’s begin with LAN, LAN stands for Local Area Network. A LAN includes all the user devices in one location and all are connected via a switch.
Now, move to the broadcast domain, by default all LAN devices are in a broadcast domain. It means when a device will send a broadcast packet, a copy of that packet will go to every device. So, from this point of view, you can understand LAN and broadcast domain are similar concepts.
What is VLAN?
VLAN stands for virtual local area network. VLAN divides the network at layer 2. It means physically all devices are connected to each other. By seeing physical network, no one can tell how many VLANs are there? By creating VLAN, we divide the single broadcast domain into multiple broadcast domains. Number of VLANs depends on requirements and configuration.
Why we need VLAN?
To reduce broadcast: Let’s understand this with an example.
Let’s suppose above network is a company network that has 3 different departments named as sales, marketing and accounts. You can see all devices are connected in a single LAN network, so whenever a packet will come at switch interface, it sends the frame to all interfaces except one interface at which it receives the frame.
Same company network after creating VLAN:
So, this way you can see broadcast is reduced.
There are 2 more benefits, less broadcast, less bandwidth consumption; it means network performance will improved.
This is also good from security point of view, only same department people will have access of data, so others can’t misuse the data.
VLAN Range: 1-4094
Standard VLANs: 1-1005, (vlan 1, 1002-1005 are reserved vlan, you can’t delete them)
Extended VLANs: 1006-4094
By default, all the ports present in VLAN 1. Below, I shared a screenshot, you can see all ports are in default vlan (vlan 1).