Romit Kakadiya
VLAN (Virtual LAN)
Updated: Nov 9, 2022
- VLAN divides one broadcast domain into multiple broadcast domains. You can multiple VLAN based on the requirement. over switch, VLAN traffic carries via trunk links.
- To know about switchport check my blog switchport | CCNA
Why need a VLAN?
- An organization's, there are many departments on the same subnet or network so it can share resources between them. but what happens if one department can connect with other departments. So, the concept is VLAN, it can create a group like that, and client are that connect in the group it can communicate between the group, not a whole network.
- When a switch receives the broadcast frame it can be flooding to other ports on the switch. take scenario given below image.

- In this picture PC, 1 can flooding frame on the switch so it can share on other ports and this frame to receive switch 2 that also flooding frame into all ports so it can cause traffic and more CPU utilization.
Solution:
VLAN can create a broadcast domain for individual VLAN so only within VLAN assign port are communicate with each other.

In this scenario PC 1-4 in IT, PC 2-5 in Civil and PC 3-6 in EC Department. so if PC 1 creates a broadcast frame it can go only PC 4 via Switch 2 in trunk link. Using VLAN reduces CPU utilization and easy troubleshooting.
Native VLAN
When the client or device sends the frame to switch, the switch can tag this frame with VLAN id so other switch or device know that receive frame is correspondent VLAN. If the frame is not tagged that frame is called untagged frame and this frame is passed from native VLAN. this frame is forward into native VLAN port. default VLAN 1 on switch and administrator can change as per requirement.
VLAN Configuration
In this example three departments in the same network. PC 1-4 in VLAN 10, PC 2-5 in VLAN 20 and PC 3-6 in VLAN 30.

default all port in VLAN 1 that show in blow image.

Configure Switch 1:
1. Create VLANs
Switch-1#configure terminal
Switch-1(config)#vlan 10
Switch-1(config-vlan)#name IT
Switch-1(config-vlan)#exit
Switch-1(config)#vlan 20
Switch-1(config-vlan)#name Civil
Switch-1(config-vlan)#exit
Switch-1(config)#vlan 30
Switch-1(config-vlan)#name CSE
Switch-1(config-vlan)#exit
2. Assign trunk port
Switch-1(config)#interface e0/0
Switch-1(config-if)#switchport trunk encapsulation dot1q
Switch-1(config-if)#switchport mode trunk
Switch-1(config-if)#exit
3. Assign access port
Switch-1(config)#interface e0/1
Switch-1(config-if)#switchport mode access
Switch-1(config-if)#switchport access vlan 10
Switch-1(config-if)#exit
Switch-1(config)#interface e0/2
Switch-1(config-if)#switchport mode access
Switch-1(config-if)#switchport access vlan 20
Switch-1(config-if)#exit
Switch-1(config)#interface e0/3
Switch-1(config-if)#switchport mode access
Switch-1(config-if)#switchport access vlan 30
Switch-1(config-if)#exit
Configure Switch 2:
- All Configuration is same as switch 1.
- You can check configuration is apply or not using following command:
check assigning access port
Switch-1#show vlan brief

check assigning trunk port:
Switch-1#show interfaces trunk
