I'm hoping someone can clarify the selection criteria for which ASBR to use for E2 routes in OSPF.
I'm injecting BGP routes in to a network at two points and redistributing them in to OSPF as E2s. I've decided to let OSPF determine which route to install, i.e. devices should just route to their nearest exit point.
As the routes have an identical metric of 1, then the route installed should be determined by the cost to the ASBR. This appears to be happening, but I'd appreciate clarification that the ASBR selection is based purely on the cost to the ASBR and not on whether the ASBR route is intra over inter area, i.e. an inter area route to an ASBR with a lower cost will be preferred over an intra area route with a higher cost.
Thanks in advance
By default when redistributing into OSPF , the default type is 2 and metric 20 ( except when redistributing from bgp , when the metric is 1 ).
When we have type 2 external , the best path selection is made from the cost set on the redistribution only and also the cost to the ASBR (LSA4) because this type of external route does not add to its metric, the cost along the path. In this case the forwarding address is set to 0.0.0.0 - the next-hop is the ASBR. This can be check from the show ip route output and foward metric
Cost = LSA5 + LSA4 ( ASBR cost )
There is one more case when the forwarding address is not null. This means the the next hop used is the one specified in the Fowrding address.
Cost = LSA5 + LSA1 ( FA cost )
Thanks for the response.
So to clarify the route installed will be the cost to the ASBR only, not the source of the route, i.e. no consideration of intra vs inter for the LSA 4. e.g if the the 2 ASBRs were:
10.0.0.1, cost 500, Inter-area
10.0.0.2, cost 1000, Intra-area
Then the inter-area route to the ASBR would be chosen.
Hi Malcom ,
RFC2328 section 16.4.1 states :
When multiple intra-AS paths are available to ASBRs/forwarding addresses, the following rules indicate which paths are preferred :
o Intra-area paths using non-backbone areas are always the most preferred.
o The other paths, intra-area backbone paths and inter-area paths, are of equal preference.