Procedure
Step 1 Create a VLAN and configure interfaces.
# Create VLAN 20.
<Quidway> system-view
[Quidway] sysname Switch
[Switch] vlan 20
[Switch-vlan20] quit
# Configure the type of GE1/0/1 as access and GE2/0/1 as trunk, and add GE1/0/1 and
GE2/0/1 to VLAN 20.
[Switch] interface gigabitethernet1/0/1
[Switch-GigabitEthernet1/0/1] port link-type access
[Switch-GigabitEthernet1/0/1] port default vlan 20
[Switch-GigabitEthernet1/0/1] quit
[Switch] interface gigabitethernet2/0/1
[Switch-GigabitEthernet2/0/1] port link-type trunk
[Switch-GigabitEthernet2/0/1] port trunk allow-pass vlan 20
[Switch-GigabitEthernet2/0/1] quit
# Create VLANIF 20 and assign IP address 20.20.20.1/24 to it.
[Switch] interface vlanif 20
[Switch-Vlanif20] ip address 20.20.20.1 24
[Switch-Vlanif20] quit
NOTE
Assign network segment address 20.20.20.2/24 to the interface connecting the router and Switch. The
details are not mentioned here.
Step 2 Create an ACL.
# Create Layer 2 ACL 4000 on the Switch to match the packets with the source MAC address
as 0000-0000-0003.
[Switch] acl 4000
[Switch-acl-L2-4000] rule permit source-mac 0000-0000-0003 ffff-ffff-ffff
[Switch-acl-L2-4000] quit
Step 3 Create a traffic classifier.
Create traffic classifier c1 on the Switch with ACL 4000 as the matching rule.
[Switch] traffic classifier c1
[Switch-classifier-c1] if-match acl 4000
[Switch-classifier-c1] quit
Step 4 Create a traffic behavior.
# Create traffic behavior b1 on the Switch and configure the traffic statistics action.
[Switch] traffic behavior b1
[Switch-behavior-b1] statistic enable
[Switch-behavior-b1] quit
Step 5 Create a traffic policy and apply it to an interface.
# Create traffic policy p1 on the Switch and bind the traffic classifier to the traffic behavior in
the traffic policy.
[Switch] traffic policy p1
[Switch-trafficpolicy-p1] classifier c1 behavior b1
[Switch-trafficpolicy-p1] quit
Apply traffic policy p1 to GE1/0/1.
Quidway S7700 Smart Routing Switch
Configuration Guide - QoS 1 Class-based QoS Configuration
Issue 01 (2011-07-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
43