preference (OSPFv3 view)

Function

The preference command sets a priority for OSPFv3 routes.

The undo preference command restores the default value.

By default, the priority of OSPF routes is 10. When ASE is specified, the default value is 150.

Format

preference { preference | { route-policy route-policy-name | route-filter route-filter-name } } *

preference ase { preference | { route-policy route-policy-name | route-filter route-filter-name } } *

undo preference

undo preference ase

Parameters

Parameter Description Value
preference

Specifies a priority for OSPFv3 routes.

The value is an integer ranging from 1 to 255.

route-policy route-policy-name

Specifies the name of a route-policy.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

route-filter route-filter-name

Specifies the name of a route-filter used to filter routes.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters.

ase

Sets a priority for AS external routes or NSSA routes.

-

Views

OSPFv3 view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

Multiple dynamic routing protocols may be run on the device. The system needs to set a default priority for each routing protocol. If different protocols have routes to the same destination, the protocol with the higher priority is selected to forward IP packets. To set a priority for OSPFv3 routes, run the preference command.

The smaller the priority value, the higher the priority.

Example

# Set a priority 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 >