max-metric router-lsa
(OSPFv2)
max-metric router-lsa
[
all-lsas
]
[
all-vrfs
]
[
external-lsa
metric-value
]
[
link
{
all
|
ptp
|
stub
|
transit
}
]
[
on-startup
{
time
|
wait-for-bgp
}
]
[
summary-lsa
metric-value
]
[
te-lsa
metric-value
]
no max-metric router-lsa
[
all-lsas
]
[
all-vrfs
]
[
external-lsa
metric-value
]
[
link
{
all
|
ptp
|
stub
|
transit
}
]
[
on-startup
{
time
|
wait-for-bgp
}
]
[
summary-lsa
metric-value
]
[
te-lsa
metric-value
]
- all-lsas
- Sets the external-lsa, summary-lsa, and te-lsa optional parameters to the corresponding default max-metric value.
- external-lsa metric-value
- Configures the maximum metric value for all external type-5 and type-7 LSAs. The range for metric value is 1 through 16777214 (0x00001 - 0x00FFFFFE), and the default is 16711680 (0x00FF0000).
- link
- Specifies the types of links for which the maximum metric is advertised. By default, the maximum metric is advertised only for transit links.
- summary-lsa metric-value
- Configures the maximum metric value for all summary type 3 and type 4 LSAs. The range for metric value is 1 through 16777214 (0x00001 - 0x00FFFFFE), and the default is 16711680 (0x00FF0000).
- te-lsa metric-value
-
Specifies that the TE metric field in the TE metric sub tlv for all type 10 Opaque LSAs LINK TLV originated by the router will be modified to the specified metric-value or a default value. The range for metric-value are 1 through 4294967295 (Hex: 0x00001 to 0xFFFFFFFF). The default value is 4294967295 (Hex: 0xFFFFFFFF). This parameter only applies to the default instance of OSPF.
OSPFv2 router configuration mode
OSPFv2 router VRF configuration mode
Use this command to enable OSPFv2 to advertise its locally generated router LSAs with a maximum metric to direct transit traffic away from the device, while still routing for directly connected networks. By advertising the maximum metric, the device does not attract transit traffic.
Any new OSPFv2 instance configured after the max-metric configuration is completed
requires that the
max-metric command be configured again to take in the new OSPFv2 instance.
The
no form of the command disables the advertising of the maximum metric value in different
LSAs.
The following example turns off the advertisement of special metric values in all router, summary, and external LSAs.
device# configure terminal device(config)# router ospf device(config-ospf-router)# no max-metric router-lsa
The following example configures an OSPFv2 device to advertise a maximum metric for 72 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 72
The following example indicates that OSPF is being shutdown and that all links in the router LSA should be advertised with the value 0xFFFF and the metric value for all external and summary LSAs is set to 0xFF0000 until OSPF is restarted. This configuration will not be saved.
device# configure terminal device(config)# ip router ospf device(config-ospf-router)# max-metric router-lsa external-lsa summary-lsa link all