switchport allowed vlan
Use this command to configure VLAN groups on the selected interface. Use the
no form to restore the default.
Syntax
switchport allowed vlan {add vlan-list [tagged | untagged] | remove vlan-
list} no switchport allowed vlan
> add vlan-list - List of VLAN identifiers to add.
> remove vlan-list - List of VLAN identifiers to remove. Separate nonconsecutive
VLAN identifiers with a comma and no spaces; use a hyphen to designate a
range of IDs. Do not enter leading zeros. (Range: 1-4094)
Default Setting
All ports are assigned to VLAN 1 by default.
The default frame type is untagged.
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
You must enter the switchport mode command before the switchport allowed
vlan command can take effect.
Example
The following example shows how to add VLANs 1, 2, 5 and 6 to the allowed list
as tagged VLANs for port 1:
Console(config)#interface ethernet 1/1
Console(config-if)#switchport allowed vlan add 1,2,5,6 tagged
Console(config-if)#
210