🎯 Learning Outcomes
By the end of this lesson, students should be able to:
Explain the concept and purpose of VLANs in networking.
Create VLANs on Cisco switches using CLI.
Assign switch ports to specific VLANs.
Configure trunking between switches.
Verify VLAN and trunking configuration using Packet Tracer.
📝 Lecture Content
1. Introduction to VLANs
Definition: A Virtual Local Area Network (VLAN) is a logical subdivision of
a switch network that groups devices into the same broadcast domain
regardless of physical location.
Benefits:
Improves network security
Reduces broadcast traffic
Provides better management and segmentation
Example:
VLAN 10 = Faculty
VLAN 20 = Students
VLAN 30 = Admin
2. VLAN Creation on Cisco Switch
Command steps:
Switch> enable
Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name Faculty
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# name Students
Switch(config-vlan)# exit
3. Assigning VLANs to Switch Ports
Command steps:
Switch(config)# interface fastEthernet 0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# exit
Switch(config)# interface fastEthernet 0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 20
Switch(config-if)# exit
4. Configuring Trunk Links
Trunking allows multiple VLANs to pass through a single link between switches.
Command steps:
Switch(config)# interface fastEthernet 0/24
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan all
Switch(config-if)# exit
5. Verifying Configuration
Commands to check:
Switch# show vlan brief
Switch# show interfaces trunk
Switch# ping <IP_address>
Activity: VLAN & Trunking in Packet
Tracer
Instructions
Open Cisco Packet Tracer.
Create the following topology:
2 Switches (Switch0 and Switch1)
4 PCs connected to Switch0
4 PCs connected to Switch1
Connect Switch0 and Switch1 using a crossover cable on
FastEthernet0/24.
Configure VLANs:
VLAN 10 → PCs 1 & 2 (Faculty)
VLAN 20 → PCs 3 & 4 (Students)
Assign VLANs to corresponding ports.
Configure trunk link on FastEthernet0/24 between both switches.
Assign IP addresses to PCs (e.g., VLAN 10: 192.168.10.x, VLAN 20:
192.168.20.x).
Test connectivity:
PC1 should ping PC2 (same VLAN).
PC1 should not ping PC3 (different VLAN).
PC1 on Switch0 should ping PC2 on Switch1 (VLAN traffic across
trunk).