VLAN (Virtual Local Area Network)
What is VLAN?
A Virtual Local Area Network is created by separating a large broadcast domain into multiple smaller broadcast domains. Thus, each VLAN creates its broadcast domain.
For example:
We have a thousand PCs in a network. Now, one PC is sending an ARP packet and that ARP packet will be received by 999 PCs. What will happen? if a thousand PCs send ARP packets, it will affect the network performance. To prevent this, we can physically divide the network into two broadcast networks but we need to buy additional devices. But using VLAN we logically separate the network so it is cost-effective.
Benefits:
- Reduces broadcast traffic
- Improves security
- Cost-effective
Range:
- Registered — VLAN 0 and VLAN 4095
- Default VLAN — VLAN 1
- Normal — VLAN 2 to VLAN 1001
- Cisco default — VLAN 1002 to VLAN 1005
- Extended VLAN — VLAN 1006 to VLAN 4094
Default VLAN:
By default, all the interfaces on a switch belong to VLAN 1.
Native VLAN:
Native VLAN traffics traverse the trunk port without VLAN tags. By default, VLAN 1 is configured as Native VLAN but we can change the native VLAN configuration.
The basic purpose of native VLAN is to serve as a common identifier on opposing ends of a trunk link.
Access Port:
Access Port carries traffic for a particular VLAN. The Access port connects the PC to the switch.
Trunk Port: (802.1Q)
A trunk port carries traffic for all VLAN. The trunk port allows tagged traffic only. The port that connects switches and the uplink is configured as trunk ports.
802.1Q:
When a frame reaches the switch it is added an 802.1Q tag based on the incoming port unless it is a native VLAN.
Sub-interface:
The virtual interface on a router that functions as the default gateway of a particular VLAN.
Switch Virtual Interface (SVI):
The virtual interface on an L3 switch that functions as the default gateway of a particular VLAN.
Intera-VLAN communication: (switching)
Communication between two Hosts that belong to the same VLAN.
Inter-VLAN communication: (Routing)
Communication between two Hosts that belong to different VLANs.