preference

Use preference to set a preference for OSPFv3 routes.

Use undo preference to remove the configuration.

Syntax

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

undo preference [ ase ]

Default

The preference is 10 for OSPFv3 internal routes and 150 for OSPFv3 external routes.

Views

OSPFv3 view

Predefined user roles

network-admin

Parameters

ase: Specifies a preference for OSPFv3 external routes. If you do not specify this keyword, the command sets a preference for OSPFv3 internal routes.

preference: Specifies the preference value in the range of 1 to 255. A smaller value represents a higher preference.

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to set a preference for matching routes.

Usage guidelines

If multiple routing protocols find multiple routes to the same destination, the router uses the route found by the protocol with the highest preference.

Examples

# Set a preference of 150 for OSPFv3 routes.

<Sysname> system-view
[Sysname] OSPFv3
[Sysname-OSPFv3-1] preference 150