09-10-2009 07:45 AM
All,
Is it possible to create an applet that would monitor a remote ip address and then perform an action based on that reachability?
What I have is something like this:
RTRA->RTRB->RTRC->RTRD
I want to be able to monitor RTRC's reachability to RTRD, but I need to do it from RTRB. You can't see it above, but RTRA also connects to RTRD. If RTRB can't get to RTRD through RTRC, I want RTRB to apply a policy map in the direction of RTRA because traffic will get redirected. I'll also need RTRA to apply a policy map back in the direction of RTRB. Is this possible to do, or is there a better way of doing that?
I've got a script working that monitors the interface on RTRC, but RTRA would still need to know when RTRC can't get to RTRD somehow.
Thanks,
John
Solved! Go to Solution.
09-10-2009 07:45 AM
If you setup an IP SLA collector on RTRC that tested the required reachability to RTRD, then you could have an EEM applet policy on RTRB which used SNMP to poll the IP SLA Collector state on RTRC. If the collector went down, then you could have RTRB apply the necessary policy map.
However, RTRA wouldn't know about that unless it, too was watching the collector state on RTRC. If you actually wanted RTRB to connect to RTRA, that is possible using EEM, but only with Tcl. RTRA could easily run the same applet as RTRB, though.
The only requirements would be that RTRC supports IP SLA source operations, and that both RTRA and RTRB are IOS devices capable of supporting EEM 2.1 or higher.
09-10-2009 08:10 AM
The show event manager version command was not introduced until EEM 2.4 (e.g. 12.4(20)T). Before that, you just had to know. 12.4 mainline includes EEM 2.1. 12.4(2)T includes EEM 2.2, 12.4(11)T comes with EEM 2.3.
09-10-2009 09:06 AM
I went ahead and coded an example Tcl policy to do what you want. It will run every 60 seconds, and poll the latest operational state of an IP SLA collector on a remote device. It requires a few environment variables. For example:
event manager environment check_ipsla_ip 10.1.1.1
event manager environment check_ipsla_comm public
event manager environment check_ipsla_index 117
event manager environment check_ipsla_cmds config t;interface fa0/0;ip policy route-map redirect
In this example, the device 10.1.1.1 will be polled with a community string of public. The IP SLA collector on the device is configured with index 117. The commands to be run are separated with semi-colons. More help is available in the script header.
09-10-2009 07:45 AM
If you setup an IP SLA collector on RTRC that tested the required reachability to RTRD, then you could have an EEM applet policy on RTRB which used SNMP to poll the IP SLA Collector state on RTRC. If the collector went down, then you could have RTRB apply the necessary policy map.
However, RTRA wouldn't know about that unless it, too was watching the collector state on RTRC. If you actually wanted RTRB to connect to RTRA, that is possible using EEM, but only with Tcl. RTRA could easily run the same applet as RTRB, though.
The only requirements would be that RTRC supports IP SLA source operations, and that both RTRA and RTRB are IOS devices capable of supporting EEM 2.1 or higher.
09-10-2009 08:30 AM
Grrr, it just dawned on me typing out the applet, that you will need something better than EEM 2.1 to do this. You'll actually need EEM 3.0 to do this with an applet since you need to poll the REMOTE router. With Tcl, this will be doable with your current version of code. I can code up an example if you want.
09-10-2009 09:06 AM
I went ahead and coded an example Tcl policy to do what you want. It will run every 60 seconds, and poll the latest operational state of an IP SLA collector on a remote device. It requires a few environment variables. For example:
event manager environment check_ipsla_ip 10.1.1.1
event manager environment check_ipsla_comm public
event manager environment check_ipsla_index 117
event manager environment check_ipsla_cmds config t;interface fa0/0;ip policy route-map redirect
In this example, the device 10.1.1.1 will be polled with a community string of public. The IP SLA collector on the device is configured with index 117. The commands to be run are separated with semi-colons. More help is available in the script header.
09-10-2009 08:35 AM
Joe,
How can I tell what version of eem I'm running? These are on 3745s.
Thanks!
John
09-10-2009 07:50 AM
What version of IOS are they running?
09-10-2009 08:51 AM
The 3745s are running 12.4(25) Enterprise Svcs, and the 2800 (RTRB) is running 12.4(1a).
09-10-2009 08:06 AM
Ugh. 12.4(1a). While all routers meet the EEM requirements, RTRB may see some bugs. As for IP SLA requirements, the routers must be running an image greater than IPBASE.
09-10-2009 08:55 AM
I can update that router with no issues. Is there an easy way to tell what version eem is or is that by ios version? Is there a show command that can get me this information?
09-10-2009 08:10 AM
The show event manager version command was not introduced until EEM 2.4 (e.g. 12.4(20)T). Before that, you just had to know. 12.4 mainline includes EEM 2.1. 12.4(2)T includes EEM 2.2, 12.4(11)T comes with EEM 2.3.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide