4.
VLAN ID
: This field identifies the ID of the VLAN to which the packet belongs. It is a 12-bit
field. The value ranges from
0
to
4095
. As
0
and
4095
are reserved values and generally not
assigned to users, the VLAN ID generally ranges from
1
to
4094
. The VLAN ID is abbreviated as
VID.
A switch uses the VLAN ID to identify the VLAN to which a packet belongs. If a received packet does
not contain a VLAN tag, the switch encapsulates the default VLAN ID of the receive port in the packet,
and transmits the packet in the default VLAN of the receive port.
In this manual, a packet that contains the VLAN tag field is called tagged frame, and a packet that does
not contain the VLAN tag field is called untagged frame. A frame with the priority tag refers to a
packet that contains the VLAN tag field, but the VLAN ID is 0.
Three link types of a port:
When creating a 802.1Q VLAN, you need to configure the link type of a port based on the device
connected to the port. Three links types of a port are available:
1.
Access: A port can belong to only one VLAN. The rule for sending packets over a port is UNTAG.
An access port is often connected to a user terminal. When an access port is added to another
VLAN, it automatically exits from the original VLAN.
2.
Trunk: A trunk port allows packets of multiple VLANs to pass through, and can receive or send
packets of multiple VLANs. It is often used for cascading of network devices. A VLAN often
spans different switches on the network. For a trunk port, the default rule for sending packets over
a port is TAG. When default VLAN data of the port is forwarded, the VLAN information is
removed; when other types of VLAN data is forwarded, the VLAN information is retained.
3.
Hybrid: A hybrid port allows packets of multiple VLANs to pass through, and can receive or send
packets of multiple VLANs. It is often used for connection between network devices or
connection with user devices. The rule for sending packets over a hybrid port can be flexibly
configured based on the device connected to the port.
Processing relationship between the PVID and VLAN packets:
PVID is the default VLAN ID of a port. When a packet received on a port of a switch does not contain
the VLAN tag, the switch inserts a VLAN tag to the packet based on the PVID value of the receive port,
and then forwards the packet.
When VLANs are divided in a LAN, the PVID is an important parameter for each port. It indicates the
VLAN to which the port belongs by default. Two functions of the PVID are as follows: