< Home

if-match interface

Function

The if-match interface command creates a matching rule based on the outbound interface.

The undo if-match interface command deletes the matching rule based on the specified outbound interface.

By default, no matching rule based on the outbound interface is configured.

Format

if-match interface { interface-type interface-number } &<1-16>

undo if-match interface [ interface-type interface-number ] &<1-16>

Parameters

Parameter Description Value
interface-type interface-number Specifies the type and number of the outbound interface. A maximum of 16 outbound interfaces can be specified in the if-match interface command. -

Views

Route-Policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The if-match interface command is used to filter routes based on the outbound interfaces.

A maximum of 16 outbound interfaces can be configured in this command.

If a node contains multiple if-match interface clauses, the relationship between the if-match interface clauses is OR. If a node contains both if-match interface clauses and other if-match clauses with different matching rules, the relationship between the if-match interface clauses and other if-match clauses is AND. For example, if a node contains if-match interface GE0/0/1, if-match interface GE0/0/2, and if-match acl 2000 clauses, if-match interface GE0/0/1 and if-match interface GE0/0/2 are ORed, whereas if-match interface GE0/0/1 and if-match acl 2000 are ANDed.

Prerequisites

The if-match interface command can be used only after the route-policy command is used.

Precautions

The routing policy matches routes based on outbound interface information. Routes that match the outbound interface information will be checked by other if-match clauses of this node. Routes that do not match the outbound interface information will be checked by the next node.

Example

# Define a rule to match the routes with the outbound interface VLANIF100.

<HUAWEI> system-view
[HUAWEI] route-policy policy permit node 10
[HUAWEI-route-policy] if-match interface vlanif 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >