if-match interface

Function

The if-match interface command sets a filtering rule that is based on the outbound interface.

The undo if-match interface command cancels the configuration.

By default, no filtering rule based on the outbound interface is set.

Format

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

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

Parameters

Parameter Description Value
interface-name

Specifies the name of the outbound interface.

-

interface-type

Specifies the type of the outbound interface.

-

interface-number

Specifies the number of the outbound interface.

-

Views

Route-policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

To filter routes based on the outbound interface, run the if-match interface command.

Prerequisites

A route-policy has been configured using the route-policy command.

Configuration Impact

When you filter routes based on the outbound interfaces, the routes that match the filtering rule are permitted and the routes that do not match the filtering rule are denied.

Follow-up Procedure

Define apply clauses to set route attributes for the routes matching the rules.

Example

# Define a rule to match the routes with the outbound interface GigabitEthernet 0/1/0.
<HUAWEI> system-view
[~HUAWEI] route-policy policy permit node 10
[*HUAWEI-route-policy] if-match interface GigabitEthernet0/1/0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >