Cisco Command The Ultimate Little Tool

CLICK HERE FOR MORE DETAILS on how to utilize Ciscocmd to monitor you entire network at a glance and keep your finger on the pulse of your global communications infrastructure. […]

CLICK HERE FOR MORE DETAILS on how to utilize Ciscocmd to monitor you entire network at a glance and keep your finger on the pulse of your global communications infrastructure.

Cisco Command (ciscocmd) – The Ultimate Little Tool

ciscocmd is a beautiful utility written by Alain Degreffe (eczema@ecze.com). You can download ciscocmd at http://sourceforge.net/projects/cosi-nms/files/ciscocmd/. It is a simple script that runs on with both Windows and Unix. You need to have TCL/Expect loaded in order for this utility to run.

Here is the output if you run it with no input variables.

——————————————————————————————–
./ciscocmd
ioscmd v1.1 written by Alain Degreffe

Usage: ioscmd [OPTION]…
Send command(s) to cisco host.

-h –help display this help message.
-u –username define the username password.
-p –password define the telnet password.
-s –secretpassword define the enable secret password.
-t –target define the hostname to connect.
-T –targetfile define a target file (one host per line)
-c –cmd define the command to send.
-e –enable set mode enable.
-r –runfile define a file with a set of command to send.
-l –log define a logfile prefix
-a –append log will be appended to existing file
-P –prefix add the host prefix to each line
-m –maxfork define maximum forked process
-b –batchfile define a batch file to process ciscocmd output
All ciscocmd output will be piped to this batch
-d –debug define a debug file name
-q –quiet set program very quiet
——————————————————————————————–

As you can see the options are pretty self explanatory. Below are some common ways to use ciscocmd:

Example run one command for a list of devices contained in targetlist.txt:
./ciscocmd -u user -p passwd -T targetlist.txt -c “some cisco command like show running-config”

Example run one command one one device:
./ciscocmd -u user -p passwd -s enablepasswd -t target -c “some cisco cmd that requires enable access”

Example run a set of commands one multiple devices:
./ciscocmd -u user -p passwd -s enablepasswd -T targetlist.txt -r filewithcommands

Now here is where we can do something interesting. We can run a different set of commands on a list of devices. For example, you may want to look at uplink interface information across your entire campus. Only some of your switches use different uplinks. To do this, we can wrap the ciscocmd utililty in a shell script that passes it the appropriate uplink interfaces to display per switch. Here’s how you would do it:

CLICK HERE FOR MORE DETAILS on how to utilize Ciscocmd to monitor you entire network at a glance and keep your finger on the pulse of your global communications infrastructure.

SUBSCRIBE HERE for to receive useful updates and tips for Network Administration and Automation.

About berkel8