1255
Cisco Nexus 5500 Series NX-OS Layer 2 Interfaces Command Reference
OL-27880-02
Chapter S Commands
switchport trunk allowed vlan
switchport trunk allowed vlan
To configure the allowed VLANs for a virtual Ethernet interface, use the
switchport trunk allowed vlan
command. To remove the configuration, use the
no
form of this command.
switchport trunk allowed vlan
{{
add
|
except
|
remove
}
vlan_list
|
all
|
none
}
no switchport trunk allowed vlan
Syntax Description
Command Default
None
Command Modes
Interface configuration mode
Virtual Ethernet interface configuration mode
Command History
Usage Guidelines
This command does not require a license.
Examples
This example shows how to add VLANs to the list of allowed VLANs on a virtual Ethernet interface
trunk port:
switch#
configure terminal
switch(config)#
interface vethernet 1
switch(config-if)#
switchport trunk allowed vlan 5-15
switch(config-if)#
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.
vlan_list
VLAN IDs of the allowed VLANs when the interface is in 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.
all
Specifies all VLANs to be added to the current list.
none
Specifies that no VLANs be added to the current list.
Release
Modification
5.2(1)N1(1)
This command was introduced.