OSPF default route: design scenarios

In his comment, Maher has asked an interesting question:

“Which one is better: default-information originate or default-information originate always?”

As always, the answer is it depends. If your OSPF edge routers have external default routes (for example, static default routes toward the Internet, see the next diagram), you'd want them to announce the default route only when they have a default themselves (otherwise they would attract the traffic and then blackhole it). In this case, you'd use default-information originate.

If you use something else than OSPF as the core routing protocol of your network (as shown in the next diagram), then you'd want the core routers to announce the default route into OSPF to attract the traffic from the edges regardless of whether they have the default route themselves or not. In this scenario, you'd use default-information originate always.

BGP is almost always the core routing protocol of Service Provider networks. You can also use it to make a large enterprise network scalable.

Last but not least, in OSPF+BGP scenario, you might want a core router to announce a default route only if it has at least some non-OSPF routes (to prevent an isolated core router from attracting and blackholing the traffic). The command to use is default-information originate always route-map name, which would generate a default route into OSPF only if at least one prefix from the IP routing table matches the specified route map.

This article is part of You've asked for it series.

2 comments:

  1. One thing you have to do if you use route-maps to control the injection of the default-route into ospf (and that I found out the hard way by contacting TAC):

    You have to redistribute the networks you specify in the route-map into OSPF, too.

    I use a "static" BGP-prefix from our Uplink in my route-map, and I have to redistribute this prefix into OSPF to make the default route work.

    The reason for that (TAC explained) is, that there is no "new" default-route generated, but the network in the route-map is redistributed into OSPF and simultaneously overwritten into 0.0.0.0/0.

    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.