Cisco Catalyst CLI Commands in CiscoWorks

Posted on 2010-01-12
Medium Priority
Last Modified: 2012-05-08

I have recently implemented CiscoWorks on our LAN and am trying to automate some of my chores.

We regularly have switch ports that need to be disabled at all hours and I would like to backup my configs to a separate TFTP server.

There are templates in NetConfig that have some common tasks already filled with the CLI information, but none that apply to what I am trying to do.  I would like to put the CLI commands in and schedule them, but am uncertain on how to do this.  I know the commands to use when accessing the switch directly, but need help on the CLI input on CiscoWorks.

All of my edge switches are Catalyst 3560's.

Any help is appreciated.

Question by:jhsaun
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 26298188
Not sure how to do it in CiscoWorks, but I have a great Perl script that will do what you want.

rtr_cmd.pl Ver 0.9  Not so Copyright 2001 DaveCo Industries

Sends multiple commands to Cisco routers and records the output.
usage: rtr_cmd.pl [OPTIONS] -u <username>

  -cf,          Specifies file containing a list of commands
  -rf,          Specifies file containing a list of routers
  -lf,          Specifies file to log session to
  -c,           Specifies single command to run
  -r,           Specifies single router to run command on
  -u,           Username
  -e,           Enable Password (if necessary)
  -l,           Specifies whether to log each session individualy

I'm attaching the script.
LVL 28

Accepted Solution

mikebernhardt earned 2000 total points
ID: 26305630
What you want is an "ad hoc" script. With this, you can put in any commands you want.

As far as backups, the easiest way is to configure your switches to send syslog to Ciscoworks. Then you can configure ciscoworks to back up the switch everytime it receives a "configured" trap via syslog. You can also script it to backup all of your devices at regular intervals. In both cases, Ciscoworks will keep whatever number of historical configs you tell it to, so that you can go back if you need to.

Author Comment

ID: 26349907
Thanks for the replies.  My apologies for the delayed response.

Configuring backups when receiving syslog traps does what I need in RME.

Thank you.

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question