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.
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.
Parameter |
Description |
Value |
---|---|---|
start-vlan-id [ to end-vlan-id ] |
Specifies the outer VLAN ID. |
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. |
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.