• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 888
  • Last Modified:

Cisco Catalyst CLI Commands in CiscoWorks

Hello,

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.

Thanks!
0
jhsaun
Asked:
jhsaun
1 Solution
 
Vito_CorleoneCommented:
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.
rtrcmd.txt
0
 
mikebernhardtCommented:
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.
0
 
jhsaunAuthor Commented:
Thanks for the replies.  My apologies for the delayed response.

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

Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now