Concept Guide
VLANs and Port Tagging
To add an interface to a VLAN, the interface must be in Layer 2 mode. After you place an interface in Layer 2 mode, the interface is
automatically placed in the Default VLAN.
supports IEEE 802.1Q tagging at the interface level to lter trac. When you enable tagging, a tag header is added to the frame after the
destination and source MAC addresses. That information is preserved as the frame moves through the network. The following example
shows the structure of a frame with a tag header. The VLAN ID is inserted in the tag header.
Figure 126. Tagged Frame Format
The tag header contains some key information that uses:
• The VLAN protocol identier identies the frame as tagged according to the IEEE 802.1Q specications (2 bytes).
• Tag control information (TCI) includes the VLAN ID (2 bytes total). The VLAN ID can have 4,096 values, but two are reserved.
NOTE: The insertion of the tag header into the Ethernet frame increases the size of the frame to more than the 1,518 bytes as
specied in the IEEE 802.3 standard. Some devices that are not compliant with IEEE 802.3 may not support the larger frame
size.
Information contained in the tag header allows the system to prioritize trac and to forward information to ports associated with a specic
VLAN ID. Tagged interfaces can belong to multiple VLANs, while untagged interfaces can belong only to one VLAN.
Conguration Task List
This section contains the following VLAN conguration tasks.
• Creating a Port-Based VLAN (mandatory)
• Assigning Interfaces to a VLAN (optional)
• Assigning an IP Address to a VLAN (optional)
• Enabling Null VLAN as the Default VLAN
Creating a Port-Based VLAN
To congure a port-based VLAN, create the VLAN and then add physical interfaces or port channel (LAG) interfaces to the VLAN.
NOTE
: The Default VLAN (VLAN 1) is part of the system startup conguration and does not require conguration.
A VLAN is active only if the VLAN contains interfaces and those interfaces are operationally up. As shown in the following example, VLAN 1
is inactive because it does not contain any interfaces. The other VLANs contain enabled interfaces and are active.
NOTE
: In a VLAN, the shutdown command stops Layer 3 (routed) trac only. Layer 2 trac continues to pass through the
VLAN. If the VLAN is not a routed VLAN (that is, congured with an IP address), the shutdown command has no aect on
VLAN trac.
When you delete a VLAN (using the no interface vlan vlan-id command), any interfaces assigned to that VLAN are assigned to
the Default VLAN as untagged interfaces.
To create a port-based VLAN, use the following command.
Virtual LANs (VLANs)
943