Octet

How do you advertise a default route into OSPF?

Show the answer

Say this first

On the edge router, default-information originate under router ospf. It only advertises a default if the router itself has one in its routing table, from any source other than OSPF. Adding always advertises it regardless. The result is a Type 5 LSA, shown as O*E2 with metric 1, and the router becomes an ASBR.

Go deeper

Example

Cisco IOS
R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1
R1(config)# router ospf 1
R1(config-router)# default-information originate

On another router:

Output
R2# show ip route ospf | include 0.0.0.0
O*E2  0.0.0.0/0 [110/1] via 10.0.12.1, 00:00:52, GigabitEthernet0/0/0

Options

  • always: advertise even without a default in the table. Useful when the default should exist whatever happens, risky because it attracts traffic to a router that has lost its uplink.
  • metric 10 metric-type 1: with two edge routers, make the default E1 so each router uses the nearest exit.
  • route-map: advertise only when a condition holds, for example a tracked ISP prefix is present.

Other ways to get a default

  • Stub and totally stubby areas: the ABR injects a Type 3 default automatically.
  • NSSA: area X nssa default-information-originate on the ABR gives a Type 7 default.

Traps

  • Using redistribute static to send a default. On IOS that does not carry 0.0.0.0/0 into OSPF.
How did you do?