Configure VLANs
By default, all ports on a Cisco switch are assigned to the VLAN 1. VLAN 1 is the native VLAN of all Cisco switches and it can not be changed, deleted, or renamed. To verify that indeed all ports on a switch are in the VLAN 1 by default, you can use the show vlan command:
In the picture above you can see that all of the 24 ports on the switch are in the VLAN 1.
It’s really easy to create a VLAN on a Cisco switch. Simply use the vlan ID command from the global configuration mode. You can also optionally use the name VLAN_NAME command from the VLAN submode to name your VLAN:
After you’ve created a new VLAN, you can configure a port to belong to that VLAN with the switchport access vlan ID interface submode command. It is also recommended to configure the port as an access (non-trunk) port using the switchport mode access command:
In the picture above you can see that the Fa0/5 port on SW1 was configured as an access port and assigned to VLAN 2. To verify this, you can use the show vlan command again: