Command:

switchport trunk allowed vlan

Mode:

Switch(config-if)#


Syntax:

switchport trunk allowed vlan {add vlan-list | all | except vlan-list | remove vlan-list}

no switchport trunk allowed vlan


Syntax Description:

add vlan-list

List of VLAN IDs to add. Valid IDs are from 1 to 1001. Separate nonconsecutive VLAN IDs with a comma and no spaces; use a hyphen to designate a range of IDs. Do not enter leading zeroes.

all

Add all VLAN IDs to the list.

except vlan-list

List of exception VLAN IDs VLANs are added except the ones specified. Valid IDs are from 1 to 1001. Separate nonconsecutive VLAN IDs with a comma and no spaces; use a hyphen to designate a range of IDs. Do not enter leading zeroes.

remove vlan-list

List of VLAN IDs to remove. Valid IDs are from 1 to 1001. Separate nonconsecutive VLAN IDs with a comma and no spaces; use a hyphen to designate a range of IDs. Do not enter leading zeroes.

 


Command Description:

Use the switchport trunk allowed vlan interface configuration command to control which VLANs can receive and transmit traffic on the trunk. Use the no form of this command to reset the allowed list to the default value.

When the no switchport trunk allowed vlan form is used, the allowed list is reset to the default list, which includes all VLANs.

In the variable vlan-list, separate nonconsecutive VLAN IDs with a comma; use a hyphen to designate a range of IDs. You cannot remove VLAN 1 or 1002 to 1005 from the list.

A trunk port cannot be a secure port or a monitor port. However, a static-access port can monitor a VLAN on a trunk port. The VLAN monitored is the one associated with the static-access port.


Example:

The following example shows how to add VLANs 1, 2, 5, and 6 to the allowed list:

Switch(config-if)#switchport trunk allowed vlan add 1,2,5,6
You can verify the previous command by entering the show interface interface-id switchport command in privileged EXEC mode.


Misconceptions:

None

Related commands:
switchport mode

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)