9-5
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
cost
: Specifies a cost for the default route, in the range 1 to 16777214. The default is 1.
route-policy
route-policy-name
: Specifies a route policy, the name of which is a string of 1 to 19
characters.
type type
: Specifies a type for the ASE LSA: 1 or 2. The default is 2.
Description
Use the
default-route-advertise
command to generate a default route into the OSPF routing domain.
Use the
undo default-route-advertise
command 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:
z
The router advertises the default route only when it passes the routing policy.
z
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.
z
The default route cost’s priority from high to low is: the cost set by the
apply cost
clause in the
routing policy, the one set by the
default-route-advertise
command and the one set by the
default cost
command.
z
The default route type’s priority from high to low is: the type set by the
apply cost-type
clause in
the routing policy, and the one set by the
default-route-advertise
command.
z
If the
always
keyword is included, the default route is advertised regardless of whether it passes
the routing policy and uses the cost and type specified by the
apply cost
,
apply cost-type
clauses in the first node of the routing policy.
Related commands:
import-route
.
Examples
# Generate a default route into the OSPFv3 routing domain.
<Sysname> system-view
[Sysname] ospfv3 1
[Sysname-ospfv3-1] default-route-advertise always
display ospfv3
Syntax
display ospfv3
[
process-id
]