Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cisco configuration update tool

Status
Not open for further replies.

lc21

Technical User
Sep 11, 2002
3
GB
Hi, I need to update the SNMP configuration for around 5000 Cisco switches. Does anyone know an automated tool / script that can do this. I have done a google search with no results.
Thanks
 
I use Perl and net-telnet-cisco to automate on my devices. It takes a bit of work, but once you get it going, the possibilities are endless.

this is a script I used to change the timezone on all my devices when the changes were made last year. Easily adaptable to changing snmp info. keep in mind you need Perl installed on whatever workstation you'll run this from, along with the net-telnet-cisco module:

Code:
use Getopt::Long;
GetOptions(
     "host=s"     =>     \$host,
);
  use Net::Telnet::Cisco;
	 $pass='loginpw';
	 $enable='enablepw';
  my $session = Net::Telnet::Cisco->new(Host => $host);
$session->login('login', $pass); 
$session->enable($enable);
$session->cmd("configure terminal");
$session->cmd("clock summer-time EDT recurring 2 Sun Mar 2:00 1 Sun Nov 2:00\n");
$session->cmd("end");
my @clock = $session->cmd("show clock\n");
$session->cmd("wr mem\n");
print "@clock\n";
exit;

You run it by typing: c:\perl.exe filename.pl -h hostname

With this, you can easily do a "for" loop from the DOS prompt, or you can also do a for from within the perl script, though that takes a few more lines of code. If you want to go with this option, let me know and I'll help you to get it working.

 
Just changed my router...always forget and put it off...lazy...lol
Thanks chipk. I would have forgotten by April...

Burt
 
Ha ha, glad to be of service - actually, I better go check my own routers at my new job... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top