First, it must be noted that the vlan standard 802.1q uses the untagged and tagged terms to define vlan specifications. There is no access or trunk. However, most actual switch devices use access and trunk when configuring.
The vlan ID in the 802.1q packet is a vid tag.
Pvid identifies a physical port, and a physical port can have only one pvid;
Vid is the vlan ID carried in the packet.
Typical examples
The vswitch environment configuration is as follows:
Port 1: trunk, allowing all VLANs to pass through; connecting to a personal PC
Port 2: access, vlan35, connected to the Server
The PC and Server are in the same IP segment.
Why cannot a PC access the Server?
By default, when the port is set to trunk, pvid is automatically set to 1, and access, pvid is automatically set to vlan number.
Because the packets sent by the PC do not have the vid label, after Port 1 is accepted, it is tagged with vid = 1, which is equivalent to dividing the PC and Server into different VLANs and thus cannot be accessed.
Solution: Set the pvid of Port 1 to 35.
Note that when the access port of switch S1 is connected to the trunk port of S2, the access port does not accept any packets with vid labels, therefore, only packets with vid = pvid of the trunk port sent by S2 are actually accepted,
From the growth track of smstong