cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1283
Views
5
Helpful
4
Replies

OSPF ip sla default routing internet failover

J_Vansen_S
Level 3
Level 3

Hi All, 

Currently entire network is under ospf area 0 with internet traffic in DC routed out to ISP 1, and DR internet traffic routed out to ISP2. 

We have a requirement to do a routing failover from DC to DR when Internet connectivity to ISP1 is down. It would failover to use DR's ISP 2. 

What method should i use to achieve this? 

OSPF-diagram.png

I have tried the below config on DR router but it did not work as expected. 

!

ip sla 1
icmp-echo 8.8.8.8 source-ip 172.16.5.1
threshold 2
timeout 1000
frequency 3
access-list 101 permit icmp host 172.16.5.1 host 8.8.8.8 echo
!
ip sla schedule 1 life forever start-time now
!
track 100 ip sla 1 reachability
ip local policy route-map DR_RP
!
ip route 0.0.0.0 0.0.0.0 172.16.5.2 track 100
ip route 0.0.0.0 0.0.0.0 172.17.17.2 200
!
route-map DR_RP permit 10
match ip address 101
set ip next-hop 172.16.5.2
set interface Null0

 

Appreciate any advise at all

 

4 Replies 4

Hello,

 

since you have blanked out the networks you are advertising, we cannot see which network is used to connect the DR and the DC.

 

The failover route doesn't look right:

 

ip route 0.0.0.0 0.0.0.0 172.16.5.2 track 100
ip route 0.0.0.0 0.0.0.0 172.17.17.2 200 --> where is that IP adress ? It needs to be at the DC site, and the DR site needs to have an IP address from that range, for the next hop to work.

Hello
What you have specified is static route ip sla tracking which looks correct and should work accordingly however you mention ospf so are the dc's ospf peering with the isp's, If they are opsf peering then wouldn't you want conditional tracking of ospf instead, please confirm?


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

jcyc
Level 1
Level 1

Hi J_VANSEN_S, What L3 switch model did you use in building A? 

 

Hello,

 

if you want to use an IP SLA, you can trigger an EEM script:

 

DC Router

 

track 1 ip sla 1 reachability
!
ip sla 1
icmp-echo 8.8.8.8 source-ip 172.17.17.1
frequency 5
ip sla schedule 1 life forever start-time now
!
router ospf 1
default-information originate metric 100
!
ip route 0.0.0.0 0.0.0.0 172.17.17.2
!
event manager applet ISP_1_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "router ospf 1"
action 4.0 cli command "no default-information originate metric 200"
action 5.0 cli command "end"
!
event manager applet ISP_1_UP
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "router ospf 1"
action 4.0 cli command "default-information originate metric 200"
action 5.0 cli command "end"

 

DR Router

 

router ospf 1
default-information originate metric 210
!
ip route 0.0.0.0 0.0.0.0 172.16.5.2

Review Cisco Networking for a $25 gift card