VLAN Commands
switchport forbidden vlan
Cisco 220 Series Smart Plus Switches Command Line Interface Reference Guide Release 1.0.0.x
512
41
switchport forbidden vlan
To forbid adding or removing specific VLANs to or from a port, use the switchport
forbidden vlan Interface Configuration mode command.
Syntax
switchport forbidden vlan {add
vlan-list
| remove
vlan-list
}
Parameters
•
add
vlan-list
—Adds a list of VLANs. Separate nonconsecutive VLAN IDs
with a comma and no spaces. Use a hyphen to designate a range of VLAN
IDs.
•
remove
vlan-list
—Removes a list of VLANs. Separate nonconsecutive VLAN
IDs with a comma and no spaces. Use a hyphen to designate a range of
VLAN IDs.
Default Configuration
All VLANs are allowed.
Command Mode
Interface Configuration (Ethernet, port channel) mode
Example
The following example forbids adding VLANs 234 to 256 to gi7:
switchxxxxxx(config)#
interface gi7
switchxxxxxx(config-if)#
switchport mode trunk
switchxxxxxx(config-if)#
switchport forbidden vlan add 234-256
switchport general acceptable-frame-type
To configure the types of packets (tagged or untagged) that are filtered
(discarded) on the interface, use the switchport general acceptable-frame-type
Interface Configuration mode command.
To revert to its default setting, use the no form of this command.