cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1007
Views
0
Helpful
3
Replies

EEM remote login question

Xin Cheng
Cisco Employee
Cisco Employee

Hi guys,

I'm working on a solution to dynamically change ISP core routing based on the quality of one of backbone links. I'm trying to use IP SLA to monitor the MOS value, since the ISP is only transporting VOIP traffic. Once MOS value is lower than the threshold, local EEM will execute a set of commands on remote router (Note, not on local router).

for example:

event manager applet test
event ipsla operation-id 10 reaction-type mos
action 1 cli command "telnet 1.1.1.1"

I tested this applet, no luck.

I went through a pile of EEM and IP SLA documents, didn't find out any useful info or examples pertaing to this kind of scenario.  Please share me your ideas, thanks a million.

3 Replies 3

yjdabear
VIP Alumni
VIP Alumni

I think it comes down to how much control you have on the local and remote routers. Based on the feedback from "Igor" at http://blog.ioshints.info/2008/01/telnetssh-session-cannot-be-started.html, it looks doable if you have end-to-end control such as abilities to upload a Tcl script to flash or upgrade IOS when needed.

I gave my best shot today, it is lucky enough that I pulled it off.

ip sla logging traps

ip sla 10

udp-jitter 172.16.79.2 16384 codec g711alaw

ip sla schedule 10 life forever start-time after 00:01:00

ip sla reaction-configuration 10 react mos threshold-value 500 350 threshold-type immediate action-type trapAndTrigger

ip sla enable reaction-alerts

event manager applet reid-test

event ipsla operation-id 10 reaction-type mos

action 1  cli command "telnet 10.0.0.5" pattern "Username:"

action 2  cli command "cisco" pattern "Password:"

action 3  cli command "cisco" pattern "#"

action 6  cli command "config t" pattern "#"

action 7  cli command "router ospf 1" pattern "#"

action 8  cli command "area 0" pattern "#"

action 9  cli command "interface g0/3/1/1" pattern "#"

action a0 cli command "cost 100" pattern "#"

action a1 cli command "commit" pattern "#"

action a2 cli command "end" pattern "#"

action a3 cli command "quit"

action b1 cli command "telnet 10.0.0.7" pattern "Username:"

action b2 cli command "cisco" pattern "Password:"

action b3 cli command "cisco" pattern ">"

action b4 cli command "enable" pattern "Password:"

action b5 cli command "cisco" pattern "#"

action b6 cli command "config t" pattern "#"

action b7 cli command "interface g1/4" pattern "#"

action b8 cli command "ip ospf cost 100" pattern "#"

action b9 cli command "end" pattern "#"

action c1 cli command "quit"

The fact that you can do this with applets depends on the IOS version and the remote host.  I wrote a Tcl version that will work across more IOS versions and with more remote host types.  Checkout the EASy Remote Command Shell in the downloads section at http://www.cisco.com/go/easy .  It's currently designed to be run manually, but with minor changes, you can run it based on your IP SLA collector.  It also uses a flexible batch syntax for a command file that allows you to run some built-in commands on the remote host as well as embed additional Tcl code to post-process some of the data.

Review Cisco Networking for a $25 gift card