conditionally originating default routes in OSPF

hello

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

ip route 80.0.0.1 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 80.0.0.1 255.255.255.255 192.168.0.1 track 1

ip sla 1

icmp-echo 192.168.0.1

freq 5

track 1 ip sla 1 reachability

ip prefix-list myispprefix permit 80.0.0.1/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

 

IP SLA on GNS3 with NETEMU

Hello

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

ip route 150.1.1.1 255.255.255.255 155.1.146.1 track 1
ip route 150.1.1.1 255.255.255.255 155.1.0.1 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.

netemu

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 155.1.146.1 RTT=605 Over thresh 5 seconds ago
old

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.