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.

About this task

Note

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.

Procedure

  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the 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 all-lsas parameter to set the set the summary-lsa and external-lsa parameters to the corresponding default max-metric value. .
    device(config-router-ospf-vrf-default-vrf)# max-metric router-lsa all-lsas

Example

The following example configures an OSPFv2 device to advertise the maximum metric value using the all-lsas parameter.

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