< Home

if-match cvlan-id

Function

The if-match cvlan-id command configures a matching rule based on VLAN IDs in the inner and outer tags of QinQ packets in a traffic classifier. You can specify the VLAN ID range in the inner tag.

The undo if-match cvlan-id command deletes a matching rule based on VLAN IDs in the inner and outer tags of QinQ packets in a traffic classifier.

By default, a matching rule based on the VLAN ID in the inner and outer tags of QinQ packets is not configured in a traffic classifier.

Only the S5720-EI, S5720-HI, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720-LI, S6720S-EI, S6720S-LI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.

Format

if-match cvlan-id start-cvlan-id [ to end-cvlan-id ] [ vlan-id vlan-id ]

undo if-match cvlan-id start-cvlan-id [ to end-cvlan-id ] [ vlan-id vlan-id ]

Parameters

Parameter

Description

Value

start-cvlan-id [ to end-cvlan-id ]

Specifies the VLAN ID in the inner tag of a QinQ packet.

  • start-cvlan-id specifies the start VLAN ID in the inner tag. The value is an integer that ranges from 1 to 4094.

  • end-cvlan-id specifies the end VLAN ID in the inner tag. The value is an integer that ranges from 1 to 4094.

The value of end-cvlan-id must be larger than the value of start-cvlan-id.

If to end-cvlan-id is not specified, only the VLAN ID specified by start-cvlan-id is matched.

vlan-id vlan-id

Specifies the VLAN ID in the outer tag of a QinQ packet.

If this parameter is not specified, only the VLAN ID in the inner tag of a QinQ packet is matched.

The value is an integer that ranges from 1 to 4094.

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match cvlan-id command to classify packets based on the VLAN ID in the inner tag of QinQ packets or VLAN IDs in inner and outer tags of QinQ packets so that the device processes packets matching the same traffic classifier in the same manner.

Prerequisites

A traffic classifier has been created using the traffic classifier command in the system view.

Precautions

The if-match cvlan-id command is valid for only the double-tagged packets.

On the S6720-EI, if a traffic policy contains the traffic classifier defining the if-match cvlan-id start-cvlan-id [ to end-cvlan-id ] vlan-id vlan-id matching rule, IPv6 ACL resources are occupied. To display information about IPv6 ACL resources, run the display acl resource command.

Example

# Configure a matching rule based on the VLAN ID of 100 in the inner tag of QinQ packets in the traffic classifier c1.

<HUAWEI> system-view
[HUAWEI] traffic classifier c1 operator and
[HUAWEI-classifier-c1] if-match cvlan-id 100

# Configure a matching rule based on the inner VLAN ID in the range of 100 to 200 and outer VLAN ID 300 of QinQ packets in the traffic classifier c1.

<HUAWEI> system-view
[HUAWEI] traffic classifier c1 operator and
[HUAWEI-classifier-c1] if-match cvlan-id 100 to 200 vlan-id 300
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >