5 VLAN
23
5.3 802.1Q VLAN
VLAN tags in the packets are necessary for the switch to identify packets of different VLANs.
The switch works at Layer 2 and it can identify the data link layer encapsulation of the packet
only, so you can add the VLAN tag field into only the data link layer encapsulation if
necessary.
In 1999, IEEE issues the IEEE 802.1Q protocol to standardize VLAN implementation,
defining the structure of VLAN-tagged packets.
In traditional Ethernet data frames, the type field of the upper layer protocol is encapsulated
after the destination MAC address and source MAC address, as shown in the follow figure of
Encapsulation format of traditional Ethernet frames.
DA refers to the destination MAC address, SA refers to the source MAC address, and Type
refers to the protocol type of the packet. IEEE 802.1Q protocol defines that a 4-byte VLAN tag
is encapsulated after the destination MAC address and source MAC address to show the
information about VLAN.
As shown in the following figure of Format of VLAN tag, a VLAN tag contains four fields,
including TPID, priority, CFI, and VLAN ID.
TPID
is a 16-bit field, indicating that this data frame is VLAN-tagged. By default, it is 0x8100
in First Mile SIGNAMAX POR series Ethernet industrial switches.
Priority
is a 3-bit field, referring to 802.1p priority. Refer to section “QoS & QoS profile” for
details.