conditionally originating default routes in OSPF


let’s say you have a static route to your ISP:

ip route

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 track 1

ip sla 1


freq 5

track 1 ip sla 1 reachability

ip prefix-list myispprefix permit

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. 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
threshold 300
frequency 5
ip sla schedule 1 life forever start-time now

ip route track 1
ip route 2

Then, I imported the Netemu appliance from 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 RTT=605 Over thresh 5 seconds ago

R4#show track 1
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
Tracked by:
Static IP Routing 0

I love, love, love GNS3.