Owner's Manual

Configuring VLANs 601
interface
interface
Enter interface configuration mode for the specified
interface. The
interface
variable includes the interface type
and number, for example gigabitethernet 1/0/3.
You can also specify a range of interfaces with the interface
range command, for example, interface range
gigabitethernet 1/0/8-12 configures interfaces 8, 9, 10, 11,
and 12.
switchport mode trunk Configure the interface as a tagged layer 2 VLAN interface.
switchport trunk
{allowed vlan
vlan-
list
|native vlan
vlan-id
}
Set the list of allowed VLANs that can receive and send
traffic on this interface in tagged format when in trunking
mode.
allowed
vlan-list
— Set the list of allowed VLANs that
can receive and send traffic on this interface in tagged
format when in trunking mode. Separate non-consecutive
VLAN IDs with a comma and no spaces. Use a hyphen to
designate a range of IDs.
The
vlan-list
format is
all
| [
add
|
remove
|
except
]
vlan-
atom
[
vlan-atom
...] where:
all
—Specifies all VLANs from 1 to 4093. This keyword
is not allowed on commands that do not permit all
VLANs in the list to be set at the same time.
add
—Adds the list of VLANs to the allowed set.
remove
—Removes the list of VLANs from the allowed
set. Removing the native VLAN from a trunk port
forces the port to allow tagged packets only.
except
—Allows all VLANs other than those in the list.
vlan-atom
—Either a single VLAN number from 1 to
4093 or a continuous range of VLANs described by two
VLAN numbers, the lesser one first, separated by a
hyphen.
native
vlan-id
— The untagged VLAN. Untagged packets
received on this interface are switched in the native
VLAN. Transmitted packets in this VLAN are sent
untagged.
CTRL + Z Exit to Privileged EXEC mode.
Command Purpose