< Home

if-match interface

Function

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

The undo if-match interface command cancels the configuration.

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

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.

Prerequisites

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

Configuration Impact

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

Follow-up Procedure

You can 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 GigabitEthernet0/0/0.

<sysname> system-view
[sysname] route-policy policy permit node 10
[sysname-route-policy] if-match interface GigabitEthernet0/0/0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >