< Home

default-cost (RIPng)

Function

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

The undo default-cost command restores the default value 0.

By default, the default cost of RIPng routes is 0.

Format

default-cost cost

undo default-cost

Parameters

Parameter Description Value
cost Specifies the default cost of the imported route. The value is an integer ranging from 0 to 15.

Views

RIPng 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 (RIPng) 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 command to set the cost of the imported route.

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

Example

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

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

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

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