Showing results for 
Search instead for 
Did you mean: 

ASBR Selection for E2 Routes

Level 1
Level 1


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


7 Replies 7

Hi Malcolm,

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 - 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 )



Hi Dan

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:, cost 500, Inter-area

vs, cost 1000, Intra-area

Then the inter-area route to the ASBR would be chosen.



I updated my previos post.

It will take the cost of the redistribution + the cost to the ASBR.


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.



Hi Dan

Thats interesting, so from that if I had a router with interfaces in Area 0 and Area 1 and one of my ASBR was also in Area 1 then you would expect the route from the ASBR in Area 1 to be used, even if it had a higher cost?



Yes , but this is the case only for Area 1 ( in this setup )



Thats what I would have expected, but having labbed this it appears that OSPF choses the ASBR purely on cost.

Thanks for your help though.


Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card