< Home

preference (RIP)

Function

The preference command sets the preference for RIP routes.

The undo preference command restores the default preference of RIP routes.

The default preference for RIP routes is 100.

Format

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

undo preference

Parameters

Parameter Description Value

preference

Specifies the preference for routes.

The value is an integer ranging from 1 to 255. By default, it is 100.

route-policy route-policy-name

Specifies the routing policy that sets preference for the routes meeting conditions.

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

RIP view

Default Level

2: Configuration level

Usage Guidelines

A small value indicates a high preference. To enable RIP routes to have a higher preference than the routes learned by other IGP protocols, you need to configure a smaller preference value for the RIP routes. The preference determines the algorithm through which the optimal route is obtained among the routes in the IP routing table.

Example

# Set the preference of RIP routes to 120.

<HUAWEI> system-view
[HUAWEI] rip 1
[HUAWEI-rip-1] preference 120

# Set the preference of RIP routes that match the routing policy named rt-policy1 to 120.

<HUAWEI> system-view
[HUAWEI] rip 1
[HUAWEI-rip-1] preference 120 route-policy rt-policy1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >