rtr 10
type echo protocol ipIcmpEcho 10.10.10.10
timeout 1000
frequency 3
request-data-size 32
rtr schedule 10 life forever start-time now
!
event manager applet EEM_PRIMARY_DOWN
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.10 get-type exact entry-op eq entry-val 1 exit-op eq exit-val 2 poll-interval 3
action 1.0 syslog msg "Primary link DOWN - Failing over to backup link"
action 1.1 cli command "enable"
action 1.2 cli command "configure terminal"
action 1.3 cli command "ip route 11.11.11.0 255.255.255.0 12.12.12.12"
!
event manager applet EEM_PRIMARY_UP
event snmp oid 1.3.6.1.4.1.9.9.42.1.2.9.1.6.10 get-type exact entry-op eq entry-val 2 exit-op eq exit-val 1 poll-interval 3
action 1.0 syslog msg "Primary link UP - Failing over to primary link"
action 1.1 cli command "enable"
action 1.2 cli command "configure terminal"
action 1.3 cli command "no ip route 11.11.11.0 255.255.255.0 12.12.12.12"!
get this script
need try this.