< Home

default-route-advertise (OSPFv3)

Function

The default-route-advertise command advertises the default route to the OSPFv3 route area.

The undo default-route-advertise command cancels the advertised default route.

Format

default-route-advertise [ always | cost cost | type type | tag tag | route-policy route-policy-name ] *

undo default-route-advertise [ always | cost [ cost ] | type [ type ] | tag [ tag ] | route-policy [ route-policy-name ] ] *

Parameters

Parameter Description Value

always

Enables the device to generate and advertise an LSA that describes a default route, regardless of whether the local device has active default routes learned from a non-local OSPFv3 process. If always is configured, the router does not calculate default routes from other routers. If this keyword is not specified, the device generates an LSA that describes a default route only when the local device has active default routes learned from a non-local OSPFv3 process.

-

cost cost

Specifies the cost of the external route.

  • The cost of a Type 1 external route equals the cost for the local router to reach the corresponding ASBR plus the cost from the ASBR to the destination address of the Type 1 external route.

  • The cost of a Type 2 external route equals the cost from the ASBR to the destination address of the Type 2 external route.

The value is an integer ranging from 1 to 16777214.

type type

Specifies the type of the external route.

The value is an integer ranging from 1 to 2.

  • 1: Type 1 external route
  • 2: Type 2 external route

By default, it is 2.

tag tag

Specifies the tag value of the imported VPN routes.

The value is an integer ranging from 0 to 4294967295. By default, it is 1.

route-policy route-policy-name

Specifies the name of a routing policy, according to whose parameters the device advertises default routes when there are matched default OSPFv3 routes generated by a non-local OSPFv3 process.

The route-policy-name is a string of 1 to 40 characters.

Views

OSPFv3 view

Default Level

2: Configuration level

Usage Guidelines

Before a default route is advertised to an OSPFv3 routing domain, the preference of default routes is compared. For example, if a default route is advertised to an OSPFv3 routing domain and an OSPFv3 router within the domain is configured with a static default route, ensure that the preference of the configured static default route is lower than that of the default route advertised by OSPFv3 in order to add the default route to the current routing table.

The default route installed through the import-route command cannot be advertised. To advertise the default route, you must run the default-route-advertise command. The cost and type parameters in the default-route-advertise command specify the metric of the generated default route and the value of the default tag is one. When the local routing table does not contain default routes learned from a non-local OSPFv3 process, specify always to generate ASE LSAs of default routes.

When a routing policy is used to filter existing active default routes learned from a non-local OSPFv3 process, routes are matched according to the following rules:

  • If the default route matches the policy, the local router can generate a default route according to the parameters set in the routing policy, such as cost, tag, and type.

  • If the default route does not match the policy and always is not set, the local router does not generate any default route.

  • If the default route does not match the policy and always is set, the router generates a default route. The parameters of the generated default route are determined by the default-route-advertise [ always | cost cost | type type | route-policy route-policy-name ] * command.

The preferences of the parameters of the default route configured in the routing policy are greater than those of parameters set in the default-route-advertise [ always | cost cost | type type | route-policy route-policy-name ] * command.

You can advertise a default route by using Type 3 LSA. The PE advertises the imported default route to the CE.

Precautions

Creating a route-policy before it is referenced is recommended. If a nonexistent route-policy is referenced using the command, the device advertises the default IPv6 route as long as a default IPv6 route that is not generated by the current OSPFv3 process exists in the local routing table.

Example

# Import the ASE LSA which generates the default route to the OSPFv3 area. The local router does not have a default route.

<sysname> system-view
[sysname] ospfv3 1
[sysname-ospfv3-1] default-route-advertise always
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >