cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
827
Views
0
Helpful
7
Replies

Route Map

Ihsan Al Faili
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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"

View solution in original post

7 Replies 7

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...

Thank you a lot for your help, but I have different commands, so I couldn't apply most of these commands.

Hello,

this is just an example. You can use any commands you want. What does your route map look like ?

Route-map Defult-Route-Policy Permit 20

match ip address 102

set ip next-hop 12.48.243.161

set interface null 0 

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"

Mark Malone
VIP Alumni
VIP Alumni

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

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 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card