switchport private-vlan trunk allowed vlan

To configure the allowed VLANs for the private trunk interface, use the switchport private-vlan trunk allowed vlan command. To remove the allowed VLANs, sue the no form of this command.

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

no switchport private-vlan trunk allowed vlan vlan-list

Syntax Description

vlan-list
VLAN IDs of the allowed VLANs when the interface is in private-vlan trunking mode. The range is from 1 to 4094, except for the VLANs reserved for internal use.
Use a hyphen (-) to separate the beginning and ending IDs of a range of VLAN IDs; for example, 70-100.
Use a comma (,) to separate individual VLAN IDs and ranges of VLAN IDs; for example, 20,70-100,142.
add
Specifies the VLANs to be added to the current list.
except
Specifies all VLANs to be added to the current list, except the specified VLANs.
remove
Specifies the VLANs to be removed from the current list.
all
Specifies all VLANs to be added to the current list.
none
Specifies that no VLANs be added to the current list.

Command Default

Allows only associated VLANs on the private VLAN trunk interface.

Command Modes

Interface configuration mode

Command History

Release
Modification
4.0(0)N1(1a)
This command was introduced.

Usage Guidelines

The primary VLANs do not need to be explicitly added to the allowed VLAN list. They are added automatically once there is a mapping between primary and secondary VLANs.

Examples

This example shows how to add VLANs to the list of allowed VLANs on an Ethernet private VLAN trunk port:

switch(config)# interface ethernet 1/3
switch(config-if)# switchport private-vlan trunk allowed vlan 15-20
switch(config-if)#
 

Related Commands

Command
Description
show interface switchport
Displays information on all interfaces configured as switch ports.
switchport mode private-vlan trunk
Configures the port as a secondary trunk port for a private VLAN.
show vlan private-vlan
Displays the status of the private VLAN.