The default-cost command sets the cost of the Type 3 default routes that OSPF sends to a Stub area.
The undo default-cost command restores the default setting.
By default, the cost of the Type 3 default routes that OSPF sends to a Stub area is 1.
default-cost costvalue
undo default-cost
Specifies the cost of the Type 3 default routes that OSPF sends to a Stub area.
The value is an integer ranging from 0 to 16777214.
OSPF area view
2: Configuration level
Usage Scenario
Configuring the cost of a default route can control OSPF route selection result, improving network flexibility.
Prerequisites
A default route exists in the local routing table.
<HUAWEI> system-view [~HUAWEI] ospf 100 [*HUAWEI-ospf-100] area 1 [*HUAWEI-ospf-100-area-0.0.0.1] stub [*HUAWEI-ospf-100-area-0.0.0.1] default-cost 20