let’s say you have a static route to your ISP:
ip route 18.104.22.168 255.255.255.255 192.168.0.1
and now you want to send down a default route based on the availability of the connection to this ISP.
here’s the config
ip route 22.214.171.124 255.255.255.255 192.168.0.1 track 1
ip sla 1
track 1 ip sla 1 reachability
ip prefix-list myispprefix permit 126.96.36.199/32
route-map isp1prefix permit 10
match ip address prefix-list myispprefix
router ospf 1
default-information-originate route-map isp1prefix
If you don’t have an ISP and you want to ”fake it”, you can use a fake route. e.g. 169.254.0.1 255.255.255.255 null0 track 1
Today I was playing with IP SLA on the default INE ipv4 topology.
I created the following config on R4:
track 1 ip sla 1 state !!!state is the default value!!!
ip sla 1
ip sla schedule 1 life forever start-time now
ip route 188.8.131.52 255.255.255.255 184.108.40.206 track 1
ip route 220.127.116.11 255.255.255.255 18.104.22.168 2
Then, I imported the Netemu appliance from http://www.bernhard-ehlers.de/projects/netem/index.html and introduced a 600ms delay on the link between R4 and the interconnecting switch.
The result is as follows:
R4#show ip sla summary
IPSLAs Latest Operation Summary
Codes: * active, ^ inactive, ~ pending
ID Type Destination Stats Return Last
(ms) Code Run
*1 icmp-echo 22.214.171.124 RTT=605 Over thresh 5 seconds ago
R4#show track 1
IP SLA 1 state
State is Down
1 change, last change 00:00:23
Latest operation return code: Over threshold
Latest RTT (millisecs) 604
Static IP Routing 0
I love, love, love GNS3.