OcNOS-RON : Layer 3 Guide : Open Shortest Path First Command Reference : OSPFv2 Commands : max-metric
max-metric
Use this command to advertise a maximum cost i.e 65535 for the LSA's that the router generates. This feature can be configured for in a router-LSA, summary-LSA, external-LSA and stub links.
It also provides support to configure an on-startup time. On-startup time is a one-time event which occurs when the node is up initially. The time configured will be the duration till which the router advertises its LSA’s with the maximum cost.
Based on the metric that is advertised, the neighboring OSPF routers re-trigger their SPF's, and calculate routes that don't pass through the new router.
Use the no parameter with this command to remove the configuration.
Command Syntax
max-metric router-lsa (on-startup (<5-86400>)|) ({ external-lsa (<1-16777215>|) | summary-lsa (<1-16777215>|) | include-stub }|)
no max-metric router-lsa (on-startup |) ({ external-lsa | summary-lsa | include-stub }|)
Parameters
router-lsa router-lsa
external-lsa External LSA max metric. <0-16777215> External LSA max metric
values
include-stub Set the metric of a stub link in the router LSA to the default
max-metric value
on-startup Startup metric values for router LSA
summary-lsa Summary LSA max metric. <0-16777215> Summary LSA max metric
values
Default
No default value.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 6.0.0.
Examples
 
OcNOS(config)#router ospf 1
OcNOS(config-router)#max-metric router-lsa summary-lsa 2000 external-lsa 300 include-stub
OcNOS(config-router)#commit
OcNOS(config-router)#
OcNOS(config-router)#do sh run ospf
!
router ospf 1
max-metric router-lsa include-stub external-lsa 300 summary-lsa 2000
redistribute connected
network 100.0.0.0/24 area 0.0.0.0
network 133.0.0.0/24 area 0.0.0.0
!
OcNOS(config-router)#no max
max-concurrent-dd max-metric maximum-area
OcNOS(config-router)#no max-metric router-lsa
OcNOS(config-router)#commit
OcNOS(config-router)#do sh run ospf
!
router ospf 1
redistribute connected
network 100.0.0.0/24 area 0.0.0.0
network 133.0.0.0/24 area 0.0.0.0
!
 
OcNOS(config-router)#max-metric router-lsa on-startup 300 external-lsa 200
OcNOS(config-router)#commit
OcNOS(config-router)#
OcNOS(config-router)#do sh run ospf
!
router ospf 1
max-metric router-lsa
max-metric router-lsa on-startup 300 external-lsa 200
redistribute connected
network 100.0.0.0/24 area 0.0.0.0
network 133.0.0.0/24 area 0.0.0.0
!
 
OcNOS(config-router)#no max-metric router-lsa on-startup
OcNOS(config-router)#commit
OcNOS(config-router)#
OcNOS(config-router)#do sh run ospf
!
router ospf 1
max-metric router-lsa
redistribute connected
network 100.0.0.0/24 area 0.0.0.0
network 133.0.0.0/24 area 0.0.0.0
!
 
Last modified date: 08/28/2023