184 CHAPTER 6: USING ROUTING PROTOCOL COMMANDS
Description
Use the default-cost command to configure the cost of the route transmitted by
OSPF to a Stub or NSSA area.
Use the undo default-cost command to restore the default cost of the default
route transmitted by OSPF to a Stub or NSSA.
Related commands: stub, nssa.
Example
To set area 1 as a Stub area, and to set the cost of the default route transmitted to
this Stub area to 60, enter the following commands:
<SW5500>system-view
System View: return to User View with Ctrl+Z.
[SW5500]router id 1.1.1.1
[SW5500]ospf
[SW5500-ospf-1]area 1
[SW5500-ospf-1-area-0.0.0.1]network 20.0.0.0 0.255.255.255
[SW5500-ospf-1-area-0.0.0.1]stub
[SW5500-ospf-1-area-0.0.0.1]default-cost 60
default-route-advertise Syntax
default-route-advertise [ always | cost
value
| type
type_value
|
route-policy
route_policy_name
]*
undo default-route-advertise [ always | cost | type | route-policy ]*
View
OSPF view
Parameters
always Enter to generate an ASE LSA which describes the default route and
advertise it if the local router is not configured with the default route. If this
parameter is not set, the local router cannot import the ASE LSA, which generates
the default route only when it is configured with the default route.
cost
value
Enter the cost value of the ASE LSA, in the range 0 to 16777214. The
default value is 1.
type
type_value
Enter the external type of this ASE LSA, which can be either 1 or
2. The default value is 2.
route-policy
route_policy_name
Enter to have the route-policy effect the
value in ASE LSA if the default route matches the route-policy specified by
route-policy-name. The length of
route_policy_name
parameter ranges from 1
to 16 character string.
Description
Use the default-route-advertise command to import the default route into
the OSPF Autonomous System.
Use the undo default-route-advertise command to cancel the import of
default route. This is the default.