< Home

apply preferred-value

Function

The apply preferred-value command sets the preferred value (PrefVal) for BGP routes.

The undo apply preferred-value command cancels the configuration.

By default, the PrefVal of BGP routes is not set.

Format

apply preferred-value preferred-value

undo apply preferred-value

Parameters

Parameter Description Value
preferred-value Specifies the PrefVal of BGP routes. In route selection, the BGP route with the largest PrefVal is preferred. The value is an integer ranging from 0 to 65535.

Views

Route-policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The PrefVal is a proprietary attribute of BGP. You can use the apply preferred-value command to set the PrefVal for a BGP route in the import policy.

Prerequisites

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

Configuration Impact

After a BGP route matches a route-policy, you can set the PrefVal for the BGP route.

Precautions

The PrefVal of a route indicates the weight of the route in BGP routing. It has only local significance and is not a standard RFC-defined attribute. The PrefVal is inapplicable to export policies of BGP.

Example

# Set the PrefVal for BGP routes.

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