area <AREA-ID> default-metric

Syntax

area <AERA-ID> default-metric <COST>

no area <AREA-ID> default-metric

Description

Sets the cost of the default route announced to NSSA or stub areas.

The no form of this command resets the cost of the default route announced to NSSA or stub areas, to the default value of 1.

Command context

config-ospf

Parameters

<AREA-ID>
Specifies area ID in one of the following formats.
  • OSPF area identifier in IPv4 format (x.x.x.x), where x is a decimal number from 0 to 255.

  • OSPF area identifier in decimal format. Range: 0 to 4294967295.

default-metric <COST>

Sets the cost of default-summary LSAs announced to NSSA or stub areas, to the specified value. Default cost: 1. Range: 0 to 16777215.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Setting cost for default LSA summary:

switch(config)# router ospf 1
switch(config-ospf-1)# area 1 default-metric 2
switch(config-ospf-1)# area 0.0.0.1 default-metric 2

Setting cost for default LSA summary to default:

switch(config)# router ospf 1
switch(config-ospf-1)# no area 1 default-metric
switch(config-ospf-1)# no area 0.0.0.1 default-metric