Q&A: Injecting A Default Route Into OSPF

Q

Based on the topology and configuration shown below, what command should be added to RouterA to inject a default route into the OSPF areas?

OSPF Default Route Injection Diagram

hostname RouterA
!
router ospf 1
network 10.10.10.0 0.255.255.255 area 1
!
ip route 0.0.0.0 0.0.0.0 172.16.99.254

A

default-information originate



There are two ways to inject a default route into OSPF – and both involve the use of the default-information originate command under the router ospf process configuration.

If the router already has a default route in its routing table

If the router (RouterA in this example) already has a default route in its routing table, then adding the default-information originate command will advertise a 0.0.0.0 route into the OSPF domain automatically. All of the OSPF routers in the AS will send traffic with unknown IP destinations to the ASBR router (RouterA).

If the router does not have a default route in its routing table

If the router does not have a default route established, but you still need it to advertise it as the route to external networks, the default-information originate always command should be used.

If the always keyword is not used, OSPF will only advertise a default route if the router it is configured on has a default route in its own routing table.

In this case, RouterA does have a default route, so the always keyword is not necessary. When the default-information originate statement is added, type 5 LSAs will advertise a 0.0.0.0/0 route into the OSPF domain.

hostname RouterA
!
router ospf 1
network 10.10.10.0 0.255.255.255 area 1
default-information originate
!
ip route 0.0.0.0 0.0.0.0 172.16.99.254

Author Aaron

Aaron knows networks. He's been involved in building and supporting world-class data networks for the past 10 years - from international cloud service providers to Fortune 50 data centers. Aaron consults independently and is focused on building the best training platform available.

More posts by Aaron

Join the discussion 3 Comments

  • Alok kumar Bharadwaj says:

    what is that ip address(172.16.99.254), you hv entered in the ip route command.

    • Unregisterred007 says:

      Hi, I hope you got your answer by now however I used to be lost as well.

      When you create a default router (0.0.0.0 0.0.0.0) it has to either go to another route like (172.16.99.254) or to a connected interface like s0/0/0 or Fa0/0 or anything other e0 ..etc)

      Basically you are saying, anything that is not in the routing table, dump it to the next hope because it will have a route to the destination.

  • Sunny says:

    thanks for the clarification. BTW what a cute boy

Leave a Reply

Take your studies to the next level with our premium CCNP tools. Show me more!