CLI Reference Guide
816 VLAN Commands
console(config)#interface gigabitethernet 1/0/8
console(config-if-Gi1/0/8)#switchport access vlan 23
switchport general forbidden vlan
Use the switchport general forbidden vlan command in Interface
Configuration mode to forbid adding specific VLANs to a general mode port.
To revert to allowing the addition of specific VLANs to the port, use the
remove parameter of this command.
Syntax
switchport general forbidden vlan {add
vlan-list
| remove
vlan-list
}
•
add
vlan-list
— List of valid VLAN IDs to add to the forbidden list.
Separate nonconsecutive VLAN IDs with a comma and no spaces. Use a
hyphen to designate a range of IDs.
•
remove
vlan-list
— List of valid VLAN IDs to remove from the forbidden
list. Separate nonconsecutive VLAN IDs with a comma and no spaces. Use
a hyphen to designate a range of IDs.
Default Configuration
All VLANs allowed.
Command Mode
Interface Configuration (gigabitethernet, port-channel, tengigabitethernet,
fortygigabitethernet) mode
User Guidelines
This configuration only applies to ports configured in general mode.
Example
The following example forbids adding VLAN numbers 234 through 256 to
port 1/0/8.
console(config)#interface gigabitethernet 1/0/8
console(config-if-Gi1/0/8)#switchport general forbidden vlan add 234-256
2CSNXXX_SWUM200.book Page 816 Tuesday, December 10, 2013 1:22 PM










