max-metric router-lsa

Advertises the maximum metric value in different Link State Advertisements (LSAs).

Syntax

max-metric router-lsa [ all-vrfs ] [ all-lsas | external-lsa metric-value | link { all | ptp | stub | transit } | summary-lsa metric-value | on-startup { time | wait-for-bgp [ all-lsas | summary-lsa metric-value | external-lsa metric-value | link { all | ptp | stub | transit } ] } ]
no max-metric router-lsa [ all-vrfs ] [ all-lsas | external-lsa | link { all | ptp | stub | transit } | summary-lsa | on-startup { time | wait-for-bgp [ all-lsas | link [ all ] ] } ]

Parameters

all-vrfs
Applies the configuration change to all instances of OSPF.
all-lsas
Sets the summary-lsa and external-lsa optional parameters to the corresponding default max-metric value. For a non-default instance of OSPF, only the summary-lsa and external-lsa parameters are set.
external-lsa metric-value
Modifies the metric of all external type 5 LSAs to equal the specified value or a default value. The range for metric value is 1 to 16777214 (0x00001 - 0x00FFFFFE), and the default is 16711680 (0x00FF0000).
link
Specifies the types of links for which the maximum metric is advertised. By default, the maximum metric is advertised only for transit links.
all
Advertises the maximum metric in Router LSAs for all supported link types.
ptp
Advertises the maximum metric in Router LSAs for point-to-point links.
stub
Advertises the maximum metric in Router LSAs for stub links.
transit
Advertises the maximum metric in Router LSAs for transit links. This is the default link type.
summary-lsa metric-value
Modifies the metric of all summary type 3 and type 4 LSAs to equal the specified value or a default value. The range for metric value is 1 to 16777215 (0x00001 - 0x00FFFFFE), and the default is 16711680 (0x00FF0000).
on-startup
Applies the configuration change at the next OSPF startup.
time
Sets the time (in seconds) for which the specified links in Router LSAs are advertised when the metric is set to the maximum value of 0xFFFF. The range for time is 5 to 86,400.
wait-for-bgp
Indicates that OSPF should wait for either 600 seconds or until BGP has finished route table convergence, whichever happens first, before advertising the links with the normal metric.

Modes

OSPF router configuration mode

OSPF VRF router configuration mode

Usage Guidelines

Use this command to set the maximum metric value advertised in different Link State Advertisements (LSAs). When enabled, the router configures the maximum value of the metric for routes and links advertised in various types of LSAs. Because the route metric is set to its maximum value, neighbors will not route traffic through this router except to directly connected networks. Thus, the device becomes a stub router, which is desirable when you want:

Enter no max-metric router-lsa all-lsas to disable advertising the maximum metric value in different LSAs.

Examples

The following example advertises the maximum metric value using the all-lsas option.

device# configure terminal
device(config)# router ospf
device(config-router-ospf-vrf-default-vrf)# max-metric router-lsa all-lsas