VLAN: Configuring VLANs
By default, all ports on a switch are in the VLAN 1. We can verify that by typing the show vlan command from the IOS enable mode of a switch:

In the picture above, you can see that all of the 24 ports of the switch are in the same VLAN, namely VLAN 1.
Two steps are required to create a VLAN and assign a switch port to the VLAN:
1. create a vlan using the vlan NUMBER global mode command
2. assing a port to the VLAN by using two interface subcommands.The first command is the switchport mode access command. This command specifies that the interface is an access interface. The second command is the switchport access vlan NUMBER command. This command assigns the interface to a VLAN.
2. assing a port to the VLAN by using two interface subcommands.The first command is the switchport mode access command. This command specifies that the interface is an access interface. The second command is the switchport access vlan NUMBER command. This command assigns the interface to a VLAN.
Here is an example of assigning the VLAN 2 to the interface:

In the picture above, you can see that the VLAN 2 was created and that Fa0/1 port on the switch was moved to this VLAN. To verify this, you can again use the show vlan command:
