M Commands

This chapter describes the Cisco NX-OS Open Shortest Path First (OSPF) commands that begin with M.

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

VRF configuration mode

 
Command History

Release
Modification

5.2(1)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.

maximum-paths (OSPF)

To control the maximum number of parallel routes that Open Shortest Path First (OSPF) can support, use the maximum-paths command. To remove the maximum-paths command from the configuration file and restore the system to the default, use the no form of this command.

maximum-paths maximum

no maximum- paths

 
Syntax Description

maximum

Maximum number of parallel routes that OSPF can install in a routing table. The range is from 1 to 16 routes.

 
Command Default

8 paths

 
Command Modes

Router configuration mode

VRF configuration mode

 
Command History

Release
Modification

5.2(1)N1(1)

This command was introduced.

 
Usage Guidelines

Use the maximum-paths command to allow OSPF to install multiple paths into the routing table for each prefix. Multiple paths are installed for both internal and external routes that are learned in the same autonomous system and that have an equal cost (according to the OSPF shortest path first algorithm).

This command requires the LAN Base Services license.

Examples

This example shows how to allow a maximum of 10 paths to a destination:

switch# configure terminal
switch(config)# router ospf 1
switch(config-router)# maximum-paths 10
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.

 

message-digest-key (OSPF virtual link)

To enable Open Shortest Path First (OSPF) Message Digest 5 (MD5) authentication on a virtual link, use the message-digest-key command. To remove an old MD5 key, use the no form of this command.

message-digest-key key-id md5 [ 0 | 3 ] key

no message-digest-key key-id

 
Syntax Description

key-id

Identifier in the range from 1 to 255.

0

(Optional) Specifies to use an unencrypted password to generate the md5 key.

3

(Optional) Specifies to use an encrypted 3DES password to generate the md5 key.

key

Alphanumeric password of up to 16 bytes.

 
Command Default

Unencrypted

 
Command Modes

Virtual link configuration mode

 
Command History

Release
Modification

5.2(1)N1(1)

This command was introduced.

 
Usage Guidelines

When you configure the MD5 digest authentication mode, make sure that both interfaces on the virtual link have the same key value.

This command requires the LAN Base Services license.

Examples

This example shows how to set key 19 with the password 8ry4222:

switch(config-router)# area 22 virtual-link 192.0.2.2
switch(config-router-vlink)# message-digest-key 19 md5 8ry4222
switch(config-router-vlink)#
 

 
Related Commands

Command
Description

authentication (virtual-link)

Configures the authentication mode on a virtual link.