Use undo default-cost to restore the default value.
Use of this command is only available on the ABR that is connected to a stub area.
You have two commands to configure a stub area: stub, defaulted-cost. You need to use the stub
command on routers connected to a stub area to configure the area as stub.
Related commands: stub.
Examples
# Configure Area1 as a stub area, and specify the cost of the default route advertised to the stub area
as 60.
<Sysname> system-view
[Sysname] ospfv3
[Sysname-ospfv3-1] area 1
[Sysname-ospfv3-1-area-0.0.0.1] stub
[Sysname-ospfv3-1-area-0.0.0.1] default-cost 60
default-route-advertise
Syntax
default-route-advertise [ always | cost value | route-policy route-policy-name | type type ] *
undo default-route-advertise
View
OSPFv3 view
Default level
2: System level
Parameters
always: Generates a default route in an ASE LSA into the OSPF routing domain regardless of whether the
default route exists in the routing table. Without this keyword, the command can distribute a default route
in a Type-5 LSA into the OSPF routing domain only when the default route exists in the routing table.
cost value: Specifies a cost for the default route, in the range of 1 to 16777214. The default is 1.
route-policy route-policy-name: Specifies a routing policy, a case-sensitive string of 1 to 63 characters.
type type: Specifies a type for the ASE LSA: 1 or 2. The default is 2.
Description
Use default-route-advertise to generate a default route into the OSPF routing domain.
Use undo default-route-advertise to disable OSPF from redistributing a default route.
By default, no default route is redistributed.
Using the import-route command cannot redistribute a default route. To do so, you need to use the
default-route-advertise command. If no default route exists in the router's routing table, use the
default-route-advertise always command to generate a default route in a Type-5 LSA.
You can reference a routing policy to set the cost and type of the default route:
The router advertises the default route only when it passes the routing policy.
•
The default route passing the routing policy uses the cost set by the apply cost clause, and the type
•
set by the apply cost-type clause in the routing policy.
229