top of page

OSPF Deafult information Originate

Many networks need just a default route to reach an uplink router, that has connection to the outside world. No other routing information is needed. Static default routes are not flexible and stay in the routing table, even if the uplink router has no means of forwarding a paket any more.

​

The dynamic generation of default routes is possible in OSPF. OSPF uses the command "default-information originate" for this. This works fine, as long as the router finds a default route in its routing table. This can be a route to interface NULL. If you do not have an default route available the command "default-information originate always" generates a default route anyway.

This tutorials is about "always". 

The #default-information originate command is used to advertise default route to other OSPF router in the area, but with the always command this somehow forced. The 'always' allows the router to advertise a default route even if the route not in the routing table If you do not use 'always' the router only advertises a default route if it has one in its own routing table.

​

the default-information originate will redistribute any default route whether it be from another router or if you create a static default route on itself - it can even be from a different routing protocol but it has to be present in the routing table.

​

So to sum up, if I get a default route from another Router, via a  Dynamic Routing Protocol (meaning it's in the Routing table) or 
I have issued the #ip route 0.0.0.0 0.0.0.0 X.X.X.X command and I issues the #default-information originate command this will (re)advertise the default route to downstream Routers.

​

If I have not issued the #ip route 0.0.0.0 0.0.0.0 X.X.X.X command or learned a default route from a Dynamic Routing Protocol, and i want to advertise a default route I can use the #default-information originate always to automatically generate a default route pointing to that Router, which then will be advertised downstream.
 

The basic OSPF configuration includes OSPF on the serial links. No redistribution is done. The loopback interfaces are not announced into OSPF.

​

In the first step only router R1 will generate a default route, in step 2 router R2 will also generate a default route for the network. All routers are in area 0.

​

In the beginning no default route is in the routing table. We look at R3:

​

 

 

 

 

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

Go to R1 and enter:

 

R1#conf t

R1(config)#router ospf 100

R1(config-router)#default-information originate always

R1(config-router)#end

R1#

 

R2 has got a default route from R1. This will be important to remember when we start to announce a default route from R2 as well.

 

 

 

 

​

 

​

​

​

​

​

​

​

​

​

​

​

​

​

​

The router R3 installed 2 default routes, because it gets two equal announcements from R2 and R4.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now R2 is to generate a default route as well as router R1. Again we use the parameter "always" to get a default route under any condition. 

​

R2#conf t

R2(config)#router ospf 100

R2(config-router)#default-information originate always

R2(config-router)#end

R2#

​

Now we get some interesting effects. Lets look at R3 first. One default route is gone, because now R2 is reachable with lower OSPF cost than R1.

​

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

​

The OSPF database on R3 still shows two "Type-5 AS External Link States", but just the one from R2 makes it into the routing table.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

​

​

And now for routing table of R2. After announcing a default route, R2 looses it's own default route.This could be a potentially dangerous situation, as R3 sends packets to R2, but R2 is not able to forward the pakets any more. R2 will drop the pakets and send an "icmp unreachable" to R3.

 

​

bottom of page