08-23-2023 07:41 AM
we have 2 Cisco L3 switches and each having one uplink. Customer want to configured OSPF and static routing both for redundancy purpose at route level. So my question is that if any case OSPF goes down than traffic will diverted on Static route or not.
08-23-2023 07:47 AM - edited 08-23-2023 07:48 AM
Hello @verma.089,
Yes, you can configure both OSPF and static routing on your Cisco L3 switches for redundancy purposes. This approach is often used to provide failover capabilities in case one routing protocol fails or one path becomes unavailable.
You would configure OSPF on both switches to allow dynamic routing between them. This ensures that the switches exchange routing information and establish routes to each other's networks. If one link goes down, OSPF will detect the failure and update the routing tables accordingly, rerouting traffic through the available link.
You would configure static routes on both switches for the same destinations that OSPF handles. These static routes would have a higher administrative distance (AD) than OSPF. If OSPF routes are available, they will be preferred over the static routes. However, if OSPF routes become unavailable (due to link failure), the static routes will be used as a backup. You will have to adjust AD for static routes, because default AD value is [1]. The lower the AD value, the more preferred the route is. OSPF should have a lower AD value than static routes, so OSPF routes will be preferred when available.
For example, OSPF might have an AD of 110, while the static routes could have an AD of 200. If OSPF routes become unavailable, the static routes will be used as a backup because of their higher AD value.
08-23-2023 07:48 AM
i do not see any advantage here using both (but some cases yes)
OSPF goes down, when other side device not reachable ? in this case how does the static Route works ?
As long as both peers reachable each other then OSPF works as expected.
some use case you can have static route and add statement in OSPF default-information orginate.
08-23-2023 08:41 AM
It definitely depends on how its implemented. People often use floating static routes (higher AD than routing protocol) as M02@rt37 mentioned but if the static route points to the neighbor that loses the OSPF adjacency they you're putting all your eggs in one basket and the static route wont work. Make sure you understand what happens to the routing if the adjacency does go down. Some off hour testing may need to happen during non-business hours to make sure it does what you need.
-David
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide