This is on a 2724 switch. I've got a server setup to only accept tagged packets on VLAN 100. I want the server to be able to accept packets from both tagged and untagged sources. I set the PVID of the port the server is on to 100, but it's not getting any traffic. From reading the documentation, it's not really clear on exactly what setting PVID does. Does PVID add a VLAN tag to traffic entering from that switch port, or leaving that switch port? Thanks...
There's two things you can set on the port for VLANs....tagged or untagged and PVID.
If the port is set as untagged, then it tells the switch that the device(s) connected to that port are VLAN unaware, so any packet to be forwarded from that port out of the switch must be forwarded with the VLAN tag removed. If the port is set as tagged, then the destination device is VLAN aware, and packets will be forwarded with VLAN tags...so tagged /untagged is for packets leaving the switch.
Now for packets arriving at the switch port....if the packet arrives with a VLAN tag , then - providing that port is in the VLAN matching the tag - the packet will be forwarded; so if you have set a server NIC for instance to apply a VLAN ID , then the packet arriving at the port will be tagged...so in this case you have a VLAN aware device forwarding packets already tagged , so you would configure the port into the appropraite VLAN as a tagged port. Note that if the packet arrives at the port tageed for a VLAN of which the port is not a member, the switch will drop the packet.
If a packet arrives at the port from an end device carrying no VLAN tag, then the switch will add a VLAN tage which corresponds to the PVID, and then forward it within that VLAN; so the PVID mechanisim allows you to have traffic originating from a non-VLAN aware device to become an 802.1q packet, so that it can traverse to other switches and still be contained within the correct VLAN; so PVID is for non tagged packets arriving at a port on the switch.