Configure a VLAN-based traffic policy on S series switch

14
Other related questions:
Policy-based VLAN assignment on S series switch
Example of configuring policy-based VLAN assignment for S series switches (except S1700 switches): 1. Create a VLAN. [HUAWEI] vlan batch 10 2. Configure a policy for the VLAN. [HUAWEI] vlan 10 [HUAWEI-vlan10] policy-vlan mac-address 0-1-1 ip 1.1.1.1 priority 7 //Bind MAC address 0-1-1 and IP address 1.1.1.1 to VLAN 10, and set the 802.1p priority of VLAN 10 to 7. [HUAWEI-vlan10] quit 3. Configure the interface to allow packets of VLAN 10 to pass through. [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type hybrid [HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 10 [HUAWEI-GigabitEthernet0/0/1] quit

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.

MAC-based VLAN assignment on S series switch
Example of configuring MAC address-based VLAN assignment for S series switches (except S1700 switches): 1. Configuration roadmap 1). Create a VLAN and determine the VLAN to which employees belong. 2). Configure the modes in which interfaces are added to the VLAN, so that the interfaces allow packets of the VLAN to pass through. 3). Associate the MAC address with the VLAN, so that the switch can determine the VLAN to which received packets belong according to the source MAC address in the packets. 2. Configuration procedure [HUAWEI] vlan batch 10 //Create a VLAN. [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port link-type hybrid [HUAWEI-GigabitEthernet0/0/1] port hybrid tagged vlan 10 //Add an uplink interface to the VLAN in tagged mode. [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 //Add a downlink interface to the VLAN in untagged mode. [HUAWEI-GigabitEthernet0/0/2] quit [HUAWEI] vlan 10 [HUAWEI-vlan10] mac-vlan mac-address 22-22-22 //Associate the PC's MAC address with VLAN 10. [HUAWEI-vlan10] quit [HUAWEI] interface gigabitethernet 0/0/2 [HUAWEI-GigabitEthernet0/0/2] mac-vlan enable //Enable MAC address-based VLAN assignment on the downlink interface. [HUAWEI-GigabitEthernet0/0/2] quit

Can I apply a traffic policy to a VLAN on an S series switch
For S series switches (except the S1700), a traffic policy can be applied to a VLAN. The application procedure is as follows: 1. Run the system-view command to enter the system view. 2. Run the vlan vlan-id command to enter the VLAN view. 3. Run the traffic-policy policy-name { inbound | outbound } command to apply a traffic policy to the VLAN. Only one traffic policy can be applied to a VLAN in the inbound or outbound direction. After a traffic policy is applied to a VLAN, the system performs traffic policing for all the incoming or outgoing packets that belong to the VLAN and match traffic classification rules in the VLAN. Note: MQC cannot be configured on the S2700SI.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top