Reporting a state of an IP route
Have you ever wanted to be notified when your router loses a specific route (for example, the default route toward the Internet)? In IOS release 12.4T you can do it with a combination of Enhanced Object Tracking and Embedded Event Manager 2.2.
As the first step, you configure a track object that will monitor the state of an IP route with the track ip route command.
track 100 ip route 0.0.0.0 0.0.0.0 reachabilityAfter the track object has been created, you can monitor its state with an EEM applet (in the configuration example it only generates a syslog message, but you could also send an email to the network administrator).
event manager applet TrackRoute_0.0.0.0And now a test run ...
event track 100 state any
action 1.0 syslog msg "route is $_track_state"
a1#conf tAs you can see from the example, there is a significant delay before the track object responds to a route change. You can adjust this delay with the track timer ip route seconds global configuration command (default is 15 seconds).
Enter configuration commands, one per line. End with CNTL/Z.
a1(config)#ip route 0.0.0.0 0.0.0.0 loopback 0
a1(config)#^Z
01:08:47: %SYS-5-CONFIG_I: Configured from console by console
01:08:51: %HA_EM-6-LOG: TrackRoute_0.0.0.0: route is up
a1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
a1(config)#interface loopback 0
a1(config-if)#shutdown
01:09:10: %SYS-5-CONFIG_I: Configured from console by console
01:09:11: %LINK-5-CHANGED: Interface Loopback0, changed state to administratively down
01:09:21: %HA_EM-6-LOG: TrackRoute_0.0.0.0: route is down
Nice example!
Is this possible through MPLS to? You shutdown a local interface, what if the routing beetween sites a down?
/Kenny
I want to track a BGP route in the routing table of a 6500 switch.Once I recieve that route I want to shut my interface vlan (SVI) on the 6500 switch .Is this possible?
Thanks
My scenario is that I have got a directly connected network to a 6500 switch.This switch has got a BGP relationship with another peer.If I start recieiving a BGP advertisement for the directly conected route from the peer I want to shut down the interface vlan SVI for the directly connected network.Since the route will not get installed in the routing table till a directly connected network is present.I will be tracking another route based on which I want to trigger this action.
Thanks
I have sent you an Email with the details of the scenario.
Thanks
The folowing cisco link states that in new 6500 image SXI EEM 2.4 is supported with Enahnced object tracking:
http://www.cisco.com/en/US/prod/collateral/iosswrel/ps8802/ps6970/ps6017/ps9673/product_bulletin_c25-503086.html
Thanks