03-08-2025 05:56 AM
Hello, I'm having a problem where I configured these routes on CE2:
ip route 192.168.10.0/24 20.20.20.1 (R2 Gi0/1)
ip route 192.168.10.0/24 30.30.30.1 5 (R3 Gi0/2)
And the other way around for 192.168.20.0/24 (VLAN 20). (R2 and R3 are using HSRP, where R2 is active for VLAN 10 and standby for 20, and R3 the other way around, they are working properly)
The thing is, once I stop R2, the route through R3 doesn't kick in in the routing table unless I manually shutdown Gi0/1 on CE2.
I tried this but to no avail since I'm not familiar at all with SLA:
ip sla 1
icmp-echo 192.168.10.2 (R2 Gi0/3.10) source-interface GigabitEthernet0/1
timeout 1000
frequency 3
track 100 ip sla 1 reachability
ip route 192.168.10.0 255.255.255.0 20.20.20.1 track 100
ip sla schedule 1 life forever start-time now
What would be a way to fix this? I don't want to use dynamic routing since it would beat the point.
03-08-2025 07:10 AM
Where is this IP SLA running? Is this running on Switches or routers?
The IP SLA you should track is a reachability check to 20.20.20.1 (if that is down, then you need to take action)
Also, what is the timer for the HSRP (can you post the configuration)? If R2 goes down, the HSRP should flip the active gateway role.
But do you have CE also any tracking
I suggest that the post show run from all the devices.
03-11-2025 10:10 AM
The IP SLA config that I showed was configured on CE2, but since then I removed it from the router.
The HSRP timers haven't been changed, and if R2 goes down, the HSRP does flip the active gateway role.
Below I have posted the configuration of R2, R3 and CE2. Sorry for the late answer!
03-12-2025 10:49 AM
I do not see your switch config, Hope the Switch ports conneted to router are trunk and have vlan allowed 10 and 20, this also need to be same between switch to switch links
i do not see any IP SLA / EEM script in CE2 detect failures, other than static routes ?
I believe you looking CE2 to send traffic to R2 for the 192.168.10.0/24 traffic and R3 192.168.20.0 traffic, if R2 Fails you want to send the traffic both to R3 or if R3 Fails all the traffic send to R2 - is this your goal.
you can achieve different method, check some example for guide lines :
https://www.balajibandi.com/?p=1982
https://www.balajibandi.com/?p=1643
03-12-2025 11:09 AM
The switches are configured with trunk links to the routers and between them. I removed the SLA configuration which I posted initially because it wasn't working for me.
"I believe you looking CE2 to send traffic to R2 for the 192.168.10.0/24 traffic and R3 192.168.20.0 traffic, if R2 Fails you want to send the traffic both to R3 or if R3 Fails all the traffic send to R2 - is this your goal." Yes, that's exactly it, I was looking for a way to do this without using dynamic routing protocols.
Thank you for you examples sir, I will be studying them.
03-12-2025 01:03 PM - edited 03-12-2025 01:04 PM
You can try the below config on CE2 , and test, and let me know. (just given the standard, you can tweak the timers based on requirement).
ip route 192.168.10.0 255.255.255.0 20.20.20.1
ip route 192.168.20.0 255.255.255.0 30.30.30.1
track 1 ip sla 1 reachability
track 2 ip sla 2 reachability
!
ip sla 1
icmp-echo 20.20.20.1 source-interface Gig0/1
threshold 500
frequency 5
!
ip sla 2
icmp-echo 30.30.30.1 source-interface Gig0/2
threshold 500
frequency 5
!
ip sla schedule 1 start-time now life forever
ip sla schedule 2 start-time now life forever
!
!
event manager applet R2_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 192.168.10.0 255.255.255.0 20.20.20.1"
action 4.0 cli command "ip route 192.168.10.0 255.255.255.0 30.30.30.1"
action 5.0 cli command "exit"
action 6.0 cli command "end"
!
event manager applet R2_UP
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 192.168.10.0 255.255.255.0 30.30.30.1
action 4.0 cli command "ip route 192.168.10.0 255.255.255.0 20.20.20.1"
action 5.0 cli command "exit"
action 6.0 cli command "end"
!
event manager applet R3_DOWN
event track 2 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 192.168.20.0 255.255.255.0 30.30.30.1"
action 4.0 cli command "ip route 192.168.20.0 255.255.255.0 20.20.20.1"
action 5.0 cli command "exit"
action 6.0 cli command "end"
!
event manager applet R3_UP
event track 2 state down
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "no ip route 192.168.20.0 255.255.255.0 20.20.20.1"
action 4.0 cli command "ip route 192.168.20.0 255.255.255.0 30.30.30.1"
action 5.0 cli command "exit"
action 6.0 cli command "end"
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