A VLAN tagging method employed in a data communications switching device
is disclosed. VLAN tagging is processed in accordance with one of a
plurality of VLAN tagging modes, namely, a fixed port mode, a tagged port
mode, a protocol-enforced port mode, a protocol-enforced port mode, and a
standards-observant mode. The fixed port mode applies a VLAN tag with a
default VLAN identifier associated with the ingress port. The tagged port
mode preserves the tag received with the packet, or appends a new tag
with a default VLAN identifier if the incoming VLAN tag is not present.
In the protocol-enforced port mode, the VLAN identifier is selected based
on the protocol type of the received PDU. In the standards-observant
mode, an incoming VLAN tag is retained if present, or a new tag selected
based on the protocol type of the received PDU if the received packet is
untagged.