OSPF external route determination

Unanswered Question
Oct 25th, 2007
User Badges:

I was reading the Q&A for OSPF and came across the question regarding two external routes for the same destination being advertised from two different ASBRs. The answer states that the preferred routes is the one from the ASBR with the shortest path.

My questions is if these are E1 routes wouldn't cost also be a factor? Is there ever a situation where two E1 routes have different costs that are ignored, and only path length is considered?


E1 route x.x.x.x

1st choice cost=100 path to ASBR=75

2nd choice cost=1000 path to ASBR=20

2nd choice is used.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Richard Burts Fri, 10/26/2007 - 08:24
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN


Without knowing more about the context of what you were reading it is possible that my answer may be a bit off the mark. But I believe that in general there is an assumption that a shorter path generally will produce a lower cost path. In that sense it may be true that "the preferred routes is the one from the ASBR with the shortest path". But I do not know of any situation where the actual path length is considered in choosing OSPF routes. It is always a question of Cost. (Well actually it is a question of route type (O, IA, E1, E2) and then of cost) So in your example 2nd choice will be used.



Joseph W. Doherty Fri, 10/26/2007 - 17:37
User Badges:
  • Super Bronze, 10000 points or more

The shortest path may not be the OSPF selected best path.

OSPF makes it path choice upon its cost metric. For internal links, the total path cost is the addition of all the individual link costs. Depending on how the individual links are costed, a longer path could be consider better than a shorter path. (Or they could be the same overall cost, or the shorter could be better too.) (The Cisco OSPF implementation usually generates cost based on link bandwidth with 100 Mbps being cost 1, 10 Mbps being cost 10, etc.)

"External routes fall under two categories, external type 1 and external type 2. The difference between the two is in the way the cost (metric) of the route is being calculated. The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. A type 1 cost is the addition of the external cost and the internal cost used to reach that route. A type 1 route is always preferred over a type 2 route for the same destination."

For the same external type, choice of exit would be based on its overall cost. For E2s, cost would be whatever was selected regardless of actual path length.


This Discussion