< Home

if-match flow-id

Function

The if-match flow-id command configures a matching rule based on the flow ID in a traffic classifier.

The undo if-match flow-id command deletes a matching rule based on the flow ID in a traffic classifier.

By default, no matching rule based on the flow ID is configured in a traffic classifier.

Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, S5735S-S, S6720-EI, S6720-HI, S6730-H, S6730S-H, S6730-S, S6730S-S, and S6720S-EI support this command.

Format

if-match flow-id flow-id

undo if-match flow-id

Parameters

Parameter

Description

Value

flow-id

Specifies a flow ID.

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

Views

Traffic classifier view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a traffic policy is applied to different interfaces or VLANs, to save ACL resources, you can run the if-match flow-id command to classify packets based on the flow ID so that the device processes packets matching the same flow ID in the same manner.

Assume that M ACLs are configured on the device to distinguish services, and each ACL contains N ACL rules. Traffic classifiers classify packets based on ACL rules, and the traffic policy containing the ACL rules are applied to X interfaces. If the action of re-marking flow IDs and matching rules based on the flow IDs are not configured, applying the traffic policy occupies M*N*X ACL resources. If the action of re-marking flow IDs and matching rules based on flow IDs are configured, applying the traffic policy occupies only M *(N + X) ACL resources.

Prerequisites

The following operations must have been performed before this command is used:

  • Run the remark flow-id command in the traffic behavior view to configure an action of re-marking the flow ID.
  • Run the traffic classifier command in the system view to create a traffic classifier.

Precautions

It is recommended that the traffic classifier containing if-match flow-id and the traffic behavior containing remark flow-id be bound to different traffic policies.

The traffic policy containing if-match flow-id can be only applied to an interface, a VLAN, a VLANIF interface, or the system in the inbound direction.

If you run the if-match flow-id command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a matching rule based on the flow ID of 1 in the traffic classifier c1.

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