< Home

if-match tag

Function

The if-match tag command sets a matching rule that is based on the route tag.

The undo if-match tag command deletes the matching rule based on the specified route tag.

By default, no matching rule based on the route tag is configured.

Format

if-match tag tag

undo if-match tag

Parameters

Parameter Description Value
tag Indicates the tag value.

Route tags classify routes as required. The same type of routes has the same tags. Routes are managed and controlled based on the tag by using the routing policy.

The value is an integer ranging from 0 to 4294967295.

Views

Route-Policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match tag command to filter routes based on the tags.

Prerequisites

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

Precautions

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

Example

# Define a rule to match the OSPF routes with the tag value 8.

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