if-match mpls-exp

Function

The if-match mpls-exp command defines a matching rule to classify traffic based on the value of the MPLS EXP field.

The undo if-match mpls-exp command cancels the configuration.

By default, the matching rule to classify traffic based on the value of the MPLS EXP field is not configured in traffic classifier view.

Format

if-match mpls-exp exp-value

undo if-match mpls-exp exp-value

Parameters

Parameter Description Value
exp-value

Specifies the EXP value of the MPLS packet to be matched.

The value is an integer ranging from 0 to 7.

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 EXP values of packets, you can run this command to configure a matching rule for complex traffic classification based on EXP 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 matching the specified EXP 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

You can configure a maximum of eight such rules for a traffic classifier. That is, one traffic classifier can match a maximum of eight MPLS EXP priorities. The later configuration does not override the previous one.

After the configuration, the MPLS EXP values are sorted in the configuration order.

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

To apply a traffic policy containing this rule to an interface, you must specify the mpls-layer parameter in the traffic-policy command.

Example

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