94 CHAPTER 9: VLAN CONFIGURATION
template for llc encapsulation. Otherwise, the encapsulation format of the 
matching packets will be the same as that of the ipx llc or ipx raw packets 
respectively.
■ When you use the mode keyword to configure a user-defined protocol 
template, do not set etype-id in ethernetii etype etype-id to 0x0800, 0x8137, 
0x809b, or 0x86dd. Otherwise, the encapsulation format of the matching 
packets will be the same as that of the IPv4, IPX, AppleTalk, and IPv6 packets 
respectively.
■ Do not configure a VLAN as both a protocol-based VLAN and a voice VLAN. 
Because a protocol-based VLAN requires that the inbound packets on the 
Hybrid port are untagged packets, whereas the Hybrid port working in auto 
voice VLAN mode only supports to process tagged voice traffic. For more 
information, refer to “Voice VLAN Configuration” on page 99.
Configuring 
IP-Subnet-Based VLAN
Introduction In this approach, VLANs are categorized based on the source IP addresses and the 
subnet masks of packets. After receiving an untagged packet from a port, the 
device identifies the VLAN the packet belongs to based on the source address 
contained in the packet, and then forwards the packet in the VLAN. This allows 
packets from a certain network segment or with certain IP addresses to be 
forwarded in a specified VLAN.
Configuring an
IP-Subnet-Based VLAN
n
This feature is only applicable to Hybrid ports.
Follow these steps to configure an IP-subnet-based VLAN:
To do… Use the command…  Remarks 
Enter system view system-view - 
Enter VLAN view vlan vlan-id - 
Configure the association 
between an IP subnet with the 
current VLAN
ip-subnet-vlan 
[ ip-subnet-index ] ip 
ip-address [ mask ] 
Required
The configured IP network 
segment or IP address cannot 
be a multicast network 
segment or a multicast address 
Return to system view quit - 
Enter 
Ethernet 
port view 
or port 
group view 
Enter Ethernet 
port view 
interface interface-type 
interface-number 
Use either command;
In Ethernet port view, the 
subsequent configurations 
only apply to the current port; 
in port group view, the 
subsequent configurations 
apply to all ports in the port 
group 
Enter port group 
view 
port-group { manual 
port-group-name | 
aggregation agg-id }
Configure port link type as 
Hybrid
port link-type hybrid Required