Command Reference OSPFv2 Commands
Use this command to define the cost ( OSPF metric ) of the default aggregate route advertised to the
stub area or not-so-stubby area ( NSSA ) in routing process configuration mode. Use the no form of
this command to restore the default setting.
area area-id default-cost cost
no area area-id default-cost
ID of the stub area or NSSA
Cost of the default aggregate route advertised to the stub area or
NSSA.
The range is from 0 to 16777215.
Routing process configuration mode
This command takes effect only on the Area Border Router ( ABR ) of the stub area or the
ABR/Autonomous System Border Router ( ASBR ) of the NSSA.
The ABR can advertise a Link State Advertisement ( LSA ) indicating the default route in the stub
area. The ABR/ASBR can advertise an LSA indicating the default route in the NSSA. You can use the
area default-cost command to modify the LSA cost.
The following example sets the cost of the default aggregate route to 50.
Ruijie(config)# router ospf 1
Ruijie(config-router)# network 172.16.0.0 0.0.255.255 area 0
Ruijie(config-router)#network 192.168.12.0 0.0.0.255 area 1
Ruijie(config-router)# area 1 stub
Ruijie(config-router)# area 1 default-cost 50
Sets an OSPF area as a stub area.
Sets an OSPF area as an NSSA.