if-match vlan-id
Function
The if-match vlan-id command configures a matching rule in a traffic classifier based on the VLAN ID in packets.
The undo if-match vlan-id command deletes a matching rule in a traffic classifier based on the VLAN ID in packets.
By default, a matching rule based on the VLAN ID in packets is not configured in a traffic classifier.
Format
if-match vlan-id start-vlan-id [ to end-vlan-id ]
undo if-match vlan-id start-vlan-id [ to end-vlan-id ]
Parameters
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. |
- |
Usage Guidelines
Usage Scenario
You can run the if-match vlan-id command to classify traffic based on the VLAN ID of 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.