< Home

ip route-static default-preference

Function

The ip route-static default-preference command sets the default preference for IPv4 static routes.

The undo ip route-static default-preference restores the default setting.

By default, the default preference of IPv4 static routes is 60.

Format

ip route-static default-preference preference

undo ip route-static default-preference

Parameters

Parameter Description Value
preference Specifies the default preference for IPv4 static routes. It is an integer ranging from 1 to 255. The smaller the value is, the higher the preference is.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Applicable Environment

You can change the status of a route by changing the preference of the route. You can use the ip route-static default-preference command to change the default preference of all the new IPv4 static routes.

Configuration Impact

After the ip route-static default-preference command is used, all the new IPv4 static routes that use the default preference are restored to a new default preference.

Precautions

After a default preference is specified, the new default preference is valid for subsequent rather than existing IPv4 static routes.

Example

# Set the default preference for IPv4 static routes to 70.

<sysname> system-view
[sysname] ip route-static default-preference 70
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >