cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2761
Views
20
Helpful
9
Replies

Static Routes and OSPF

klorentzen
Level 1
Level 1

For a migration to another WAN (metro ethernet) provider I want to, on a site-by-site basis, add static routes to subnets that currently have OSPF route entries in the table. The idea is that when the OSPF routes disappear, the static routes will still be there. So my question is straightforward, if I have an existing OSPF route in the routing table, i.e.

show ip route

...

O 10.1.24.0/22 [110/2] via 10.3.24.10, 02:43:04, Vlan316

...

can I add a static route that duplicates it:

ip route 10.1.24.0 255.255.252.0 10.3.24.10

 

Thanks for the help,   ...Kurt

1 Accepted Solution

Accepted Solutions

Kurt

 

Thank you for the additional information. It does help to have these details. You ask "Does this make sense?". With the additional details that you have provided I can say that yes it does make sense. It is significant that OSPF is not providing fail over. With only a single path to each remote subnet and no alternate path then OSPF is not providing much advantage, other than a quicker realization that a remote destination might not be reachable. If your long term plan is to discontinue using OSPF then configuring a simple static route (no AD specified) will replace the existing OSPF route with the static route and then discontinuing OSPF would be quite straight forward. 

HTH

Rick

View solution in original post

9 Replies 9

Hello,

 

you can, just make sure the static route has a higher administrative distance than the OSPF route, otherwise the static route will be preferred:

 

ip route 10.1.24.0 255.255.252.0 10.3.24.10 111

Hello


@klorentzen wrote:

The idea is that when the OSPF routes disappear, the static routes will still be there. So my question is straightforward, if I have an existing OSPF route in the routing table, i.e.

show ip rou

O 10.1.24.0/22 [110/2] via 10.3.24.10, 02:43:04, Vlan316

can I add a static route that duplicates it:

ip route 10.1.24.0 255.255.252.0 10.3.24.10 traffic


Why would you want to , Only what this would acheive would be possiblly to blackhole traffic towards an interface that its upstream neigbour isnt available.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Kurt asks what on the surface seems a simple question "can I add a static route that duplicates it". But if we look a bit more closely is really not simple at all.

@Georg Pauwen correctly says that a static route replacement can be configured and points out the implications of the AD of the static route. The default AD means that the static route will replace the existing dynamic route. If a higher AD is used then the static route may become a floating static in which while the dynamic route is in the routing table it will be used but if the dynamic route is withdrawn from the routing table then the static will then be used. Which is the desired result? Perhaps Kurt will tell us.

@paul driver asks a good question about why use a static route that duplicates the OSPF route? If OSPF uses 10.3.24.10 as the next hop and then if OSPF stops advertising that route, will 10.3.24.10 still be able to forward the traffic correctly to reach the destination network. 

 

The original post tells us that this is to be part of a migration to a new WAN. Perhaps if we knew more about the existing environment and about the new WAN we might be able to provide a better response about using a static route in the migration.

HTH

Rick

These are all really good observations and suggestions. I was hoping to leave out the gory details. But to clarify, here's what will be happening. We have about a dozen sites all directly connected back to our central office by fiber via our current provider. Some of the sites are very close in proximity, and we have installed our own fiber between those site pairs. We intend to drop provider service to the in-house connected sites, taking us down to 7 provider connections with the remaining sites daisy-chained off those (just one extra hop in all cases). I need to maintain the subnets at each site, so my plan is to add a static route at the core to the subnets at each 2-hop site via the directly-connected site, and of course add those routes on that intermediate switch as well. I plan to eventually abandon OSPF altogether and just use static routes (there are only 20 or so total, they're all on the core switch, they never change, and there's no physical redundancy so OSPF isn't providing failover). At the far end I'll turn OSPF off and change the default route to point at the next upstream switch, then just connect the same port to the in-house fiber instead of the provider connection. So that's the background that is causing all of the over-thinking on my part

 

Now, finally we get to the part that is most relative to the original question. For the process of abandoning OSPF, my thought is that if I have matching OSPF and static routes to the still directly connected sites, I can just disable OSPF at the endpoints and the static routes will take over as the dynamic routes are declared invalid / dynamically removed. The routes would be completely identical (same destination, same gateway ip address), so I'm guessing priority really isn't an issue in this case. I'm just looking for a failover method that permits me to switch to static routing one-site-at-a-time while still keeping OSPF functional for the sites that have not yet been statically routed. When the last endpoint has had OSPF disabled, I can disable it at the core, then remove the OSPF config from all the switches. It's just myself here, and I intend to be at the endpoints when I make the switch so I can limit the downtime in case something goes foul. That's why I want the static route already in place at the core.

 

Does this make sense? 

Kurt

 

Thank you for the additional information. It does help to have these details. You ask "Does this make sense?". With the additional details that you have provided I can say that yes it does make sense. It is significant that OSPF is not providing fail over. With only a single path to each remote subnet and no alternate path then OSPF is not providing much advantage, other than a quicker realization that a remote destination might not be reachable. If your long term plan is to discontinue using OSPF then configuring a simple static route (no AD specified) will replace the existing OSPF route with the static route and then discontinuing OSPF would be quite straight forward. 

HTH

Rick

Joseph W. Doherty
Hall of Fame
Hall of Fame

Hmm, another question might be why you would be unable to continue to use OSPF?

If you're unaware, Cisco's OSPF supports multiple OSPF processes.

Hello @Joseph W. Doherty  and @klorentzen ,

using a different OSPF process can be a good idea.

For the original poster : by the way even without link redundancy a dynamic routing protocol provides some advatanges in troubleshooting it gives you a way to check the health of each fiber link bidirectional without the need to implement IP SLA on the core switch.

My personal suggestion would be to consider the possible benefits of still using a dynamic routing protocol instead of relying on static routes.

 

Hope to help

Giuseppe

 

Kurt

 

This has been a good and interesting discussion with suggestions about multiple aspects of implementation (static routes as a transition mechanism, static routes to replace OSPF, keeping OSPF). One of the great things about this community is that multiple people may respond to a question and multiple perspectives are represented. You can choose the suggestions that seem to you to fit your situation the best. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick

Yes, I completely agree. This is my first foray into the Cisco community forums and I was surprised and elated at how quickly the replies began to be posted, as well as the level of expertise from professionals with first-hand experience. As a testimonial to the value of this forum, I migrated my first site off the direct provider fiber onto our own fiber early this morning. It went off without a hitch!

Thanks again for sharing the knowledge and allowing me to achieve the desired result.

...Kurt

Review Cisco Networking for a $25 gift card