preference (RIP view)

Function

The preference command specifies the priority for RIP routes. Alternatively, you can set a priority for a specific route using a route-policy.

The undo preference command restores the default setting.

By default, the priority of RIP routes is 100.

Format

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

undo preference

Parameters

Parameter Description Value
route-policy route-policy-name

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

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.

value

Specifies the priority of RIP routes.

The value is an integer ranging from 1 to 255.

Views

RIP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
rip write

Usage Guidelines

Usage Scenario

The smaller the priority value, the higher the priority. To enable RIP routes to have a higher priority than the routes learned by other IGPs, set a smaller priority value for the RIP routes. The priority determines the algorithm through which the optimal route is obtained from the routes in the IP routing table.

Prerequisites

Before setting a route priority using a route-policy, the route-policy must have been configured using the route-policy command.

Configuration Impact

If the preference command is run more than once, the latest configuration overrides the previous one.

Example

# Set the priority for the routes in RIP process 1 to 120 and apply the route-filter named filter2.
<HUAWEI> system-view
[~HUAWEI] xpl route-filter filter2
[~HUAWEI-xpl-filter] end-filter
[*HUAWEI] rip 1
[*HUAWEI-rip-1] preference route-filter filter2 120
# Set the priority for the routes in RIP process 1 to 120 and apply the route-policy named filter1.
<HUAWEI> system-view
[~HUAWEI] route-policy filter1 permit node 10
[*HUAWEI-route-policy] quit
[*HUAWEI] rip 1
[*HUAWEI-rip-1] preference route-policy filter1 5
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >