Procedure
Step 1
Create VLANs and configure interfaces.
# Create VLANs 20 and 30.
<Quidway>
system-view
[Quidway]
sysname Switch
[Switch]
vlan batch 20 30
# Configure the type of GE 0/0/1, GE 0/0/2 and GE 0/0/3 to trunk, and add all of GE 0/0/1,
GE 0/0/2 and GE 0/0/3 to VLAN 20 and VLAN 30.
[Switch]
interface gigabitethernet0/0/1
[Switch-GigabitEthernet0/0/1]
port link-type trunk
[Switch-GigabitEthernet0/0/1]
port trunk allow-pass vlan 20 30
[Switch-GigabitEthernet0/0/1]
quit
[Switch]
interface gigabitethernet0/0/2
[Switch-GigabitEthernet0/0/2]
port link-type trunk
[Switch-GigabitEthernet0/0/2]
port trunk allow-pass vlan 20 30
[Switch-GigabitEthernet0/0/2]
quit
[Switch]
interface gigabitethernet0/0/3
[Switch-GigabitEthernet0/0/3]
port link-type trunk
[Switch-GigabitEthernet0/0/3]
port trunk allow-pass vlan 20 30
[Switch-GigabitEthernet0/0/3]
quit
# Create VLANIF 20 and VLANIF 30 and assign IP addresses to them.
[Switch]
interface vlanif 20
[Switch-Vlanif20]
ip address 20.20.20.2 24
[Switch-Vlanif20]
quit
[Switch]
interface vlanif 30
[Switch-Vlanif30]
ip address 20.20.30.2 24
[Switch-Vlanif30]
quit
NOTE
Assign network segment addresses 20.20.20.1/24 and 20.20.30.1/24 to the interfaces connecting the router
and Switch. The details are not mentioned here.
Step 2
Create ACL rules.
# Create advanced ACL rules 3001 and 3002 on the Switch to permit the packets with priorities
as 4, 5, 6, and 7 and priorities as 0, 1, 2, and 3 to pass through.
[Switch]
acl 3001
[Switch-acl-adv-3001]
rule permit ip precedence 0
[Switch-acl-adv-3001]
rule permit ip precedence 1
[Switch-acl-adv-3001]
rule permit ip precedence 2
[Switch-acl-adv-3001]
rule permit ip precedence 3
[Switch-acl-adv-3001]
quit
[Switch]
acl 3002
[Switch-acl-adv-3002]
rule permit ip precedence 4
[Switch-acl-adv-3002]
rule permit ip precedence 5
[Switch-acl-adv-3002]
rule permit ip precedence 6
[Switch-acl-adv-3002]
rule permit ip precedence 7
[Switch-acl-adv-3002]
quit
Step 3
Create traffic classifiers.
Create traffic classifiers
c1
and
c2
on the Switch with matching rules as ACL 3001 and ACL
3002.
[Switch]
traffic classifier c1
[Switch-classifier-c1]
if-match acl 3001
[Switch-classifier-c1]
quit
[Switch]
traffic classifier c2
S3700HI Ethernet Switches
Configuration Guide - QoS
1 Class-based QoS Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
46