199
[PE1-behavior-P200] nest top-most vlan-id 200
[PE1-behavior-P200] quit
# Create a QoS policy named
qinq
, associate traffic class
A10
with traffic behavior
P100
, and
associate traffic class
A20
with traffic behavior
P200
.
[PE1] qos policy qinq
[PE1-qospolicy-qinq] classifier A10 behavior P100
[PE1-qospolicy-qinq] classifier A20 behavior P200
[PE1-qospolicy-qinq] quit
# Enable basic QinQ on the port.
[PE1] interface ethernet 1/0/1
[PE1-Ethernet1/0/1] qinq enable
# Apply QoS policy
qinq
to the incoming traffic on the port.
[PE1-Ethernet1/0/1] qos apply policy qinq inbound
{
Configure Ethernet 1/0/2:
# Configure Ethernet 1/0/2 as a trunk port and assign it to VLAN 100 and VLAN 200.
[PE1] interface ethernet 1/0/2
[PE1-Ethernet1/0/2] port link-type trunk
[PE1-Ethernet1/0/2] port trunk permit vlan 100 200
# Create class
A100
and configure the class to match frames with CVLAN 10 and SVLAN
100.
[PE1] traffic classifier A100
[PE1-classifier-A100] if-match customer-vlan-id 10
[PE1-classifier-A100] if-match service-vlan-id 100
[PE1-classifier-A100] quit
# Configure traffic behavior
T100
to mark matching packets with CVLAN 30.
[PE1] traffic behavior T100
[PE1-behavior-T100] remark customer-vlan-id 30
[PE1-behavior-T100] quit
# Create class
A200
and configure the class to match frames with CVLAN 20 and SVLAN
200.
[PE1] traffic classifier A200
[PE1-classifier-A200] if-match customer-vlan-id 20
[PE1-classifier-A200] if-match service-vlan-id 200
[PE1-classifier-A200] quit
# Configure traffic behavior
T200
to mark matching packets with CVLAN 40.
[PE1] traffic behavior T200
[PE1-behavior-T200] remark customer-vlan-id 40
[PE1-behavior-T200] quit
# Create a QoS policy named
sqinq
, associate traffic class
A100
with traffic behavior
T100
,
and associate traffic class
A200
with traffic behavior
T200
.
[PE1] qos policy sqinq
[PE1-qospolicy-sqinq] classifier A100 behavior T100
[PE1-qospolicy-sqinq] classifier A200 behavior T200
[PE1-qospolicy-sqinq] quit
# Apply QoS policy
sqinq
to the outgoing traffic on the port.
[PE1-Ethernet1/0/2] qos apply policy sqinq outbound