The default-route-advertise command advertises default routes to a common OSPF area.
The undo default-route-advertise command disables advertisement of default routes to a common OSPF area.
By default, the OSPF devices in common OSPFv3 areas do not generate default routes.
default-route-advertise [ [ always | permit-calculate-other ] | cost costvalue | type typevalue | { route-policy route-policy-name | route-filter route-filter-name } | distribute-delay delaytimer | tag tagvalue ] *
default-route-advertise summary cost costvalue
default-route-advertise [ permit-calculate-other | cost costvalue | type typevalue | { route-policy route-policy-name | route-filter route-filter-name } | distribute-delay delaytimer | permit-ibgp ] *
undo default-route-advertise
Parameter | Description | Value |
---|---|---|
always |
Generates and advertises an LSA that describes a default route, regardless of whether the local device has active default routes from processes other than the local OSPF process. |
- |
permit-calculate-other |
Generates and advertises an ASE LSA that describes the default route only when there is an active default route of another OSPF process in the local routing table. The Router still calculates the default routes from other Routers. If neither always nor permit-calculate-other is configured,
|
- |
cost costvalue |
Specifies the cost of external routes.
|
The value is an integer ranging from 0 to 16777214. The default value is 1. |
type typevalue |
Specifies the type of the external routes. |
The value is 1 or 2.
The default value is 2. |
route-policy route-policy-name |
Specifies the name of a route-policy. When a device's routing table contains matching default routes that are generated from processes other than the local OSPF process, a device advertises the default routes based on the route-policy configuration. |
The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
route-filter route-filter-name |
Specifies the name of route filter policy. |
The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters. |
distribute-delay delaytimer |
Specifies the delay timer for advertising the default route. |
The value is an integer ranging from 1 to 65535, in seconds. |
tag tagvalue |
Specifies the tag value of the imported VPN routes. |
The value is an integer ranging from 0 to 4294967295. The default value is 1. |
summary |
Advertises the Type 3 summary LSA of the specified default route. Before specifying this parameter, ensure that VPN is enabled. Otherwise, routes cannot be advertised. |
- |
permit-ibgp |
Imports IBGP routes. |
- |
Usage Scenario
The import-route (OSPF) command cannot be used to import a default route from another AS. Running the default-route-advertise command on an ASBR can advertise a non-OSPF default route in a common OSPF area.
If the ASBR has a default route, the default-route-advertise command enables the ASBR to advertise the default route 0.0.0.0 to the OSPF area. If the ASBR has no default route, the default-route-advertise always command or the default-route-advertise command can be used:Prerequisites
Before advertising a default route, OSPF compares the priorities of default routes in an OSPF area and then advertises a default route with the highest priority. If a static default route is configured on an OSPF device, ensure that the priority of the static default route is lower than that of the default route to be advertised by OSPF. This ensures that the default route advertised by OSPF will be added to the routing table of the OSPF device.
Configuration Impact
After the default-route-advertise command is configured on the ASBR, the ASBR will generate a Type 5 ASE LSA with link state ID 0.0.0.0 and mask 0.0.0.0. In addition, it will advertise the ASE LSA in an entire OSPF area.
If a route-policy is configured, default routes are advertised based on the following principles:Precautions
In different OSPF areas, OSPF advertises default routes using different modes. This default-route-advertise command can be used to advertise default routes in a common OSPF area. In the Stub, Totally Stub, or Totally NSSA, default routes are advertised automatically. In an NSSA, the nssa default-route-advertise command is used to advertise default routes.