Protocol-based VLAN assignment on S series switch

Example of configuring protocol-based VLAN assignment for S series switches (except S1700 switches):
1. Configuration roadmap
1). Create a VLAN and determine the VLAN to which each service belongs.
2). Associate a protocol with the VLAN, so that the switch can determine the VLAN ID of a received packet according to the protocol (or protocol suite) of the packet.
3. Add interfaces to the VLAN, so that the packets of the protocol-based VLAN can pass through the interfaces.
4. Associate interfaces with the protocol-based VLAN. The system then determines the VLAN ID of a received packet according to the association between the protocol type of the packet and the VLAN.
2. Configuration procedure
1) Create a VLAN.
[HUAWEI] vlan batch 10
2) Associate a protocol with the VLAN.
[HUAWEI] vlan 10
[HUAWEI-vlan10] protocol-vlan ipv4 #Associate IPv4 with VLAN 10.
[HUAWEI-vlan10] quit
3) Associate an interface with the protocol-based VLAN.
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] protocol-vlan vlan 10 all priority 5
#Associate GE0/0/2 with VLAN 10 and set the 802.1p priority of VLAN 10 to 5.
[HUAWEI-GigabitEthernet0/0/2] quit
4) Configure interfaces.
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type trunk
[HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 #Configure the interface to allow packets of VLAN 10 to pass through.
[HUAWEI-GigabitEthernet0/0/1] quit
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] port link-type hybrid
[HUAWEI-GigabitEthernet0/0/2] port hybrid untagged vlan 10
#Configure the interface to allow packets of VLAN 10 to pass through in untagged mode.

Scroll to top