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:-
- Is there a purpose to this weird scheme, and of course what is it?
- 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.
- 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?
- (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.