Hi,
I am working on some scenario and i am stuck to solve it.
The scenario is
R1 is connected to 3 other Routers. Namely R2,R3 and R4.
R1 is accessing loopbacks 100.84.1.1 and 100.84.1.2 through R2 when R2 is up and working.
When R2 goes down, then track in R1 makes to access 100.84.1.1 and 100.84.1.2 through R3.
As R3 goes down, other track makes access Loopbacks through R4.
so in case when R2 and R3 goes down and Loopbacks accessed through R4 i want this loopback route to be there only for 15 minutes at R1.
+++++++++++++++++++++++++++++++++++++++++
R1
!
hostname R1
!
! Interfaces IP configuration
!
interface Ethernet2/0
ip address 172.26.1.1 255.255.255.252
description "R1 to R2"
!
interface Ethernet2/1
ip address 172.26.1.5 255.255.255.252
description "R1 to R3"
!
interface Ethernet2/2
ip address 172.26.1.9 255.255.255.252
description "R1 to R4"
!
! Routes
ip route 100.84.1.0 255.255.255.252 172.26.1.2 track 1 name "R1 to R2 link"
ip route 100.84.1.0 255.255.255.252 172.26.1.6 10 track 2 name "R1 to R3 link"
ip route 100.84.1.0 255.255.255.252 172.26.1.10 15 name "R1 to R4 link"
!
! Track
track 1 ip sla 1 reachability
delay down 5 up 1
!
track 2 ip sla 2 reachability
delay down 5 up 1
!
track 3 list boolean or
object 1
object 2
!
! IP SLA
ip sla 1
icmp-echo 172.26.1.2
ip sla schedule 1 life forever start-time now
!
ip sla 2
icmp-echo 172.26.1.6
frequency 10
ip sla schedule 2 life forever start-time now
!
!
!
! EEM Script
event manager session cli username "act"
event manager applet WatchDogApplet
event timer watchdog name WATCHING time 10
action 1.0 track read 3
action 2.0 if $_track_state eq "down"
action 3.0 wait 100
action 4.0 cli command "enable"
action 5.0 cli command "conf t"
action 6.0 cli command " no ip route 100.84.1.0 255.255.255.252 172.26.1.10 15 name "R1 to R4 link" "
action 7.0 cli command "end"
action 8.0 else
action 8.1 cli command "ip route 100.84.1.0 255.255.255.252 172.26.1.10 15 name "R1 to R4 link" "
action 8.2 syslog msg "Route added"
action 8.3 end
!
end
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R2
hostname R2
!
interface Loopback1
ip address 100.84.1.1 255.255.255.255
!
interface Loopback2
ip address 100.84.1.2 255.255.255.255
!
!
interface Ethernet2/0
ip address 172.26.1.2 255.255.255.252
description "R2 to R1"
! Default route
ip route 0.0.0.0 0.0.0.0 172.26.1.1
!
++++++++++++++++++++++++++++++++++++++++++++
R3
hostname R3
!
interface Loopback1
ip address 100.84.1.1 255.255.255.255
!
interface Loopback2
ip address 100.84.1.2 255.255.255.255
!
!
interface Ethernet2/1
ip address 172.26.1.6 255.255.255.252
description "R3 to R1"
!
ip route 0.0.0.0 0.0.0.0 172.26.1.5
!
+++++++++++++++++++++++++++++++++++
R4
hostname R4
!
!
interface Loopback1
ip address 100.84.1.1 255.255.255.255
!
interface Loopback2
ip address 100.84.1.2 255.255.255.255
!
interface Ethernet2/2
ip address 172.26.1.10 255.255.255.252
description R4 to R1
!
ip route 0.0.0.0 0.0.0.0 172.26.1.9
!
++++++++++++++++++++++++++++++++++++++++++++++=