Basic Cisco Switch VLAN Configuration


My notes on VLAN configuration on Cisco switches.

Creating VLANs on a Cisco Switch


Commands used to create two VLANs, name them, and assign ports to these VLANs:

First, enter device configuration mode.

SW02>en
SW02#conf t

Let’s create two VLANs named VLAN 5 and 10.

SW02(config)#vlan 5
SW02(config-vlan)#vlan 10

Now, let’s assign names to the VLANs we’ve created.

SW02(config)#vlan 5
SW02(config-vlan)#name ACCOUNTING
SW02(config-vlan)#vlan 10
SW02(config-vlan)#name HR

Let’s check the VLANs we’ve created.

SW02(config)#do sh vlan br
VLAN Name Status Ports
5 ACCOUNTING active
10 HR active

Assigning Ports to VLANs – Port 5 to VLAN 5 (ACCOUNTING) and Port 10 to VLAN 10 (HR).

SW02(config)#interface fastEthernet 0/5
SW02(config-if)#switchport mode access
SW02(config-if)#switchport access vlan 5
SW02(config)#interface fastEthernet 0/10
SW02(config-if)#switchport mode access
SW02(config-if)#switchport access vlan 10

You can also view VLANs based on their IDs and names.

To view by ID:

SW02#sh vlan id 5

VLAN Name Status Ports

—- ——————————– ——— ——————————-

5 MUHASEBE active Fa0/5

To view by name:

SW02#sh vlan name MUHASEBE

VLAN Name Status Ports

—- ——————————– ——— ——————————-

5 MUHASEBE active Fa0/5

See also  What is the SNMP protocol?

Leave a Comment