cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
796
Views
0
Helpful
4
Replies

tcl script

jschweng
Level 1
Level 1

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.

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

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

end

Assuming the script is not interactive, this will execute the script. See http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml 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 http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6815/whitepaper_c11-492226.html . I have even written a Perl API to interface with EEM RPC which can be downloaded at http://forums.cisco.com/eforum/servlet/EEM?page=eem&fn=script&scriptId=1183 .

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

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

ok thanks for your help

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: