User Guide
152
Configuring 802.1Q VLAN
Configuration Example
Switch_1(config)#interface fastEthernet 1/0/3
Switch_1(config-if)#switchport general allowed vlan 20 untagged
Switch_1(config-if)#exit
Switch_1(config)#interface fastEthernet 1/0/4
Switch_1(config-if)#switchport general allowed vlan 10 tagged
Switch_1(config-if)#switchport general allowed vlan 20 tagged
Switch_1(config-if)#exit
3) Set the PVID of port 1/0/2 as 10, and set the PVID of port 1/0/3 as 20.
Switch_1(config)#interface fastEthernet 1/0/2
Switch_1(config-if)#switchport pvid 10
Switch_1(config-if)#exit
Switch_1(config)#interface fastEthernet 1/0/3
Switch_1(config-if)#switchport pvid 20
Switch_1(config-if)#end
Switch_1#copy running-config startup-config
Verify the Configurations
Verify the VLAN configuration:
Switch_1#show vlan
VLAN Name Status Ports
----- -------------------- --------- ----------------------------------------
1 System-VLAN active Fa1/0/1, Fa1/0/2, Fa1/0/3, Fa1/0/4,
Fa1/0/5, Fa1/0/6, Fa1/0/7, Fa1/0/8,
Fa1/0/9, Fa1/0/10, Fa1/0/11, Fa1/0/12,
Fa1/0/13, Fa1/0/14, Fa1/0/15, Fa1/0/16,
Fa1/0/17, Fa1/0/18, Fa1/0/19, Fa1/0/20,
Fa1/0/21, Fa1/0/22, Fa1/0/23, Fa1/0/24,
Gi1/0/25, Gi1/0/26, Gi1/0/27, Gi1/0/28
10 Department-A active Fa1/0/2, Fa1/0/4
20 Department-B active Fa1/0/3, Fa1/0/4
Downloaded from