Q&A: Injecting A Default Route Into OSPF

Posted by | Blog, Q&A | No Comments
  • 0
  • February 12, 2013
Question and Answer Title

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

About Aaron

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