Getting Started Guide
Creating a Port-based VLAN
The default virtual local area network (VLAN) (VLAN 1) is part of the system startup configuration and does
not require configuration.
To configure a port-based VLAN, create the VLAN and then add physical interfaces or port channel (LAG)
interfaces to the VLAN.
• Configure a port-based VLAN (if the VLAN-ID is different from the Default VLAN ID) and enter
INTERFACE VLAN mode.
CONFIGURATION mode
interface vlan vlan-id
After you create a VLAN, you must assign interfaces in Layer 2 mode to the VLAN to activate the
VLAN.
To view the configured VLANs, use the show vlan command in EXEC Privilege mode.
Assigning Interfaces to a VLAN
You can only assign interfaces in Layer 2 mode to a VLAN using the tagged and untagged commands.
To place an interface in Layer 2 mode, use the
switchport command.
You can designate Layer 2 interfaces as tagged or untagged. When you place an interface in Layer 2
mode using the switchport command, the interface is automatically designated untagged and placed
in the Default VLAN.
To view which interfaces are tagged or untagged and to view which VLAN the interfaces belong, use the
show vlan command.
To view just the interfaces that are in Layer 2 mode, use the show interfaces switchport command
in EXEC Privilege mode or EXEC mode.
To tag frames leaving an interface in Layer 2 mode, you must assign that interface to a port-based VLAN
to tag it with that VLAN ID.
1. Access the INTERFACE VLAN mode of the VLAN to which you want to assign the interface.
CONFIGURATION mode
interface vlan vlan-id
2. Enable an interface to include the IEEE 802.1Q tag header.
INTERFACE mode
tagged interface
To move untagged interfaces from the Default VLAN to another VLAN, use the untagged command.
3. Access the INTERFACE VLAN mode of the VLAN to which you want to assign the interface.
CONFIGURATION mode
interface vlan vlan-id
4. Configure an interface as untagged. This command is available only in VLAN interfaces.
INTERFACE mode
untagged interface
Getting Started Guide
31










