Routing – Distributing static routes across an OSPF area

ospfrouting

If you have a router which does not support OSPF, but your routing topology makes use of OSPF as all other devices do support it, what is the best way to get this routers networks in to the OSPF area?

My initial thought was to put a static route on every other router, but if there are multiple networks behind this router this could become very cumbersome very quickly.

This problem arises from the answer on another question:
How do you get an ASA to announce NAT'd 'outside' addresses in to an OSPF zone?

Best Answer

What does the topology look like? How are you doing routing today towards these networks? Or is the router being deployed now? Do you have an OSPF capable router connected to this router that is not running OSPF?

If you do then I suggest you redistribute static on this router. Something like:

ip prefix-list static-routes permit 10.0.0.0/24
ip prefix-list static-routes permit 10.0.10.0/24
ip prefix-list static-routes permit 10.0.20.0/24
route-map static-allowed permit 10
match ip address prefix-list static-routes
route-map static-allowed deny 20

The explicit deny at the end is not really needed as there is an implicit deny but it makes the logic a bit more clear.

Then under the OSPF process:

router ospf x
redistribute static subnets route-map static-allowed