I am having issues with IP SLA and tracking to inject a different default route. I am running 15.0(1)M4 so the commands are a little different than what I have used on 12.4 but I followed the 15.0 guide with no luck.
Here is what I have.
track 123 ip sla 456 reachability
delay down 10 up 10
ip address x.x.x.x x.x.x.x
ip address dhcp
ip route 0.0.0.0 0.0.0.0 x.x.x.x track 123
ip route 0.0.0.0 0.0.0.0 dhcp 254
ip sla 456
icmp-echo x.x.x.x source-ip x.x.x.x
ip sla schedule 456 life forever start-time now
If I put in this config just as it, everything starts working. The track goes up, the ip sla is running, my default route is the route that is bring tracked. However, if i unplug my cable from Gi 0/0 and take down what the ip sla is monitoring, my default route goes away, the track goes down and the ip sla is timing out.
When I plug my cable back in, the ip sla doesnt come back up, which doesnt bring the track back up, which doesnt insert my default route back in, which is not good. For whatever reason I cannot get things to come back alive. I have tried a lot of different metrics, I have tried all default settings, no luck at all. What am I missing??
I suspect that when you plug the cable back in, the route is still going through the Gig0/1, and that's why ip sla does not come back up, therefore not activating the default route expected.
Please do the test again, but this time, do the test manually - see if you can ping the device and see the default route installed.
you are right, that is the problem, but that is the issue. when the primary interface is restored, the ip sla still fails its pings, therefor never restoring the tracking back to UP and reinserting the primary default route. this worked fine on 12.4 but the 2911's dont have 12.4 code out there for download.
You can use a static route to the destination that you are testing, this way you use the static route to this host, not the default.