Creating a Default Route in OSPF
Problem
You want to propagate a default route within an OSPF network.
Solution
To propagate a default route with OSPF, use the default-information originate configuration command:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip routeRouter1(config)#0.0.0.0 0.0.0.0 172.25.1.1router ospfRouter1(config-router)#55default-information originate metric30metric-typeRouter1(config-router)#1exitRouter1(config)#endRouter1#
Discussion
Unlike RIP and EIGRP, you cannot create a default route in OSPF
by simply redistributing a static route. Even if there is a default
route in the routing table, by default Cisco’s OSPF implementation
will not forward it to the rest of the network. This is because OSPF
uses a link state algorithm that keeps track of links rather than
routes. So summary routes are very special elements in OSPF, and it’s
important to be careful when distributing them. The default route,
0.0.0.0/0, is the ultimate summary
of summaries, and it has the potential to cause serious confusion if
it isn’t handled properly.
So Cisco forces you to be sure that you really want to source a default route into OSPF by requiring you to specifically enable it with the default-information originate command. This command also allows you to specify precisely the metric of this default route and, since a default route is implicitly external to the AS, the type of external route. This has the added advantage ...