How to Configure VLANs on Cisco Switches (Step-by-Step Guide)
Step-by-step Cisco VLAN configuration guide. Learn to create VLANs, assign ports, and verify setup for labs or enterprise networks

Introduction
In today’s enterprise networks, Virtual LANs (VLANs) are essential for improving performance, security, and traffic management. By dividing a single switch into multiple logical networks, VLANs help reduce broadcast domains and isolate traffic for different departments such as Sales, HR, or IT.
We’ll walk step-by-step through VLAN configuration on Cisco switches using CLI commands. Whether you are setting up a lab for CCNA or configuring VLANs in a production environment, this guide will give you everything you need.
Prerequisites / Requirements
Before you begin, make sure you have:
- Cisco switch (physical or in GNS3/EVE-NG/Packet Tracer).
- Console/SSH access to the switch.
- Basic understanding of IP addressing and switching concepts.
Step-by-Step Configuration
Step 1: Access the Switch
Use console or SSH to connect to your switch.
ssh admin@192.168.1.1
Enter privileged EXEC mode:
Switch> enable
Switch#
Step 2: Create VLANs
Create VLANs and assign names:
Switch(config)# vlan 10
Switch(config-vlan)# name SALES
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# name HR
Switch(config-vlan)# exit
Step 3: Assign VLAN to Interfaces
Assign access ports to VLANs:
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
Step 4: Save Configuration
Make sure to save the configuration so it persists after reboot:
Switch# write memory
or
Switch# copy running-config startup-config
Verification
Check VLANs configured:
`Switch# show vlan brief`
Expected output:
VLAN Name Status Ports
1 default active Fa0/3, Fa0/4
10 SALES active Fa0/1
20 HR active Fa0/2
Troubleshooting Tips
- If VLANs don’t appear, check with show running-config.
- Ensure interface is not in trunk mode when assigning access VLAN.
- Always verify cables and connectivity between devices.
Summary
- VLANs logically divide a switch into multiple broadcast domains.
- Configuration involves creating VLANs and assigning them to ports.
- Verification is done with show vlan brief.
That’s it! You’ve successfully created and assigned VLANs on a Cisco switch. 🎉
👉 If you’re preparing for CCNA or managing enterprise networks, VLANs are one of the most fundamental skills you’ll use every day.
💬 Got questions or stuck in configuration? Drop a comment below — or contact Netvorx Pro Pvt Ltd for professional network setup and 24/7 support.


