if-match dscp

Function

The if-match dscp command configures a matching rule for complex traffic classification based on DSCP values.

The undo if-match dscp command cancels the configuration.

By default, the matching rule for complex traffic classification based on DSCP values is not configured in traffic classifier view.

Format

if-match ipv6 dscp dscp-value

if-match dscp { dscp-value | af11 | af12 | af13 | af21 | af22 | af23 | af31 | af32 | af33 | af41 | af42 | af43 | cs1 | cs2 | cs3 | cs4 | cs5 | cs6 | cs7 | ef | default }

undo if-match ipv6 dscp dscp-value

undo if-match dscp { dscp-value | af11 | af12 | af13 | af21 | af22 | af23 | af31 | af32 | af33 | af41 | af42 | af43 | cs1 | cs2 | cs3 | cs4 | cs5 | cs6 | cs7 | ef | default }

Parameters

Parameter Description Value
dscp-value

Specifies the DSCP value of IPv4 or IPv6 packets to be matched.

The DSCP value of an IPv4 packet is an integer ranging from 0 to 63 or a keyword of EF, default, or in the range of AF11-AF13, AF21-AF23, AF31-AF33, AF41-AF43, and CS1-CS7. The DSCP value of an IPv6 packet can be an integer ranging from 0 to 63.

af11

DSCP priority AF11, corresponding to DSCP value 10.

-

af12

DSCP priority AF12, corresponding to DSCP value 12.

-

af13

DSCP priority AF13, corresponding to DSCP value 14.

-

af21

DSCP priority AF21, corresponding to DSCP value 18.

-

af22

DSCP priority AF22, corresponding to DSCP value 20.

-

af23

DSCP priority AF23, corresponding to DSCP value 22.

-

af31

DSCP priority AF31, corresponding to DSCP value 26.

-

af32

DSCP priority AF32, corresponding to DSCP value 28.

-

af33

DSCP priority AF33, corresponding to DSCP value 30.

-

af41

DSCP priority AF41, corresponding to DSCP value 34.

-

af42

DSCP priority AF42, corresponding to DSCP value 36.

-

af43

DSCP priority AF43, corresponding to DSCP value 36.

-

cs1

DSCP priority CS1, corresponding to DSCP value 8.

-

cs2

DSCP priority CS2, corresponding to DSCP value 16.

-

cs3

DSCP priority CS3, corresponding to DSCP value 24.

-

cs4

DSCP priority CS4, corresponding to DSCP value 32.

-

cs5

DSCP priority CS5, corresponding to DSCP value 40.

-

cs6

DSCP priority CS6, corresponding to DSCP value 48.

-

cs7

DSCP priority CS7, corresponding to DSCP value 56.

-

ef

DSCP priority EF, corresponding to DSCP value 46.

-

default

Default DSCP. The corresponding DSCP value is 0.

-

ipv6

Indicates that traffic classification is performed according to the DSCP values in IPv6 packets.

-

Views

Traffic classifier view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

Usage Scenario

To perform different traffic policies for different traffic classifiers according to the DSCP values of packets, you can run this command to configure a matching rule for complex traffic classification based on DSCP values. Then, you need to configure the traffic behavior and traffic policy, and apply the policy to interfaces.

Prerequisites

A traffic classifier is configured in the system view and the traffic classifier view is displayed.

Configuration Impact

The traffic action in the traffic behavior bound to the traffic classifier is performed for the packets with the specified DSCP value.

Follow-up Procedure

You need to configure the traffic behavior and traffic policy, bind the traffic behavior to the traffic classifier in the traffic policy, and apply the traffic policy to interfaces.

Precautions

With this command, you can define multiple rules for the same classifier. The later configuration does not override the previous one.

In traffic classification, packets match traffic policies in the order the policies are configured.

A matching rule can be deleted only when all DSCP values are the same as those that are specified in the matching rule. The deletion order can be different from the configuration order.

Example

# Match the packets with the DSCP value being 1 with the traffic classifier class1.
<HUAWEI> system-view
[~HUAWEI] traffic classifier class1
[*HUAWEI-classifier-class1] if-match dscp 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >