Configuring the OSPFv2 Max-Metric Router LSA

By configuring the OSPFv2 max-metric router LSA you can enable OSPFv2 to advertise its locally generated router LSAs with a maximum metric.

NOTE
You can configure OSPFv2 max-metric router LSA in either startup or non-startup mode. When you configure max-metric in non-startup mode, it only applies once and is not persistent across reloads or after the clear ip ospf all command is issued.
  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the ip router ospf command to enter OSPF router configuration mode and enable OSPFv2 on the device.
    device(config)# router ospf
  3. Enter the max-metric router-lsa command with the on-startup keyword and specify a value to specify a period of time to advertise a maximum metric after a restart before advertising with a normal metric.
    device(config-ospf-router)# max-metric router-lsa on-startup 85

The following example configures an OSPFv2 device to advertise a maximum metric for 85 seconds after a restart before advertising with a normal metric.

device# configure terminal
device(config)# router ospf 
device(config-ospf-router)# max-metric router-lsa on-startup 85