< Home

if-match preference

Function

The if-match preference command configures a route priority-based matching rule.

The undo if-match preference command deletes a route priority-based matching rule.

By default, no route priority-based matching rule is configured.

Format

if-match preference preference

undo if-match preference [ preference ]

Parameters

Parameter Description Value
preference

Specifies a route priority.

The value is an integer ranging from 0 to 255.

Views

Route-policy view

Default Level

2: Configuration level

Usage Guidelines

To configure a route priority-based matching rule, run the if-match preference command. After the rule is configured, routes are filtered based on the specified priority, and the routes with the specified priority match the rule.

Prerequisites

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

Example

# Configure a matching rule to match the routes with the priority being 50.

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