if-match 8021p

Function

The if-match 8021p command configures a matching rule for complex traffic classification based on the 802.1p value of VLAN packets.

The undo if-match 8021p command cancels the configuration.

By default, the matching rule for complex traffic classification based on the 802.1p value of VLAN packets is not configured in traffic behavior view.

Format

if-match 8021p 8021p-value

undo if-match 8021p 8021p-value

Parameters

Parameter Description Value
8021p-value

Specifies the 802.1p value of matched VLAN packets, namely, the priority value of VLAN frames. The greater the value, the higher the priority of a VLAN packet.

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 classify traffic and apply different traffic behaviors to traffic according to 802.1p values of VLAN packets, you need to configure a classifier based on the 802.1p value and then a corresponding traffic behavior. Last, you need to configure a traffic policy and apply the policy to interfaces. For QinQ packets, the 802.1p value in the outer VLAN tag is matched against the configured matching rule.

Prerequisites

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

Configuration Impact

The matching rule is valid only for the inbound policies.

You can configure more than one 802.1p priority for a traffic classifier to match packets of different priorities. You can configure a maximum of eight priorities for a traffic classifier.

After you run this command, values of the 802.1p priorities are sorted in the configuration order.

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.

Precautions

If multiple matching rules are configured in a traffic classifier, set a relationship between these rules by specifying the operator parameter in the traffic classifier [ operator { and | or } ] command.

  • and: A packet belongs to the classifier only when it matches all the rules.
  • or: A packet belongs to the classifier if it matches any one of the rules. By default, the value of the logic operator of the rules is or.

Example

# Define the traffic classifier c1. Match the VLAN packets with the 802.1p value being 2.
<HUAWEI> system-view
[~HUAWEI] traffic classifier c1
[*HUAWEI-classifier-c1] if-match 8021p 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >