12-15-2016 10:13 AM - last edited on 03-25-2019 03:48 PM by ciscomoderator
Hey all,
Can I create route map to work if there is no reachability?
I want to create route map that works only wen I can't get ping from my gateway to change my route to other ISP.
Solved! Go to Solution.
12-15-2016 01:29 PM
Hello,
I changed the config to match your route map. You still need to change the IP address you are tracking and the source interface to match yours:
ip sla 10
icmp-echo 192.168.1.1 source-interface Serial0/0
frequency 10
ip sla schedule 10 life forever start-time now
ip sla reaction-configuration 10 react timeout threshold-type immediate
ip sla enable reaction-alerts
track 1 ip sla 10 reachability
delay down 2 up 4
event manager applet add-route_map
event ipsla operation-id 10 reaction-type timeout
action 1.0 if $_ipsla_condition eq "Occurred"
action 2.0 cli command "enable"
action 3.0 cli command "config t"
action 4.0 cli command "route-map Default-Route-Policy permit 20"
action 5.0 cli command "match ip address 102"
action 6.0 cli command "set ip next-hop 12.48.243.16"
action 7.0 cli command "set interface null 0"
action 8.0 cli command "end"
12-15-2016 11:10 AM
Hello,
you could use IP SLA in conjunction with an EEM script. It would look like this:
ip sla 10
icmp-echo 192.168.1.1 source-interface Serial0/0
frequency 10
ip sla schedule 10 life forever start-time now
ip sla reaction-configuration 10 react timeout threshold-type immediate
ip sla enable reaction-alerts
track 1 ip sla 10 reachability
delay down 2 up 4
event manager applet add-route_map
event ipsla operation-id 10 reaction-type timeout
action 1.0 if $_ipsla_condition eq "Occurred"
action 2.0 cli command "enable"
action 3.0 cli command "config t"
action 4.0 cli command "route-map SWITCH_ISP"
action 5.0 cli command "match ip address 101"
action 6.0 cli command "set interface FastEthernet0/0"
action 7.0 cli command "end"
When your gateway (192.168.1.1, obviously you have to change that to the real IP address of your gateway) cannot be reached, the route map will be installed...
12-15-2016 01:07 PM
Thank you a lot for your help, but I have different commands, so I couldn't apply most of these commands.
12-15-2016 01:16 PM
Hello,
this is just an example. You can use any commands you want. What does your route map look like ?
12-15-2016 01:19 PM
Route-map Defult-Route-Policy Permit 20
match ip address 102
set ip next-hop 12.48.243.161
set interface null 0
12-15-2016 01:29 PM
Hello,
I changed the config to match your route map. You still need to change the IP address you are tracking and the source interface to match yours:
ip sla 10
icmp-echo 192.168.1.1 source-interface Serial0/0
frequency 10
ip sla schedule 10 life forever start-time now
ip sla reaction-configuration 10 react timeout threshold-type immediate
ip sla enable reaction-alerts
track 1 ip sla 10 reachability
delay down 2 up 4
event manager applet add-route_map
event ipsla operation-id 10 reaction-type timeout
action 1.0 if $_ipsla_condition eq "Occurred"
action 2.0 cli command "enable"
action 3.0 cli command "config t"
action 4.0 cli command "route-map Default-Route-Policy permit 20"
action 5.0 cli command "match ip address 102"
action 6.0 cli command "set ip next-hop 12.48.243.16"
action 7.0 cli command "set interface null 0"
action 8.0 cli command "end"
12-15-2016 11:14 AM
Hi Yes you would use route-map in conjunction with ip sla verify reachability command
there are a few ways to tweak it there is an example in this doc of one of them
http://www.cisco.com/c/en/us/support/docs/ip/ip-routed-protocols/48003-pbrtracking.html
12-15-2016 01:06 PM
Hey Mark, thank you a lot for your help.
I will appreciate if you can look in the original issue that I posted yesterday. This issue make me sick and we didn't come up with solution until now:
https://supportforums.cisco.com/discussion/13184431/routing-issue
appreciated your help in advance
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