linkek — Cisco TCL and output redirections, SNMP polling

http://www.netcraftsmen.net/resources/archived-articles/374-tcling-your-cisco-router.html
http://www.tcl.tk/man/tcl8.5/tutorial/Tcl9.html
___________________________________________________________________

How to make a file on the router (example):

tclsh
puts [open “flash:ping-script.tcl” w+] {
foreach IP {
150.1.1.1
204.12.1.254
} { puts [ exec “ping $IP re 3 so lo0” ] }
}
tclquit
___________________________________________________________________

To make log entries in the router log:
http://wiki.nil.com/Generating_Syslog_messages_from_Tclsh

tclsh
set syslog [open “syslog:” w+]
puts $syslog “%PING-6-starting ping”
flush $syslog
exec “ping 10.0.0.2”
puts $syslog “%PING-6-finished”
close $syslog
tclquit
___________________________________________________________________

show command output redirection
http://www.cisco.com/en/US/docs/ios/12_3/configfun/command/reference/cfr_1g07.html#wp1034089
http://www.cisco.com/en/US/docs/ios/12_2t/12_2t13/feature/guide/ftshowre.html
___________________________________________________________________

SNMP MIB locator
http://tools.cisco.com/ITDIT/MIBS/servlet/index
SNMPWalk:
http://kennethhunt.com/net-observer/archives/001707.html
http://docstore.mik.ua/orelly/networking_2ndEd/snmp/appc_03.htm
SNMPWalk and TCL:
http://blog.ioshints.info/2007/10/snmp-with-tcl.html
___________________________________________________________________

NATing for local use
http://wiki.nil.com/Set_the_source_IP_address_of_EEM_SMTP_session

Leave a Reply

Your email address will not be published. Required fields are marked *

*