92 CHAPTER 9: VLAN CONFIGURATION
Protocol-Based VLAN 
Configuration
Introduction to
Protocol-Based VLAN
n
Protocol-based VLANs are only applicable to Hybrid ports.
In this approach, inbound packets are assigned with different VLAN IDs based on 
their protocol type and encapsulation format. The protocols that can be used to 
categorize VLANs include: IP, IPX, and AppleTalk (AT). The encapsulation formats 
include: Ethernet II, 802.3 raw, 802.2 LLC, and 802.2 SNAP.
A protocol-based VLAN can be defined by a protocol template, which is 
determined by encapsulation format and protocol type. A port can be associated 
to multiple protocol templates. An untagged packet (that is, packet carrying no 
VLAN tag) reaching a port associated with a protocol-based VLAN will be 
processed as follows.
■ If the packet matches a protocol template, the packet will be tagged with the 
VLAN ID of the protocol-based VLAN defined by the protocol template.
■ If the packet matches no protocol template, the packet will be tagged with the 
default VLAN ID of the port.
To do… Use the command…  Remarks 
Enter system view system-view - 
Associate MAC addresses 
with a VLAN
mac-vlan mac-address 
mac-addr [ mask mac-mask ] 
vlan vlan-id [ priority 
priority ] 
Required 
Enter 
Ethernet 
interface 
view or 
port group 
view 
Enter Ethernet 
interface view 
interface interface-type 
interface-number 
Use either command.
The configuration performed 
in Ethernet interface view 
applies to the current port 
only; the configuration 
performed in port group view 
applies to all the ports in the 
port group. 
Enter port 
group view 
port-group { manual 
port-group-name | 
aggregation agg-id }
Configure the link type of 
the port(s) as hybrid
port link-type hybrid Required 
Configure the current hybrid 
port(s) to permit packets of 
specific MAC address-based 
VLANs
port hybrid vlan vlan-id-list 
{ tagged | untagged } 
Required
By default, a hybrid port only 
permits the packets of VLAN 1. 
Enable MAC address-based 
VLAN
mac-vlan enable Required
Disabled by default 
Configure VLAN matching 
precedence
vlan precedence { mac-vlan | 
ip-subnet-vlan } 
Optional
By default, VLANs are 
preferentially matched based 
on MAC addresses.