Configuration Guide

How to Configure a VLAN on a Cisco Switch

To configure a VLAN on a Cisco switch: create the VLAN, name it, then assign access ports to it — three short steps. Here's the exact process with commands and verification.

VLANs logically separate a switch into isolated networks. This guide covers creating one and putting device ports into it. Practise it live in the VLAN lab.

Step 1: Enter global configuration mode

enable
configure terminal
Access privileged EXEC, then global config

Step 2: Create and name the VLAN

vlan 10
name SALES
exit
Creates VLAN 10 with a descriptive name

Step 3: Assign access ports to the VLAN

interface range fa0/1 - 4
switchport mode access
switchport access vlan 10
Puts ports 1-4 into VLAN 10 as access ports

Verification

Run show vlan brief — VLAN 10 (SALES) should list ports Fa0/1–4. Devices in VLAN 10 can now ping each other but are isolated from other VLANs until inter-VLAN routing is configured.

Frequently asked questions

How do I create a VLAN on a Cisco switch?

In global config: vlan 10, then name SALES. That creates and names VLAN 10; you then assign ports to it.

What is the command to assign a port to a VLAN?

In interface config: switchport mode access followed by switchport access vlan 10 assigns that port to VLAN 10.

How do I verify my VLAN configuration?

Run show vlan brief — it lists each VLAN with its name, status and assigned access ports.

Why can't my VLAN devices reach other VLANs?

VLANs are isolated by design — you need a router or Layer 3 switch performing inter-VLAN routing to connect them.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.