1-6Table 1-2 Packet processing of a trunk portProcessing of an incoming packetFor an untagged packet For a tagged packetProcessing of an outgoingpacketz If the port has already beenadded to its default VLAN, tag thepacket with the default VLAN tagand then forward the packet.z If the port has not been added toits default VLAN, discard thepacket.z If the VLAN ID is one of theVLAN IDs allowed to passthrough the port, receive thepacket.z If the VLAN ID is not one of theVLAN IDs allowed to passthrough the port, discard thepacket.z If the VLAN ID is just thedefault VLAN ID, strip off thetag and send the packet.z If the VLAN ID is not thedefault VLAN ID, keep theoriginal tag unchanged andsend the packet.Table 1-3 Packet processing of a hybrid portProcessing of an incoming packetFor an untagged packet For a tagged packetProcessing of an outgoingpacketz If the port has already beenadded to its default VLAN, tagthe packet with the defaultVLAN tag and then forward thepacket.z If the port has not been addedto its default VLAN, discard thepacket.z If the VLAN ID is one of theVLAN IDs allowed to passthrough the port, receive thepacket.z If the VLAN ID is not one of theVLAN IDs allowed to passthrough the port, discard thepacket.Send the packet if the VLAN ID isallowed to pass through the port.Use the port hybrid vlan commandto configure whether the port keepsor strips off the tags when sendingpackets of a VLAN (including thedefault VLAN).Protocol-Based VLANIntroduction to Protocol-Based VLANProtocol-based VLAN is also known as protocol VLAN, which is another way to classify VLANs.Through the protocol-based VLANs, the switch can analyze the received packets carrying no VLAN tagon the port and match the packets with the user-defined protocol template automatically according todifferent encapsulation formats and the values of specific fields. If a packet is matched, the switch willadd a corresponding VLAN tag to it automatically. Thus, data of specific protocol is assignedautomatically to the corresponding VLAN for transmission.This feature is used for binding the ToS provided in the network to VLAN to facilitate management andmaintenance.Encapsulation Format of Ethernet DataThis section introduces the common encapsulation formats of Ethernet data for you to understand theprocedure for the switch to identify the packet protocols.Ethernet II and 802.2/802.3 encapsulationThere are two encapsulation types of Ethernet packets: Ethernet II defined by RFC 894 and802.2/802.3 defined by RFC 1042. The two encapsulation formats are described in the followingfigures.Ethernet II packet: