Configuring VLANS on Cisco

This is done from the Configure Terminal Mode. Creating a VLAN Specify the VLAN number (ID) and optionally give it a descriptive name:

Switch(config)# vlan 10
Switch(config-vlan)# name Engineering
Switch(config-vlan)# exit

Setting a Port as an access port:

Switch(config)# interface FastEthernet 0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# exit

Setting a Port as a trunk port:

Switch(config)# interface GigabitEthernet 0/1
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk

//Only if you want to limit the allowd vlans.

Switch(config-if)# switchport trunk allowed vlan 10,20,30