What is PVID
PVID is short for Port VLAN identifier.
The PVID of a port is the VLAN id that will be assigned to any untagged frames entering the switch on that port (assuming the switch is using port-based VLAN classification). This is a concept that is defined in IEEE 802.1Q.
For example, if you intend to connect a PC or a printer to a port, you would set the port as untagged in VLAN 10 and excluded from all other VLANS. The switch knows to only send VLAN 10 stuff to that port and to remove the VLAN tagging information before sending anything out.
But, what about untagged frames entering the switch from the PC or printer (They’ll be untagged because the PC or printer doesn’t know about VLAN). This is where PVID comes in. PVID tells the switch what to do with those untagged incoming frames. In this example, if the PVID doesn’t match the VLAN id, the PC won’t be able to communicate with anybody because the frames it sends into the switch will end up on the wrong VLAN.
Except in some switches you don’t have to bother setting the PVID which can make the concept a little confusing.
On some switches, if you set a port as untagged on VLAN 10 and excluded from all others, the switch will automatically take care of tagging the untagged incoming frames with the same VLAN id (because what else would you want?) without requiring you to set the PVID. Other switches require you to manually set the PVID. Some of the switches that don’t require you to set the PVID manually will allow you to set the PVID even if you don’t have to.
In Cisco IOS switches you will (probably) never need to set a PVID (although you can) because the Cisco port configuration categories (and other configured parameters) take care of this automatically.
In order to determine your responsibility regarding PVID, you’ll have to consult your switch’s documentation or experiment.
PVID vs Native VLAN
As far as I can tell, the 802.1Q standard does not define a “native” parameter. It might be in there, but come on man, the thing is like 1800 super-tedious pages. The formalization of “native” (again, as far as I can tell) seems to be something that only exists in the Cisco world (and maybe in Cisco clones). If you know otherwise, please correct me.
So, that being said, the “native VLAN” is the VLAN associated with all untagged traffic on a trunk (and can be set on a per-port basis). This means 2 things:
1. The switch will assign the id for it’s native VLAN to any untagged frames entering that port.
2. Frames in the native VLAN will have their tag removed before being sent out on that port (which means the switch on the other end will have to figure out how to tag the frame).
A Trunk is a link that carries traffic in multiple VLANs (this is a term that is used in 802.1Q but is not formally defined. In the Cisco IOS world you can configure a port explicitly as a trunk but in most other switch brands you achieve the same functionality by manipulating the table of allowed/excluded and tagged/untagged VLANs). A trunk allows a maximum of one untagged VLAN, because allowing more than one would mean the switches wouldn’t be able to sort everything out at the other end. That one allowed VLAN is called the native VLAN.
So, “native VLAN” is not the same as PVID, although it could be partially implemented using PVID.