Hello
everyone!
Today, I will continue to write about the basic principle of VLAN technology. In this article, I will explain the VLAN frame format.
In the next figure, we can see a tagged Ethernet frame.

Fig. 1. Tagged ethernet frame
The ethernet frame can be untagged (standard ethernet frame) and tagged frame. The difference between these frames is field 802.1Q TAG. The untagged ethernet frame is a frame without a TAG field. Now, I will explain all fields in the tagged frame.
The first two fields are DMAC and SMAC – destination and source MAC addresses. Each of these fields is 6 bytes. The next field is TAG (4 bytes) and after this field, there is Length/Type(2 bytes), Data (46 – 1500 bytes), and FCS (4 bytes).
The fourth field, Length/Type indicates a length and type of frame. If the length > 1500, it can be IP packet (0x0800), ARP request/response packet (0x0806) or RARP request/response packet (0x0835), but if the length < 1500 then it is a data frame.
Data field is a field for specific data. It has min 46 bytes and a max of 1500 bytes.
And the last field is FCS. FCS is an abbreviation from Frame Check Sequence. It checks for errors.
The field TAG is the 4-byte 802.1Q tag header. It is composed of TPID (2 bytes) and TCI (2 bytes).
TPID is an abbreviation from Tag Protocol Identifier. It has always a fixed value of 0x8100. TPID indicates that it is a frame with an IEEE 802.1Q tag.
TCI is an abbreviation from Tag Control Information, and its function is to control information about frames. It consists of three elements: PRI, CFI, and VLAN ID.
PRI or Priority indicates the frame priority. It has 3 bits. There are 8 priorities, from 0 (the lowest priority) to 7 (the high priority).
CFI is an abbreviation from Canonical Format Indicator. There are 2 formats – standard for CFI=0 and non-standard for CFI=1.
VLAN ID or VLAN Identified indicates the VLAN ID. This field is 12-bites. VLAN ID has ranged from 0 to 4095, max is 4096 VLAN IDs. But, we can not use 0 and 4095, and actually, the range is from 1 to 4094.
Continued in the next article >> Basic principles of VLAN technology (4)
Thank you!
