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.device# configure terminal
device(config)# router ospf
device(config-router-ospf-vrf-default-vrf)# max-metric router-lsa all-lsas
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