cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
534
Views
0
Helpful
6
Replies

Routing issue | OSPF and Static

Isuru-Kavinda1
Level 1
Level 1

Dear Team,

We are looking for a solution for the following issue. As illustrated in the attached diagram, there is an existing P2PRouting, connection between Site 1 and Site 2 using two separate ISPs.

Currently, traffic from Site 2 is routed through the ISP 2 OSPF network to reach Site 1. We aim to reroute this traffic to use ISP 1 instead. Since ISP 1 uses a static path, we have configured static routing to redirect traffic through ISP 1. This change was successful.

Additionally, we require the OSPF path (via ISP 2) to serve as a backup route. To test the failover, we shut down the ISP 1 uplink. However, during the test, the traffic did not switch to the OSPF path, resulting in a connectivity failure between Site 1 and Site 2.

Upon examining the routing table, we observed that the static route remained in the table, and no OSPF routes were learned back to the routing table.

Could you please provide guidance on resolving this issue to enable proper failover from the static route to the OSPF path?

Thank you for your support.

Regards,

Isuru

1 Accepted Solution

Accepted Solutions

Hello
So as suggested you can use conditional static routing as such when a certain event occurs that negate access via ISP1 then that static route is removed and the less preferred path via ISP2 will take precedence.

Example
ip sla 1
icmp-echo 1.1.1.1 source-interface x/1
threshold 2000
timeout 2000
frequency 3
iip sla schedule 1 start-time now life forever

track 10 ip sla 1 reachability 

ip route 0.0.0.0 0.0.0.0 x/ 1 1.1.1.2 name ISP1 track 10
ip route 0.0.0.0 0.0.0.0 x/2  2.2.2.2 10 name ISP2

Edited:
The above is just an example if IPSLA tracking , you do not need to use default routes the conditional static route can be anything based on your own setup


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

View solution in original post

6 Replies 6

@Isuru-Kavinda1 

 You can work with IPSLA on Router of site 2. The IPSLA will ping the router on Site 1 using the static route and if the ISP1 become unavailable, IPSLA will change the static route AD to a value above 110 and the OSPF will be the preferred routing protocol.

 

Isuru-Kavinda1
Level 1
Level 1

@Flavio Miranda 

Thank you for your response.

Could you please provide detailed guidance on each step of the SLA configuration process?

Additionally, could you clarify the potential reasons for this issue?

Thank you.

@Isuru-Kavinda1 

 There will be lots of available material on the internet and it will depend on the router and IOS you are using, This links is for standard IOS but will not change much for IOS-XE.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipsla/configuration/15-mt/sla-15-mt-book/sla_icmp_echo.html

The reason for the issue seems to be related to the fact that you have static route configured on the router and static route will have preference over dynamics protocol like OSPF. Just because you shutdown a link to the ISP, it will not change the fact that the static route is there and the router will try to use the static route.

 By using IPSLA you can change the router behavior automatically by chaning the Administrative Distance of the static route from 1 to something superior of 110 (which is OSPF AD). By doing that the router will not prefer the static route and will use the next available routing protocol which is OSPF.

 

DanielP211
VIP Alumni
VIP Alumni

Hello!

Could you please paste your configuration? One option is to do tracking and change the static route metric.

BR

****Kindly rate all useful posts*****

Hello
So as suggested you can use conditional static routing as such when a certain event occurs that negate access via ISP1 then that static route is removed and the less preferred path via ISP2 will take precedence.

Example
ip sla 1
icmp-echo 1.1.1.1 source-interface x/1
threshold 2000
timeout 2000
frequency 3
iip sla schedule 1 start-time now life forever

track 10 ip sla 1 reachability 

ip route 0.0.0.0 0.0.0.0 x/ 1 1.1.1.2 name ISP1 track 10
ip route 0.0.0.0 0.0.0.0 x/2  2.2.2.2 10 name ISP2

Edited:
The above is just an example if IPSLA tracking , you do not need to use default routes the conditional static route can be anything based on your own setup


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

The issue can classify into two parts

1- defualt route need ip sla to detect ISP down and/or you need to use egress interface additional to next-hop in defualt route' 

Ip sla can use different path and not work optimal as we want so I recommend use 

Ip route <destiantion of ip sla> ISP1 mandatory 

2- oapf need to advertise defualt route otherwise route will not use it for access internet 

3- if ospf advertise subnet not defualt route then it can other issue that router always prefer ospf' since it longest match' so try make ospf only advertise defualt route

MHM