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 192.168.1.0 255.255.255.252 10.1.1.2”
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 192.168.1.0 255.255.255.252 10.1.1.2”
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.

IOS:
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

XR:
ipsla
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
63.217.25.200/29 te2.97 x.x.x.x track 400
63.216.144.48/28 te2.97 x.x.x.x track 400

Advertisements