< Home

default-cost (RIP)

Function

The default-cost command sets the cost for the imported routes.

The undo default-cost command restores the cost of imported routes to default value 0.

By default, the cost of RIP imported routes is 0.

Format

default-cost cost

undo default-cost

Parameters

Parameter Description Value
cost Specifies the default cost to be set. The value is an integer ranging from 0 to 15.

Views

RIP view

Default Level

2: Configuration level

Usage Guidelines

When routes are imported from other routing protocols and their costs are not specified, you can run the default-cost command to set the default cost for these imported routes.

All the following commands can set the cost of the imported route, which are listed in descending order of priorities.

  • Run the apply cost command to set the cost of a route.

  • Run the import-route (RIP) command to set the cost of the imported route.

  • Run the default-cost (RIP) command to set the cost of the default route.

Example

# Set the default cost of the imported routes to 2.

<sysname> system-view
[sysname] rip 100
[sysname-rip-100] default-cost 2

# Restore the cost of the imported routes to the default value.

<sysname> system-view
[sysname] rip 100
[sysname-rip-100] undo default-cost
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >