[Switch]
vlan batch 100 200 300
[Switch]
interface gigabitethernet0/0/1
[Switch-GigabitEthernet0/0/1]
port hybrid pvid vlan 100
[Switch-GigabitEthernet0/0/1]
port hybrid untagged vlan 100 300
[Switch-GigabitEthernet0/0/1]
qinq vlan-translation enable
[Switch-GigabitEthernet0/0/1]
port vlan-stacking vlan 100 stack-vlan 300
[Switch-GigabitEthernet0/0/1]
quit
[Switch]
interface gigabitethernet0/0/2
[Switch-GigabitEthernet0/0/2]
port hybrid pvid vlan 200
[Switch-GigabitEthernet0/0/2]
port hybrid untagged vlan 200 300
[Switch-GigabitEthernet0/0/2]
qinq vlan-translation enable
[Switch-GigabitEthernet0/0/2]
port vlan-stacking vlan 200 stack-vlan 300
[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 300
[Switch-GigabitEthernet0/0/3]
quit
# Create VLANIF 300 and assign IP address 192.168.1.1/24 to VLANIF 300.
[Switch]
interface vlanif 300
[Switch-Vlanif300]
ip address 192.168.1.1 24
[Switch-Vlanif300]
quit
Step 2
Create traffic classifiers.
# Create traffic classifiers
c1
to
c2
on the Switch to classify incoming packets based on the
VLAN ID in the inner VLAN tag.
[Switch]
traffic classifier c1 operator and
[Switch-classifier-c1]
if-match cvlan-id 100
[Switch-classifier-c1]
quit
[Switch]
traffic classifier c2 operator and
[Switch-classifier-c2]
if-match cvlan-id 200
[Switch-classifier-c2]
quit
Step 3
Create traffic behaviors.
# Create traffic behaviors
b1
to
b2
on the Switch to re-mark priorities of user packets.
[Switch]
traffic behavior b1
[Switch-behavior-b1]
remark 8021p 4
[Switch-behavior-b1]
quit
[Switch]
traffic behavior b2
[Switch-behavior-b2]
remark 8021p 2
[Switch-behavior-b2]
quit
Step 4
Create a traffic policy and apply it to an interface.
# Create traffic policy
p1
on the Switch, bind traffic classifiers to traffic behaviors in the traffic
policy, and apply the traffic policy to GE 0/0/1 andGE 0/0/2 in the inbound direction to re-mark
priorities of packets coming from the user side.
[Switch]
traffic policy p1
[Switch-trafficpolicy-p1]
classifier c1 behavior b1
[Switch-trafficpolicy-p1]
classifier c2 behavior b2
[Switch-trafficpolicy-p1]
quit
[Switch]
interface gigabitethernet0/0/1
[Switch-GigabitEthernet0/0/1]
traffic-policy p1 inbound
[Switch-GigabitEthernet0/0/1]
quit
[Switch]
interface gigabitethernet0/0/2
[Switch-GigabitEthernet0/0/2]
traffic-policy p1 inbound
[Switch-GigabitEthernet0/0/2]
quit
Step 5
Verify the configuration.
# Check the configuration of traffic classifiers.
<Switch>
display traffic classifier user-defined
User Defined Classifier Information:
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.
43