CLI Reference Guide-R07

Table Of Contents
Chapter 20
| VLAN Commands
Configuring VLAN Interfaces
– 483 –
switchport
forbidden vlan
Use this command to prevent a port from dynamically joining a VLAN. Use the no
form of the command to disable all restrictions.
Syntax
switchport forbidden vlan {vlan-list | add vlan-list | remove vlan-list}
no switchport forbidden vlan
vlan-list - Separate nonconsecutive VLAN identifiers with a comma and no
spaces; use a hyphen to designate a range of IDs. (Range: 1-4094).
add vlan-list - List of VLAN identifiers to add to the forbidden list. When the
add option is used, the interface is prevented from being dynamically
added to the specified VLANs.
remove vlan-list - List of VLAN identifiers to remove from the forbidden list.
Default Setting
Disabled
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
If a VLAN on the allowed list for an interface is manually added to the forbidden list for the interface,
the VLAN is automatically removed from the allowed list for that interface.
Example
The following example shows how to add VLANs 300 and 6 00 to the forbidden list
for port 2:
Console(config)#interface ethernet 1/2
Console(config-if)#switchport forbidden vlan add 300,600
Console(config-if)#
switchport
ingress-filtering
This command enables ingress filtering for an interface. Use the no form to restore
the default.
Syntax
[no] switchport ingress-filtering
Default Setting
Enabled
Command Mode
Interface Configuration (Ethernet, Port Channel)