I am tasked to do conditonally advertise a default route using RIP only if a specific IP address is ICMP reachable. (Yes, CCIE study, not a real network design).
My idea was to use the track object matching feature to accomplish this task:
R1#show run | s route-map|sla|track|router rip
track 1 ip sla 1
router rip
version 2
network 150.1.0.0
network 155.1.0.0
default-information originate route-map RELIABLE_DEFAULT
no auto-summary
ip sla 1
icmp-echo 155.1.7.7
frequency 5
ip sla schedule 1 life forever start-time now
route-map RELIABLE_DEFAULT permit 10
match track 1
The track object and SLA is actually working fine and the route-map is registered with the track object:
R1#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.7.7 RTT=12 OK 0 seconds ago
R1#show track 1
Track 1
IP SLA 1 state
State is Up
2 changes, last change 00:08:55
Latest operation return code: OK
Latest RTT (millisecs) 12
Tracked by:
Route Map 0
This however does not work (no default route is advertised). Preferred solution is to use a dummy static route like this which is actually working.
ip sla 1
frequency 5
icmp-echo 155.1.7.7
ip sla schedule 1 start-time now life forever
track 1 ip sla 1
!
ip route 169.254.0.1 255.255.255.255 Null0 track 1
!
ip prefix-list DUMMY_ROUTE seq 5 permit 169.254.0.1/32
!
route-map RELIABLE_DEFAULT permit 10
match ip address prefix-list DUMMY_ROUTE
!
router rip
default-information originate route-map RELIABLE_DEFAULT
I understand why this solution works, however I do not understand why mine does not. Any ideas?