Troubleshooting OSPF Route Advertisement

Hello Cameron

΅When you use the default-information originate command alone, without the always keyword, OSPF will advertise a default gateway only if a default gateway exists in the routing table itself. If the always keyword is used, then it will advertise a default gateway regardless of whether or not a default gateway exists in the routing table.

To understand this more fully, take a look at this topology once again:
image
Let’s say that R2 has no default gateway configured in its routing table. Let’s say you issue the following command on R2 within the OSPF configuration mode:

default-information originate

R2 will not advertise a default route to R1.

If you use the following command:

default-information originate always

R2 will advertise a default route to R1. In other words, it will say to R1 “install in your routing table my next hop IP address (192.168.12.2) as the default gateway”. Thus, the default gateway that R1 will put in its routing table via OSPF is 192.168.12.2.

Does that make sense?

I hope this has been helpful!

Laz

1 Like

Hi Laz,

Thank you for the very clear and great explanation you made it very easy for me to understand! Helped out a lot.

Cam

1 Like

Can we redistribute static null 0 route into OSPF? If yes, how can we do that?

Hello Sai

Yes, it is possible to create a Null0 route and then to redistribute that into OSPF. In the following lesson, in section 6 OSPF Default Route you can see a default Null0 route being created and being advertised using OSPF using the default-information originate command.

You can also use the redistribute static command if your Null0 route is not a default route.

I hope this has been helpful!

Laz

When we use the keywords subnets in redistribution what exactly does this imply? Is it specifically only the routes that have been subnetted or could it also include the connected addresses

Hello Cameron

The keyword ‘subnets’ used in redistribution is to ensure that all subnets, including those that are directly connected, are included in the redistribution process. If you don’t use the ‘subnets’ keyword, only classful networks will be redistributed. That is, only the routes that match the exact classful network statement will be redistributed. By using ‘subnets’, you ensure that all routes, including subnetted routes and connected addresses, are redistributed.

Take a look at this Cisco command reference documentation that tells you more about this command and the subnets keyword.
https://www.cisco.com/c/en/us/td/docs/ios/iproute_pi/command/reference/iri_book/iri_pi1.html#wp1034551
I hope this has been helpful!

Laz