track 10 ip sla 10 reachability
delay down 5 up 5

ip sla 10
icmp-echo 8.8.8.8 source-interface GigabitEthernet0/0.100
threshold 30
timeout 3000
frequency 3
ip sla schedule 10 life forever start-time now
ip sla logging traps

ip route 0.0.0.0 0.0.0.0 192.168.100.252 track 10   <–install only when sla 10=true
ip route 0.0.0.0 0.0.0.0 172.26.100.2 100   <–otherwise use route with higher metric

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post Navigation