From the blog.

Managing Digital Racket
The more I tune out, the less I miss it. But that has presented me with some complex choices for a nuanced approach to curb

Static Routes with IP SLA and Object Tracking

350 Words. Plan about 2 minute(s) to read this.

This small lab uses IP SLA to track the reachability of a remote IP. That IP SLA event is associated with a tracked object. Then a static route can be conditionally inserted into the routing table, using the tracked object. If the object is “up”, then the static route should appear in the table. If the object is down, the static route will be withdrawn.

Just for fun, I added a couple tracked objects tied to a couple of static routes with different administrative distances.

You could test my scenario with this topology. The code for the exercise follows.


! Create an IP SLA object that pings host The IP SLA
! event fires once a second, and considers down if there
! is no response in 900ms. Start the IP SLA task immediately, and
! run it indefinitely. We’ll reference the IP SLA objects later in
! a tracking object.

rtr 1
type echo protocol ipIcmpEcho
timeout 900
frequency 1
rtr schedule 1 life forever start-time now
! Create a second IP SLA object.

rtr 2
type echo protocol ipIcmpEcho
timeout 900
frequency 1
rtr schedule 2 life forever start-time now
! Create tracking objects that reference the IP SLA objects we created
! above.

track 101 rtr 1 reachability
track 102 rtr 2 reachability
! Create 2 static routes with administrative distances of 10 & 15
! respectively. These static routes are tied to the tracking objects.
! If the tracked object is down, the static route will not be present
! in the RIB.

ip route 10 track 101
ip route 15 track 102
! The net result of this configuration is as follows:
! (1) If both and are “UP” as reported by IP SLA,
! then both static routes are eligible to go into the RIB. Since
! -> has a lower administrative distance
! it be present in the routing table.
! (2) If tracking object 101 goes down, -> will
! fall out of the table. Assuming tracked object 102 is still up,
! -> will now be in the table, but with an
! AD of 15 instead of 10

Test by downing interfaces on R2 and R3 one at a time, and monitor the effect on R1’s routing table.

Also see this article “Configuring Reliable Static Routing Backup Using Object Tracking“.

Ethan Banks writes & podcasts about IT, new media, and personal tech.
about | subscribe | @ecbanks