All port on switch are in the VLAN 1, By default. We can verify that by entering the show vlan command on command line interface of a switch:
In the above example,
you see that all of 24 ports of switch are in same VLAN, namely VLAN 1.
There are two steps
are required for creating a VLAN and assign a switch ports to VLAN:
1. Create vlan using
the “vlan NUMBER” on global mode command
2. Assign a port to VLAN
by using two interface subcommand. The first commands is the switch
port mode access command. This command specify that interface is
access interface. And The second command is the switchport access vlan
NUMBER commands. This command assign to the port to a VLAN.
Below is an example
of assign the VLAN 2 to port:
The first command (vlan
2) create the VLAN 2. We have enter Fa0/1 sub interface mode and configure
the interface as access interfaces that belong to VLAN 2. To verify, we can use
the show vlan command:
0 Comments