Search This Blog & Internet

Wednesday, April 27, 2011

TCL within CiscoWorks

I wrote the following script which shut down the unused interfaces (status "down") on Catalyst 2960. When I copied and pasted the script via SSH, it was working fine without any error message, but when I executed it via CiscoWorks (RME 4.3.1) the job failed with the following error message:

tclsh
Switch(tcl)#
for {set x 0} {$x<24} {incr x} {
missing  close-brace
Switch(tcl)#
set etat [string range [lrange [exec sh ip int  brief | i FastEthernet0/$x] 4 4] 0 4 ]
can't read "x": no such variable 
Switch(tcl)#
if { [string equal $etat "down"] } {
missing close-brace 
Switch(tcl)#
puts [ios_config "Interface FastEthernet0/$x"  "shut"]
can't read "x": no such variable
Switch(tcl)#
}
invalid  command name "}"
}
^
% Invalid input detected at '^' marker.

Switch(tcl)#
}
invalid command name "}"
}
^
% Invalid  input detected at '^' marker.

Tuesday, April 19, 2011

Upload IOS from ROMMon mode

Here is the steps to follow when you want to upload an IOS to your Cisco router from ROMMon mode:

You need to run the TFTP server on your PC. Connect your PC to LAN port of your router, configure your PC with the IP address which is assigned to the TFTP server (192.168.16.19 in this example) and type the following commands:

CUBAC “database update error”

While adding the Speed Dial  numbers to your CUBAC version 3.1, you may get “database update error” error message. On Cisco website  the solution is disabling the Antivirus. If by disabling the Antivirus it still gives you the same error message, you only need to reboot your Auto Attendant Console server. The reboot will fix the issue.