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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote tool to manage switch / router config 3

Status
Not open for further replies.

jkeeper

MIS
Jul 19, 2000
69
0
0
US
Hello!!

I would like to know of (low cost)tools that will allow me to remotely
manage switchs and routers config files. Try to cut down on travel but still be able to manage devices.


-Thanks
-JKeeper
 
telnet?
shnypr-small.gif
 
If you also are thinking on security, try secure shell to an on-site host and telnet from there to your routers/switches =)

cheers,
 
You may write a PERL script using snmpset to get the config regularly to a server. Please let me know if you want to have the code.
 
Attached the perl script for your reference. Please note that it requires the lib from MRTG.

Fill in the IP in @hosts and the write community string in @test.


#!/usr/bin/perl -w
#use lib "c:\\mrtg\\lib\\mrtg2";
use SNMP_util;
my @hosts = (
'10.10.10.1',
'20.20.20.2',
);
sub DoMain {
my $host = shift;
my $community = shift;
my $ran = time();
my $composite = $community.'@'.$host.':::::2';
my ($hostname) = &snmpget($composite,'sysName');
# my ($hostname) = &snmpget($composite,'sysName');
if ($hostname =~ /\./) {
$hostname =~ s/^(.+?)\..*$/$1/;
}
my $file = $hostname."-confg";
$file =~ s/(.+)/\L$1\E/;
my @createngo = ($composite);
push @createngo, "ccCopyProtocol.$ran",'integer',1;
push @createngo, "ccCopySourceFileType.$ran",'integer',4;
push @createngo, "ccCopyDestFileType.$ran",'integer',1;
push @createngo, "ccCopyServerAddress.$ran", 'ipAddress', '30.30.30.1';
push @createngo, "ccCopyFileName.$ran",'octetstring',$file;
push @createngo, "ccCopyEntryRowStatus.$ran",'integer',4;

my @response = &snmpset(@createngo);
my @test = ($composite);
push @test, "ccCopyState.$ran";
push @test, "ccCopyEntryRowStatus.$ran";
push @test, "ccCopyFailCause.$ran";
return @test;
}
&snmpQueue_MIB_File("c:\\mib\\CISCO-SMI-V1SMI.my");
&snmpQueue_MIB_File("c:\\mib\\CISCO-CONFIG-MAN-MIB-V1SMI.my");
&snmpQueue_MIB_File("c:\\mib\\CISCO-CONFIG-COPY-MIB-V1SMI.my");

my @tests;
while ($#hosts >=0) {
while ($#tests < 5) {
last if $#hosts == -1;
$h = shift @hosts;
push @tests, [ &DoMain($h,'public') ] ;
}
$t = shift @tests;
my @rt = &snmpget(@$t);
foreach my $r (@rt) {
print $r .&quot;\n&quot;;
}
if ($rt[0] == 2) { push @tests, $t}
}
exit;
 
Have a look at CatTools from
It's freeware and does a lot of things like collecting configs, applying commands, etc. on Cisco switches and routers. If you pay them a few bucks you get the enhanced version with a scheduler to perform actions on a regular basis and the ability to save statistics to files.

Cheers *Rob
 
Hi,

I wrote a short FAQ in the Cisco Routers forum on &quot;how to retrieve a config using SNMP&quot;. You can use the MIB value described there in a simple script to retrieve the configurations of all your routers.

Cheers,
Phil. If everything is coming your way then you're in the wrong lane.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top