OSPF Default Route: Design Scenarios

Here’s an interesting OSPF-related question I got::

“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 other 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 the 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.

3 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.
  2. Hi,
    why using the keyword "always" with the "route-map"? Using the route-map should generate the default when the route-map is satisfyed, regardless if another default is in the RIB.
    Thanks,
Add comment
Sidebar