
2
VLAN fundamentals
To enable a network device to identify frames of different VLANs, a VLAN tag field is inserted into the
data link layer encapsulation.
The format of VLAN-tagged frames is defined in IEEE 802.1Q issued by the Institute of Electrical and
Electronics Engineers (IEEE) in 1999.
In the header of a traditional Ethernet data frame, the field following the destination MAC address and
the source MAC address is the Type field, which indicates the upper layer protocol type.
illustrates the format of a traditional Ethernet frame, where DA stands for destination MAC address, SA
stands for source MAC address, and Type refers to the upper layer protocol type of the frame.
Figure 2
The format of a traditional Ethernet frame
IEEE 802.1Q defines a four-byte VLAN Tag between the DA&SA field and the Type field to carry
VLAN-related information, as shown in
Figure 3
The position and the format of VLAN tag
A VLAN tag comprises four fields: the tag protocol identifier (TPID) field, the Priority field, the canonical
format indicator (CFI) field, and the VLAN ID field.
•
The 16-bit TPID field with a value of 0x8100 indicates that the frame is VLAN-tagged.
•
The Priority field, three bits in length, indicates the 802.1p priority of a packet. For more information
about packet priority, see
ACL and QoS Configuration Guide
.
•
The CFI field, one bit in length, specifies whether or not the MAC addresses are encapsulated in
standard format when packets are transmitted across different medium. With the field set to 0, MAC
addresses are encapsulated in standard format; with the field set to 1, MAC addresses are
encapsulated in non-standard format. The filed is 0 by default.
•
The VLAN ID field, 12 bits in length and with its value ranging from 0 to 4095, identifies the ID of
the VLAN a packet belongs to. As VLAN IDs of 0 and 4095 are reserved by the protocol, the value
of this field actually ranges from 1 to 4094.
A network device determines the VLAN to which a packet belongs by the VLAN ID field the packet
carries. The VLAN tag determines the way a packet is processed. For more information, see “
.”