ranging from 2 to 4094. The switch creates VLAN1 under the default circumstance and VLAN1 cannot
be deleted.
Application Example
Networking Requirement
There are two users, user 1 and user 2. These two users need to be in different VLAN because the
network function and environment they use are different. User 1 belongs to VLAN2, connecting to switch
port G1/1 (Gigabit Ethernet 1/1), user 2 belongs to VLAN 3, connecting to switch port G1/2 (Gigabit
Ethernet 1/2).
Figure 4-2
Config Steps
The switch config is shown as follows.
Step 1
Create VLAN
SWITCH #configure terminal
SWITCH (config)#vlan 2
SWITCH (config-vlan)# exit
SWITCH (config)#vlan 3
SWITCH (config-vlan)# exit
Step 2
Distribute ports into the VLAN
SWITCH (config)# interface GigabitEthernet 1/1
SWITCH (config-if)# switchport access vlan 2
SWITCH (config-if)# exit
SWITCH (config)# interface GigabitEthernet 1/2
SWITCH (config-if)# switchport access vlan 3
SWITCH (config-if)# exit