
17-47
17.1.27 switchport access vlan
Command:
switchport access vlan <
vlan-id>
no
switchport access vlan
Function:
Add the current Access port to the specified VLAN. The “
no
switchport access vlan
” command deletes the current
port from the specified VLAN, and the port will be partitioned to VLAN1.
Parameter:
<
vlan-id>
is the VID for the VLAN to be added the current port, valid range is 1 to 4094.
Command mode:
Port Mode.
Default:
All ports belong to VLAN1 by default.
Usage Guide:
Only ports in Access mode can join specified VLANs, and an Access port can only join one VLAN at a time.
Example:
Add some Access port to VLAN100.
Switch(config)#interface ethernet 1/8
Switch(Config-If-Ethernet1/8)#switchport mode access
Switch(Config-If-Ethernet1/8)#switchport access vlan 100
Switch(Config-If-Ethernet1/8)#exit
17.1.28 switchport forbidden vlan
Command:
switchport forbidden vlan {WORD | all | add WORD | except WORD | remove WORD}
no switchport forbidden vlan