switchport trunk allowed

Adds or removes VLANs on a Layer 2 interface in trunk mode.

Syntax

switchport trunk allowed { vlan } { add vlan_id | all | except vlan_id | none | remove vlan_id }

Parameters

add vlan_id
Adds a VLAN to transmit and receive through the Layer 2 interface. The VLAN can be an 802.1Q VLAN.
all
Allows only 802.1Q VLANs to transmit and receive through the Layer 2 interface. This keyword does not apply to classified or transport VLANs.
except vlan_id
Allows only 802.1Q VLANs except the specified VLAN ID to transmit and receive through the Layer 2 interface.
none
Allows only 802.1Q VLANs to transmit and receive through the Layer 2 interface. This keyword does not apply to service or transport VFs.
remove vlan_id
Removes a VLAN that transmits and receives through the Layer 2 interface.

Modes

Interface subtype configuration mode

Usage Guidelines

Examples

To add the tagged VLAN 100 to a specific Ethernet interface:

device# configure terminal
switch(config)# interface ethernet 0/9 
switch(conf-if-eth-0/9)# switchport trunk allowed vlan add 100 

To remove the tagged VLAN 100 from the interface:

device# configure terminal
switch(config)# interface ethernet 0/9 
switch(conf-if-eth-0/9)# switchport trunk allowed vlan remove 100