Inserting Default Route Into OSPF

Another Cisco IOS OSPF implementation trivia: if you’re redistributing a default route into OSPF (for example, you have a static default route configured with ip route 0.0.0.0 0.0.0.0 … and you use redistribute static subnets within the OSPF process), the default route will not be entered into the OSPF database unless you configure default-information originate within the router ospf configuration.

Similarly, if you configure default-information originate always, the router will inject the type 5 LSA for the default route into the OSPF topology database even if the router itself does not have a default route (or gateway of last resort).

7 comments:

  1. Ivan,

    Which one is better comparing default-information originate with
    default-information originate always?
    Is there any scenario perhaps applicable to both commands?

    thanks in advance.
  2. If you omit always it won't inject default route if it doesn't have default route itself. Which is better? It depends on your configuration.
  3. I've documented a few design scenarios where you might want to use one or the other.
  4. Ivan,

    Thank you so much. Now it's better understanding! :)
  5. Quick tip for people who are using OSPF with MPLS VPN.
    Let's say you want that all your branch offices access to the internet through your HQ office

    So you will use a default route and redistribute it within your OSPF domain

    be aware of this:

    MP BGP does not redistribute external routes "natively":
    You need : redistribute ospf 1 vrf X match internal external 1 external 2 route-map IMPORT_BGP within your address-family ipv4 vrf X

    Even if the PE have the 0.0.0.0/0 LSA type 5 within his OSPF database, he will not redistribute the route "natively":
    You need : default information-originate within your address-family ipv4 vrf X

    Be aware of that :D

    I am going to read Ivan's book regarding MPLS because I had a very hard time to find the answer on cisco.com ... and I found it elsewhere ... :()


    Replies
    1. And you will definitely not find the answer in my book - I was not aware of this behavior ;)

      Thanks for sharing!
      Ivan
  6. Hi Ivan, your explanation has been too much useful for me.
Add comment
Sidebar