The IEEE 802.1Q specification establishes a standard method for tagging Ethernet frames with VLAN membership information.
The header has 4 parts:
Tag Protocol Identifier (TPID) – 16-bit
The TPID includes an Ethernet Type value that is used to identify the frame as a tagged frame and to select the correct tag decoding functions
This is set to a value of 0x8100 in order to identify the frame as an IEEE 802.1Q-tagged frame
Priority (802.1p): – 3 bit
This value refers to IEEE 802.1p priority. The field is used by 802.1Q to implement Layer 2 quality of service (QoS). It indicates the frame priority level. Values are from 0 (best effort) to 7 (highest)
Canonical Format Indicator (CFI) – 1 bit
This bit is used for compatibility purposes between Ethernet and Token Ring. 0 – Ethernet, 1 – Token Ring
VLAN Identifier (VID) – 12 bit
The VID field is used to distinguish between VLANs on the link. It has 12 bits allowing identification of 4096 (2^12) VLANs. It can be any number between 1 and 4,095 (zero has been reserved to mean that the frame is not a member of any VLAN).