Procedure
Step 1
Create VLANs and configure interfaces.
# Create VLAN 100, VLAN 110, and VLAN 120 on the Switch.
<Quidway>
system-view
[Quidway]
sysname Switch
[Switch]
vlan batch 100 110 120
# Configure the access types of GE 0/0/1 and GE0/0/2 to trunk, add GE 0/0/1 and GE0/0/2 to
VLAN 100, VLAN 110, and VLAN 120.
[Switch]
interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1]
port link-type trunk
[Switch-GigabitEthernet0/0/1]
port trunk allow-pass vlan 100 110 120
[Switch-GigabitEthernet0/0/1]
quit
[Switch]
interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2]
port link-type trunk
[Switch-GigabitEthernet0/0/2]
port trunk allow-pass vlan 100 110 120
[Switch-GigabitEthernet0/0/2]
quit
Step 2
Create traffic classifiers.
# Create traffic classifiers
c1
to
c3
on the Switch to match different service flows from the
enterprise based on VLAN IDs.
[Switch]
traffic classifier c1 operator and
[Switch-classifier-c1]
if-match vlan-id 120
[Switch-classifier-c1]
quit
[Switch]
traffic classifier c2 operator and
[Switch-classifier-c2]
if-match vlan-id 110
[Switch-classifier-c2]
quit
[Switch]
traffic classifier c3 operator and
[Switch-classifier-c3]
if-match vlan-id 100
[Switch-classifier-c3]
quit
Step 3
Create traffic behaviors.
# Create traffic behaviors
b1
to
b3
on the Switch to limit different service flows and re-mark
priorities.
[Switch]
traffic behavior b1
[Switch-behavior-b1]
car cir 2000 pir 10000 green pass
[Switch-behavior-b1]
remark dscp 46
[Switch-behavior-b1]
statistic enable
[Switch-behavior-b1]
quit
[Switch]
traffic behavior b2
[Switch-behavior-b2]
car cir 4000 pir 10000 green pass
[Switch-behavior-b2]
remark dscp 30
[Switch-behavior-b2]
statistic enable
[Switch-behavior-b2]
quit
[Switch]
traffic behavior b3
[Switch-behavior-b3]
car cir 4000 pir 10000 green pass
[Switch-behavior-b3]
remark dscp 14
[Switch-behavior-b3]
statistic enable
[Switch-behavior-b3]
quit
Step 4
Create a traffic policy and apply it on the interface.
# Create traffic policy
p1
on the Switch, bind traffic classifiers to traffic behaviors in the traffic
policy, and apply the traffic policy to GE0/0/1 in the inbound direction to limit the packets
received from the user side and re-mark priorities of these packets.
[Switch]
traffic policy p1
[Switch-trafficpolicy-p1]
classifier c1 behavior b1
[Switch-trafficpolicy-p1]
classifier c2 behavior b2
S3700HI Ethernet Switches
Configuration Guide - QoS
2 Traffic Policing and Traffic Shaping Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
72