default-route-advertise (OSPF view)

Use default-route-advertise to redistribute a default route into the OSPF routing domain.

Use undo default-route-advertise to restore the default.

Syntax

default-route-advertise [ [ always | permit-calculate-other ] | cost cost-value | route-policy route-policy-name | type type ] *

default-route-advertise [ summary cost cost-value ]

undo default-route-advertise

Default

No default route is redistributed into the OSPF routing domain.

Views

OSPF view

Predefined user roles

network-admin

Parameters

always: Redistributes a default route in a Type-5 LSA into the OSPF routing domain regardless of whether a default route exists in the routing table. If you do not specify this keyword, the router redistributes a default route only when an active default route that does not belong to the current OSPF process exists in the IP routing table.

permit-calculate-other: Enables OSPF to calculate default routes received from other routers. If you do not specify this keyword, OSPF does not calculate default routes from other routers. If the router does not redistribute any default route in a Type-5 LSA into the OSPF routing domain, the router calculates default routes from other routers. It calculates these routes regardless of whether this keyword is specified.

cost cost-value: Specifies a cost for the default route, in the range of 0 to 16777214. If you do not specify this option, the default cost specified by the default-cost command applies.

route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters. When the routing policy is matched and one of the following conditions is met, the command redistributes a default route in a Type-5 LSA into the OSPF routing domain:

The routing policy modifies values in the Type-5 LSA.

type type: Specifies a type for the Type-5 LSA: 1 or 2. If you do not specify this option, the default type for the Type-5 LSA specified by the default type command applies.

summary: Advertises the specified default route in a Type-3 LSA. This keyword is available only for VPNs.

Usage guidelines

This command redistributes a default route in a Type-5 LSA, which cannot be redistributed with the import-route command. If the local routing table has no default route, you must specify the always keyword for the command.

The default-route-advertise summary cost command is applicable only to VPNs. It enables a PE router to redistribute a default external route in a Type-3 LSA to CE routers.

Examples

# Redistribute a default route into the OSPF routing domain, regardless of whether the default route exists in the local routing table.

<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] default-route-advertise always

Related commands

default

import-route