default-information-originate (OSPFv2)

Controls distribution of default information to an OSPFv2 device.

Syntax

default-information-originate [ always ] [ metric metric ] [ metric-type { type1 | type2 } ] [ route-map name ]
no default-information-originate

Command Default

The default route is not advertised into the OSPFv2 domain.

Parameters

always
Always advertises the default route. If the route table manager does not have a default route, the router advertises the route as pointing to itself.
metric metric
specifies the cost for reaching the rest of the world through this route. If you omit this parameter and do not specify a value using the default-metric router configuration command, a default metric value of 1 is used. Valid values range from 1 through 65535. The default is 10.
metric-type
Specifies how the cost of a neighbor metric is determined. The default is type1. However, this default can be changed with the metric-type command.
type1
Type 1 external route.
type2
Type 1 external route,
route-map name
Specifies that the default route is generated if the route map is satisfied. This parameter overrides other options. If the set metric and set metric-type commands are specified in the route-map, the command-line values of metric and metric-type if specified, are “ignored” for clarification.

Modes

OSPF router configuration mode

OSPF router VRF configuration mode

Usage Guidelines

This configuration provides criteria for the redistribution of any default routes found in the route table manager (RTM),whether static or learned from another protocol, to its neighbors.

The corresponding route-map should be created before configuring the route-map option, along with the default-information-originate command. If the corresponding route-map is not created beforehand, an error message is displayed stating that the route-map must be created.

The route-map option cannot be used with a non-default address in the match conditions. The default route LSA is not generated if a default route is not present in the routing table and a match ip address condition for an existing non-default route is configured in the route-map. The match ip address command in the route-map is a no-op operation for the default information originate command.

The no form of the command disables default route origination.

Examples

The following example creates and advertises a default route with a metric of 30 and a type 1 external route.

device# configure terminal
device(config)# router ospf
device(config-router-ospf-vrf-default-vrf)# default-information-originate metric 30 metric-type type1