1

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?

1
  • Well waza-ari, who got it right, if anyone? My answer (EEM) or OzNetNerd's comment that points to you supportforums.cisco.com difficult to understand solution of how to use a bogus IP address hack with IP SLA? – Ronnie Royston Jul 23 '16 at 21:03
3

Perhaps the default information originate command is incompatible with IP SLA.

You've probably already seen this, but this Cisco forum post talks about using a bogus static route (the same method you used to get it to work).

https://supportforums.cisco.com/document/116336/ospf-reliable-conditional-default-routing

Using this method means that the default information originate command is not interfacing with IP SLA directly.

7
  • Why is it the wrong technology? It works and I posted also posted a reference link. Can you please do the same for your EEM suggestion? – OzNetNerd Jul 23 '16 at 14:01
  • Sure. Here's a beginners guide to get you started. EEM is the way to go. – Ronnie Royston Jul 23 '16 at 14:04
  • To be fair, I shouldn't say wrong technology. It's just that EEM is very feature rich and this is what I see being used these days. – Ronnie Royston Jul 23 '16 at 14:18
  • I know how to write EEM scripts. What I meant was, do you have any references that demonstrate others using EEM for this scenario? There should be plenty of them given that you're suggesting it's the better method. – OzNetNerd Jul 23 '16 at 14:28
  • Here are several of them. – Ronnie Royston Jul 23 '16 at 14:31
1

Some options (like Match track) in route maps are there just for PBR and not for other usages, in that case you need the dummy route as you are using a Route-map which does not work with the track option.

1
  • Thank you for your answer. Do you know of any documentation which explicitly states which options are allowed in which context? – waza-ari Jan 18 '19 at 16:31
-3

I don't know about the exam, but in the real world something like this would be done using Cisco IOS Embedded Event Manager (EEM).

See Also EEM script to report routing table change

event manager applet route-table-monitor

 event routing network 0.0.0.0/0 ge 1

 action 1.0 syslog msg "Route changed: Type: $_routing_type, Network: $_routing_network, Mask/Prefix: $_routing_mask, Protocol: $_routing_protocol, GW: $_routing_lastgateway, Intf: $_routing_lastinterface" 
19
  • Downvoter can't provide any feedback? Or, is it the resident troll(s) vandalize this site again... I bet the downvoter has never even heard of EEM. – Ronnie Royston Jul 23 '16 at 13:29
  • Cisco IOS Release 12.4T : "Enhanced Object Tracking (EOT) is now integrated with Embedded Event Manager (EEM) to allow EEM to report on status change of a tracked object and to allow EOT to track EEM objects." – Ronnie Royston Jul 23 '16 at 13:51
  • 2
    Why would you go to the trouble of writing a script when Cisco themselves provides the commands you need? – OzNetNerd Jul 23 '16 at 14:02
  • 2
    Sure it supports more features, but again, why write something custom if you don't need the extra features? It's like buying a bus when all you need is a family car. Sure, it can seat more people, but why do it? I prefer to keep things simple. It makes troubleshooting easier. Besides, a Python script would provide even more features than EEM. The reason why didn't suggest it though I'd because just like EEM, it's overkill for the task at hand. – OzNetNerd Jul 23 '16 at 14:27
  • 1
    I agree with Mike. This thread/these comments have gone on far longer than they should. As I've mentioned a couple of times already, let's just leave it up to the OP to decide how they'd like to solve the issue. In regards to implementing EEM scripts on every single individual device instead of using a single, central management server - it's your choice but I've never seen it done that way in all my years of being in IT, nor do I see the benefit. Anyway, this will be my last post on this thread as I feel the OP's question was answered long ago. – OzNetNerd Jul 24 '16 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.