cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
704
Views
0
Helpful
2
Replies

OSPF external route determination

james-greene
Level 1
Level 1

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?

example:

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.

Thanks,

Jim

2 Replies 2

Richard Burts
Hall of Fame
Hall of Fame

Jim

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.

HTH

Rick

HTH

Rick

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.