#show vlan brief
^Shows VLANs and which ports they are configured on
VLAN Name Status Ports
1 default active Gi0/0, Gi0/1, Gi0/2...
#interface range g1/0 - 3
^ Config multiple interfaces simultaneously: g1/0, g1/1, g1/2, and g1/3
(config-if-range)#switchport mode access
^ Config interfaces in access mode
as opposed to trunk mode
(config-if-range)#switchport access vlan 10
% Access VLAN does not exist. Creating vlan 10
^ Assign interfaces to vlan 10
Notice that vlan 10 did not exist so it had to create vlan 10
(config-if-range)#interface range g2/0 - 2
(config-if-range)#switchport mode access
(config-if-range)#switchport access vlan 20
% Access VLAN does not exist. Creating vlan 20
#Vlan 30
^ If you need to create a vlan that did not get auto-created by previous commands
(config)#vlan 10
(config-vlan)#name Engineering
(config-vlan)#vlan 20
(config-vlan)#name HR
^ Assign names to VLANs
If VLAN did not exist, it would first create VLAN
(config)#int range Fa3/1, Fa4/1
(config-if-range)#switchport mode access
(config-if-range)#switchport access vlan 10
(config-if-range)#int range Fa5/1, Fa6/1
(config-if-range)#switchport mode access
(config-if-range)#switchport access vlan 20
(config-if-range)#exit
(config)#exit
SW1#show int status
Port Name Status Vlan Duplex Speed Type
Gig0/1 connected 10 auto auto 10/100BaseTX
Gig1/1 connected 20 auto auto 10/100BaseTX
Gig2/1 connected 30 auto auto 10/100BaseTX
Fa3/1 connected 10 auto auto 10/100BaseTX
Fa4/1 connected 10 auto auto 10/100BaseTX
[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]