The Tcl procedures used to execute IOS commands in Embedded Event Manager (cli_open, cli_write ...) don't work when you start Tcl shell from command line interface. To execute IOS commands in this context, use:
- exec command to execute an exec-level command, for example exec "show ip route"
- ios_config mode command to configure the router
Note: I knew what I wrote initially did not feel right (although that's what the docs say), so I simply had to go back and so some more testing.
An in-depth version of this article is available in the CT3 wiki
You can find more Tclsh-related information in the Tclsh on Cisco IOS tutorial. Sample Tclsh scripts are available in the Tclsh script library. If you need expert help in planning, developing or deploying Tclsh scripts in your network, contact the author.

0 comments:
Post a Comment
You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.