OSPF route selection rules

OSPF implementation in Cisco IOS deviates slightly from OSPF/NSSA standards (RFC 2328 and RFC 3101). These are the OSPF route selection rules as implemented by Cisco IOS release 12.2(33)SRE1 (all recent releases probably behave identically):

Note: Update history is at the end of the post

Update history:
  • The original version of this post was published on 2008-01-17.
  • The post was updated and renamed on 2011-03-30 after a lengthy (and very productive) discussion with one of my readers.
  • 2011-04-16: Fixed the final tie-breaker part.

5 comments:

  1. its a good one.

    regards
    shivluy

    ReplyDelete
  2. Excelent information.

    I've been searching for this for hours, but always you just find information about E1, E2 routes and what they mean...as you said...not the whole story..

    thanks a lot/....

    ReplyDelete
  3. Anton Yurchenko31 March, 2011 02:05

    Big big thanks! I had pieces of it written down, but pieces about Cisco specific behavior are excellent finds.

    ReplyDelete
  4. I have a question about OSPF default originates.

    I have 4 ABR in once OSPF domain. Three of the ABRs are generating a OSPF default route with a metric of 200 and 1 is using a metric of 1000. The show ip ospf database external 0.0.0.0 shows that the default originate with 200 as an E2 and the default originate with the metric of 1000 as and E2 route. The ABR with a metric of 1000 is the BDR and the ABR with metrics of 200 are the DRs. The default route for clients of the DRs prefer the BDR default route with a metric of 1000 over the default of the DR with a metric of 200. Any ideas on how to fix this situation?


    Thanks,

    ReplyDelete
  5. DR/BDR doesn't matter. They just influence how updates are flooded through the network.

    Make sure all routers originate either E1 or E2 default routes (not a mix).

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.