Owner's Manual

Configuring VLANs 603
Configuring a Port in General Mode
Beginning in Privileged EXEC mode, use the following commands to
configure an interface with full 802.1q support and configure the VLAN
membership information for the interface. Except when noted as required
(for example, when configuring MAB, Voice VLAN, or 802.1x), it is
recommended that operators use either trunk or access mode.
Command Purpose
configure Enter global configuration mode.
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 general Configure the interface as a tagged and an untagged layer
2 VLAN interface.
switchport general
allowed vlan
[add|remove]
vlan-list
{tagged|untagged}
Configure the VLAN membership for the port. You can
also use this command to change the egress tagging for
packets without changing the VLAN assignment.
add
vlan-list
— List of VLAN IDs to add. Separate
nonconsecutive VLAN IDs with a comma and no spaces.
Use a hyphen to designate a range of IDs.
(Range:
1–4093)
remove
vlan-list
— List of VLAN IDs to remove. Separate
nonconsecutive VLAN IDs with a comma and no spaces.
Use a hyphen to designate a range of IDs.
tagged
— Sets the port to transmit tagged packets for the
VLANs. If the port is added to a VLAN without specifying
tagged or untagged, the default is untagged.
untagged
— Sets the port to transmit untagged packets
for the VLANs.