default-cost (OSPF area view)

Use default-cost to set a cost for the default route advertised to the stub or NSSA area.

Use undo default-cost to restore the default value.

Syntax

default-cost cost-value

undo default-cost

Default

The cost is 1.

Views

OSPF area view

Predefined user roles

network-admin

Parameters

cost-value: Specifies a cost for the default route advertised to the Stub or NSSA area, in the range of 0 to 16777214.

Usage guidelines

This command takes effect only on the ABR of a stub area or the ABR or ASBR of an NSSA area.

Examples

# Configure Area 1 as a stub area, and set the cost of the default route advertised to the stub area to 20.

<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] stub
[Sysname-ospf-100-area-0.0.0.1] default-cost 20

Related commands

nssa

stub