tcl script

Unanswered Question
Aug 31st, 2009

Does anyone know if its possible to run a .tcl script via snmp. Would like to write a scripts to add or delete a route and it needs to be able to be run by someone with priv level 1 access or from a network manager.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Mon, 08/31/2009 - 11:44

This is not possible directly, but you could use the CISCO-CONFIG-COPY-MIB to upload a config snippet which contains:

do tclsh flash:script.tcl


Assuming the script is not interactive, this will execute the script. See for more details on using the CONFIG-COPY-MIB.

A safer method (assuming the device supports EEM 2.4 or higher) is to use the EEM RPC system to execute EEM policies remotely. More on EEM 2.4, and EEM RPC can be found at . I have even written a Perl API to interface with EEM RPC which can be downloaded at .

jschweng Mon, 08/31/2009 - 12:27

Thanks - if we used the SNMP MIB can I run that script without being in enable mode?

Joe Clarke Mon, 08/31/2009 - 12:35

Yes, but you will need SNMP read-write credentials on the manager. That is, an SNMP SET operation is required.


This Discussion