max-metric router-lsa (OSPF)

To configure the Open Shortest Path First (OSPF) protocol to advertise a maximum metric so that other routers do not prefer the router as an intermediate hop in their shortest path first (SPF) calculations, use the max-metric router-lsa command. To disable the advertisement of a maximum metric, use the no form of this command.

max-metric router-lsa [on-startup [seconds | wait-for bgp tag]]

no max-metric router-lsa [on-startup [seconds | wait-for bgp tag]]

Syntax Description

on-startup

(Optional) Configures the router to advertise a maximum metric at startup.

seconds

(Optional) Maximum metric (in seconds) that is advertised for the specified time interval. The configurable range is from 5 to 86400 seconds. The default is 600 seconds.

wait-for bgp tag

(Optional) Advertises a maximum metric until Border Gateway Protocol (BGP) routing tables have converged or the default timer has expired. The default timer is 600 seconds. The tag name can be a maximum of 20 characters.


Command Default

Originates router link-state advertisements (LSAs) with normal link metrics.

Command Modes

Router configuration mode
Router VRF configuration mode

Command History

Release
Modification

5.0(3)N1(1)

This command was introduced.


Usage Guidelines

Use the max-metric router-lsa command to originate LSAs with a maximum metric (LSInfinity: 0xFFFF) through all nonstub links. This command allows Border Gateway Protocol (BGP) routing tables to converge without attracting transit traffic (if there are not alternate lower cost paths to the router). The router advertises accurate (normal) metrics after the configured or default timers expire or after BGP sends a notification that routing tables have converged.


Note Directly connected links in a stub network are not affected by the configuration of a maximum or infinite metric because the cost of a stub link is always set to the output interface cost.


You can use the max-metric router-lsa command in the following situations:

•Reloading a router. After a router is reloaded, Interior Gateway Protocols (IGPs) converge very quickly, and other routers may try to forward traffic through the newly reloaded router. If the router is still building BGP routing tables, the packets that are destined for other networks that the router has not learned through BGP may be dropped.

•Introducing a router into a network without routing traffic through it. You might want to connect a router to an OSPF network but not want real traffic to flow through the router if there are better alternate paths. If no alternate paths exist, then this router would still accept transit traffic.

This command requires the LAN Base Services license.

Examples

This example shows how to configure a router that is running OSPF to advertise a maximum metric for 100 seconds:

switch(config)# router ospf 100
switch(config-router)# max-metric router-lsa on-startup 100
switch(config-router)#

This example shows how to configure a router to advertise a maximum metric until BGP routing tables converge or until the default timer expires (600 seconds):

switch(config)# router ospf 100
switch(config-router)# max-metric router-lsa on-startup wait-for bgp bgpTag
switch(config-router)#

Related Commands

Command
Description

copy running-config startup-config

Saves the configuration changes to the startup configuration file.

show ip ospf

Displays OSPF information.