< Home

if-match

Function

The if-match command configures the matching mode of terminal type identification rules.

The undo if-match command deletes the matching mode of terminal type identification rules.

By default, no matching mode of terminal type identification rules is configured.

This function is supported only by S5730-HI, S5731-H, S5731S-H, S6730-H, S6730S-H, S5732-H, S6720-HI, and S5720-HI.

Format

if-match rule rule-id [ { and | or } rule rule-id ] &<1-7>

undo if-match

Parameters

Parameter

Description

Value

rule rule-id

Specifies the ID of a terminal type identification rule.

The value is an integer that ranges from 0 to 7.

and

Specifies the matching mode as "and" (that is, a terminal type can be identified only when the terminal information matches all rules configured).

-

or

Specifies the matching mode as "or" (that is, a terminal type can be identified when the terminal information matches any of the rules).

-

Views

Terminal type identification profile view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The if-match command allows you to flexibly combine terminal type identification rules.

Prerequisite

The specified terminal type identification rules have been configured using the rule command.

Precautions

If the parameter is specified as and and the terminal information does not match the first rule, the AC sends a matching failure response and stops matching the following rules.

The priority of and is higher than that of or. For example, you run the if-match rule 1 or rule 2 and rule 3 or rule 4 and rule 5 or rule 6 and rule 7 or rule 0 command. If the terminal information matches any of the five rule combinations, which are rule 1, rule 2 and rule 3, rule 4 and rule 5, rule 6 and rule 7, and rule 0, the matching operation succeeds.

Example

# Specify that terminal information must match terminal type identification rule 1.

<HUAWEI> system-view
[HUAWEI] device-profile profile-name huawei
[HUAWEI-device-profile-huawei] if-match rule 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >