Category Archives: Static Routing

Static route, IPSLA & Tracking

track 1 interface FastEthernet0/0 line-protocol

event manager applet Static-DOWN
event track 1 state down
action 5.0 cli command “enable”
action 5.1 cli command “conf t”
action 5.2 cli command “no ip route”
action 5.3 cli command “end”

event manager applet Static-UP
event track 1 state up
action 5.5 cli command “enable”
action 5.6 cli command “conf t”
action 5.7 cli command “ip route”
action 5.8 cli command “end”

IP SLA is the way to go. I use it often. Configure an icmp IPSla towards the other end of the p2p. Then configure your static route with the “track” keyword. This will drop the static route if the IP SLA goes down .The configuration would look something like below.

ip sla 1
icmp-echo x.x.x.x <- IP you want to ping
timeout 1000
frequency 1
ip sla schedule 1 life forever start-time now
track 1 rtr 1 reachability
ip route x.x.x.x x.x.x.x x.x.x.x track 1

operation 400
type icmp echo
source address x.x.x.x
destination address x.x.x.x
frequency 15
schedule operation 400
start-time now
life forever

track 400
type rtr 400 reachability

router static
address-family ipv4 unicast te2.97 x.x.x.x track 400 te2.97 x.x.x.x track 400