Distributing static routes across an OSPF area

  • 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?

  • Daniel Dib

    Daniel Dib Correct answer

    9 years ago

    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
    ip prefix-list static-routes permit
    ip prefix-list static-routes permit
    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

    Would it be acceptable to run a cheap router that supports OSPF purely to redistribute static routes in to an OSPF area? I guess this would act a bit like a BGP route server.

    edited to add use case

    @Simon that would work but what a kludge. Why not replace the router entirely then. Everything not consumer grade does OSPF.... even going as low as Cisco 800s, Mikrotiks etc.

    @wintermute000 see the explanation in the question linked at the bottom of this question. The device can do OSPF, it's to do with NAT behind that device as its not a connected network.

    Then as long as you only have one point of connection to the NAT device (via the OSPF capable device), statics with redistribute static subnets. If two points of connection, google tag and filter, and use metrics or E1 vs E2 to set priority

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

Tags used