OSPF E1/E2 route calculation

Hi,

I have been doing a bit of detailed work on OSPF and have found a bit of a surprise.

OSPF E2 routes are advertised into the OSPF autonomus system with a particular cost and that cost is not changed no matter were in the AS the cost is inspected.

If such a route is in the routing table it's cost is the same everywhere in the AS. e.g. 0.0.0.0 below.

External Router | | | | | Core2 O*E2 0.0.0.0/0 [110/1] | O E1 208.134.161.0 [110/2] | | | | Core1 O*E2 0.0.0.0/0 [110/1] O E1 208.134.161.0 [110/5]

OK. So far so good. I guess that there is some reason for having this facility for some routes but I don't see what it is.

Thing is that it turns out that it doesn't actually behave according to these costs.

The choice of next hop for E2 destinations is not based on the "OSPF Cost" shown here at all.

It is based on the OSPF cost, yes really this time, of reaching the Advertising router that is advertising the E2 route. There are a couple of variations possible.

You won't believe me (I wouldn't have) details are here:-

formatting link
I have I guess three questions.

  1. Is there a purpose to this weird scheme, and of course what is it?

  1. If not already obvious, why have two variations (see the doc). i.e. Cost to Advertising router or cost to /its/ next hop for the route.

  2. Do E1 routes also use this (madcap?) scheme? The docs say that the "OSPF Cost" increases unlike E2 routes, to take into account additional links however it does not seem to say anywhere that I have looked which method is actually used to determine the next hop to E1 destinations. Is it the normal OSPF method or are the "costs" once again ignored and some other parameter used?

  1. (I said 3 but;-) How should the choice of E1 or E2 be made in any particular case?

The odd thing about the E2 case which I at least think I follow, is that the end result seems to be pretty much the same as if the normal OSPF calculations were followed. That is, the costs were just incremented normally.

Thanks.

Reply to
Bod43
Loading thread data ...

the idea is some external "costs" are of the same order as OSPF internal routes (e1) - so you can add the numbers together and get a useful path cost.

e2s are for the other case - what dominates about which is best is the external cost - if you have routes, the lower cost E2 is the best one to use - no matter where you are in the OSPF domain. Imagine a main Internet feed and a backup that you only want to use when the main is down.

Yes - you need to have a concept of optimal path to decide which way to send a packet.

But if you have a e2 cost=1 and one cost=2 - always send it to the cost=1 case.

yes see above.

Also an E1 always is a "better" route than an E2, so you have some new ways to bias route selection.

the original idea was internal routes (ie inside this ISP, but not OSPF), and external routes - ie from BGP.

No

you add the OSPF path to the adverting router to the E1 value to get the route cost.

it depends :). Sometimes E2s are good since you can bias all paths to use 1 over another irrespective of the internal topology.

E1s are more like other protocols, and are often better.

Finally you can mix E1s and E2s.....

OSPF always uses Dykstra (at least within an area) - or you break the underlying assumptions that the protocol relies on.

Reply to
stephen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.