< Home

if-match vlan-id

Function

The if-match vlan-id command configures a matching rule based on the VLAN ID of packets in a traffic classifier.

The undo if-match vlan-id command deletes a matching rule based on the VLAN ID of packets in a traffic classifier.

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

Format

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

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

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 the cvlan-id cvlan-id parameter.

Parameters

Parameter

Description

Value

start-vlan-id [ to end-vlan-id ]

Specifies the outer VLAN ID.

  • start-vlan-id specifies the start outer VLAN ID. The value of start-vlan-id is an integer that ranges from 1 to 4094.

  • end-vlan-id specifies the end outer VLAN ID. The value of end-vlan-id is an integer that ranges from 1 to 4094.

end-vlan-id must be larger than start-vlan-id. If to end-vlan-id is not specified, only the VLAN ID specified by start-vlan-id is matched.

cvlan-id cvlan-id

Specifies the inner VLAN ID.

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 vlan-id command to classify packets based on the VLAN ID 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

On the S6720-EI, if a traffic policy contains the traffic classifier defining the if-match vlan-id start-vlan-id [ to end-vlan-id ] cvlan-id cvlan-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 VLAN 2 in the traffic classifier c1.

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