What's the largest OSPF metric value?

Is it LSInfinity?
What's the value of LSInfinity?
What happens to a route when its metric reaches LSInfinity?

The questions popped up while I was reading previous thread about EIGRP offset.



  • These seemingly simple questions are actually a little more complicated than I thought. After labbing it up in GNS3 and playing with various combinations, below is what I have come up with. Comments/corrections are welcome [:)]


    1. When it comes to OSPF metric, there are two distinct rules at play here. The maximum metric for routes in the OSPF database is 0xFFFFFE which is 16777214 in decimal. A route with metric value of 16777215 (LSInfinity) is deemed inaccessible therefore excluded from the OSPF database; On the other hand, Cisco router will happily insert in the routing table OSPF route with metric greater than 16777215. This can happen when the sum of advertised metric and accumulative link metrics exceeds 16777215.

    2. The advertised metric will remain unchanged within an area for links in router-LSA and summary-LSA, and remain unchanged throughout the entire domain for external OSPF routes.

    3. The accumulative metrics derived from link bandwidth will be accounted  for under the following conditions:
       - When non-type-2-external OSPF routes are moved from the OSPF database to the routing table
       - When links in router-LSA are converted to summary-LSA at the ABR
    The accumulative link costs are calculated as follows:
       - For intra-area routes, the costs are the sum of link metric from the current router to the advertising router
       - For inter-area routes, the costs are the sum of link metric from the current router to the ABR
       - For type-1 external routes, the costs are the sum of link metrics from the current router to the ASBR

    4. The "max-metric router-lsa" command can be used to set the "seed"/advertised metric for intra-area, summary and external OSPF routes. By default, the mac-metric is only applied to the non-stub links in the router-LSA, unless the include-stub, external-lsa or summary-LSA option is used, in which case the max-metric will be applied to the stub links in router-LSA, external-LSA, or router-LSA respectively.

    5. Metric value specified in "max-metric router-lsa" command takes precedence over metric specified in redistribute command

  • Is it LSInfinity?

    Take a look at this post http://thenetworksherpa.com/ospf-lsinfinity-not-equal-lsinfinity/

    It appears that there are overloaded meanings!

  • Yes.  0xFFFF is just the MAX metric value router links can have due to LSA packet limitation. Also calling it LSInfinity is an unfortunate and messed up use of terminology IMHO, as this has nothing to do with (un)reachablility. But then who am I to speak? I don't even speak English very well :)

  • Yes.  0xFFFF is just the MAX metric value router links can have due to LSA packet limitation

    Also applies to virtual links too :-)

  • Believe VL derives its metric from the underline intra-area path. Haven't tested if you can change metric on VL alone.

  • Right. If I remember it corerctly, giving virtual link a metric of 65535 indeed brings down the link. So in this case, 65535 equals LSInfinity!

  • 65535 equals LSInfinity!

    Which was exactly my point!

    Of course I thought this was the "infinite" metric across the board in OSPF!

  • Cristian,

    Thanks for the great explanation! Wonder if you can take a look at this question forumites had awhile back?



    ...What's the point of advertising summary-LSAs into the "transit" area when transit capability is turned off? Under such circumstance, passthtough traffic has to follow the path of virtual-link, there will be even fewer reason for routers within the "transit" area to know about these summary-LSAs than when transit capability is enabled?

  • Hi,

        I don't quire have the time to read long topics. Give me a brief overview of what the problem is and what is unclear to you.


  • Check my post here:


    Thanks for the clarification!

Sign In or Register to comment.