< Home

apply tag

Function

The apply tag command sets the tag for routes.

The undo apply tag command cancels the configuration.

By default, no tag is set for routes.

Format

apply tag tag

undo apply tag

Parameters

Parameter Description Value
tag Specifies the tag of routes. The value is an integer ranging from 0 to 4294967295.

Views

Route-policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If routes satisfy the filter condition specified by the if-match clause, you can run the apply tag command to set the same tag for the routes that satisfy the same filter condition to classify the routes.

Prerequisites

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

Configuration Impact

After a route matches a route-policy, you can change the tag of the route.

Precautions

You cannot set the tag for BGP routes. The apply tag command sets the tag for only IGP routes.

Example

# Set the tag of routes to 100.

<sysname> system-view
[sysname] route-policy policy permit node 10
[sysname-route-policy] apply tag 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >