Whats is Virtual LAN (VLAN)?
A virtual LAN is a logical local area network that shares the same network devices with other networks. The VLAN stands for V-Virtual, L-Local, A-Area, N-Network. A virtual network is a logically isolated network. With the VLAN, even computers on the same physical networks can behave as they are on a totally separate physical network. In this tutorial, we will learn what is VLAN, its advantages, inter VLAN routing, and how we can set up VLANs.
VLAN and OSI model:
What is Virtual LAN (VLAN):
Before Virtual LAN functionality, each logically separated network has to have all separate sets of hardware e.g switch, hub, etc. With the VLAN feature, there could be multiple LANs over the same set of hardware. For example, there is a 6 ports switch in an office. There can be a LAN of a maximum of 6 computers. What if the office network admin wants to set up two separate LANs each has only three computers?
If no VLAN the office admin needs to buy another switch. But thanks to VLAN support in network switches, where each port on the switch a be made an ID for LAN, called VLAN Id. In our case, the port 1 to 3 will be given a VLAN ID 1 and Port 4 to 6 will be given VLAN ID 2.
What are the Advantages of the VLAN?
Is VLAN always good? Looks yes, but there are scenarios where its better to buy hardware rather than go for VLAN enabled. One example, if the LAN computers are connected with the HUB. HUB does not have support for VLAN, but much cheaper than a switch. To create another smaller LAN buying a hub is a better option than buying a VLAN router. But yes, if LAN already using a switch, then VLAN is good.
Despite some limitations the VLAN brigs many advantages for a network. We are listing a few here advantages of having VLAN.
Improve Network Performance by reducing broadcast– The ports in a switch of one VLAN can not communicate with the machines on another VLAN ports. This brings a reduction in the broadcast requests while sending a packet to the destination. The switch sends broadcast requests to the ports in the same VLAN as the receiver port. Due to low traffic, switch performance increases which in turn increases the performance of the network.
Security – VLAN is a separation of networks over the same hardware. There could be a separate VLAN for each department in an organization. For example the HR department nothing to do with the finance department, so both should be isolated. So employees in one department can not access any machine from another department.
Cost Reduction – VLAN reduces the cost of additional hardware (e.g Router) when there are two teams of the same department that need to connect are located at a distance (of multiple floors). Without VLAN, the switch will connect to the router. then the only router can separate the network traffic. With the VLAN, two switches can connect to each other using a trunk port on the switches. A trunk port carries the traffic for all VLANs. Two trunk ports connects to each other as a point to point network topology.
Easy Management – The VLAN allows us to change the machine from one department to another department, just by changing the VLAN TAG only. Else this could involve total new configuration.
Inter Vlan Routing:
Till now we have seen that one VLAN machine can not access another VLAN machine. What if there is a need that a person in the finance department needs to have data present on the HR department machine? This is possible by configuring a router along with a switch or using a layer three managed switch. First, the request will go to the router, then souter will again send the request to the destination machine on another VLAN.