Users Guide

Layer 2 Switching Commands 884
switchport trunk
Use the switchport trunk command in Interface Configuration mode to
configure VLAN membership for a trunk port or to set the native VLAN for
an interface in Trunk Mode.
Syntax
switchport trunk {allowed vlan vlan–list | native vlan vlan–id}
no switchport trunk { allowed | native } vlan
vlan–list
—Set the list of allowed VLANs that can receive and send traffic
on this interface in tagged format when in trunking mode. The default is
all. The vlan–list format is as follows:
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 defined list of VLANs to those currently set instead of
replacing the list.
remove removes the defined list of VLANs from those currently set
instead of replacing the list. Valid IDs are from 1 to 4093; extended-
range VLAN IDs of the form X-Y or X,Y,Z are valid in this command.
except lists the VLANs that should be calculated by inverting the
defined list of VLANs. (VLANs are added except the ones specified.)
vlan-atom is 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.
valid–id—A valid VLAN id in the range 1–4093. This is the native VLAN
for the trunk port and will accept and send traffic on this VLAN in
untagged format.
Default Configuration
A trunk port is a member of all VLANs by default.