< Home

preference (OSPFv3)

Function

The preference command sets the preference for an OSPFv3 route.

The undo preference command restores the default setting.

By default, the preference of the OSPFv3 route is 10. When ASE is specified, the default value is 150.

Format

preference [ ase ] { preference | route-policy route-policy-name }*

undo preference [ ase ]

Parameters

Parameter Description Value
ase Sets the preference for an AS external route or an NSSA route. -
preference Specifies the preference for OSPFv3 routes. It is an integer ranging from 1 to 255.
route-policy route-policy-name Specifies the name of a routing policy and sets the preference for specified routes. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

OSPFv3 view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The smaller the preference value, the higher the preference.

Multiple dynamic routing protocols may be run on a switch at the same time. Consequently, there is a problem of sharing and selecting routing information among routing protocols. Therefore, the system sets a default reference for each routing protocol. If different routing protocols find multiple routes to the same destination, the route discovered by the routing protocol with a higher preference is selected to forward IP packets.

Precautions

Creating a route-policy before it is referenced is recommended. If a nonexistent route-policy is referenced using the command, the configured priority applies to all OSPFv3 routes.

Example

# Set the preference for OSPFv3 routes.

<HUAWEI> system-view
[HUAWEI] ospfv3 1
[HUAWEI-ospfv3-1] preference 5
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >