Discussion:
[rancid] 3Com Switches
Steve Ousley
2008-03-14 09:56:47 UTC
Permalink
Hi



I have read online that RANCID can be used in order to backup 3Com switches
as well as just Cisco stuff. What option do I need to use on clogin in
order to do this.



Also, what setup do I need to perform (if any) on the 3Com switch in order
to enable RANCID to back up the switch? Is it simply ssh/telnet access for
RANCID.



Thanks for any help (again)



Steve Ousley
Jethro R Binks
2008-03-14 10:04:01 UTC
Permalink
Post by Steve Ousley
I have read online that RANCID can be used in order to backup 3Com
switches as well as just Cisco stuff. What option do I need to use on
clogin in order to do this.
What models of 3Com switches are you talking about? There has been recent
chat about support for the Huawei-3Com switches (5500 and similar), which
have a Cisco-like command line. However if you are asking about the older
switches (4400, 4200, 3300, etc) then it can't be done directly by rancid,
as they don't have such a command-line, it's a menu driven system, and you
can't 'dump out' the config in text.

I think some of those models had the facility to tftp the config to
somewhere, but I think it is a binary file so rancid can't really do
anything much with it.

Jethro.
Post by Steve Ousley
Also, what setup do I need to perform (if any) on the 3Com switch in order
to enable RANCID to back up the switch? Is it simply ssh/telnet access for
RANCID.
Thanks for any help (again)
Steve Ousley
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK
Steve Ousley
2008-03-14 10:15:27 UTC
Permalink
Many thanks for the quick response Jethro, this is not the answer I wanted
(We use 3Com 4400's) but I'll have to live with it. I can see why it's not
possible, and it's not too much of a problem, we will have to investigate
some other method of doing this.

Cheers again.

Steve

-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Jethro R Binks
Sent: 14 March 2008 10:04
To: rancid-***@shrubbery.net
Subject: [rancid] Re: 3Com Switches
Post by Steve Ousley
I have read online that RANCID can be used in order to backup 3Com
switches as well as just Cisco stuff. What option do I need to use on
clogin in order to do this.
What models of 3Com switches are you talking about? There has been recent
chat about support for the Huawei-3Com switches (5500 and similar), which
have a Cisco-like command line. However if you are asking about the older
switches (4400, 4200, 3300, etc) then it can't be done directly by rancid,
as they don't have such a command-line, it's a menu driven system, and you
can't 'dump out' the config in text.

I think some of those models had the facility to tftp the config to
somewhere, but I think it is a binary file so rancid can't really do
anything much with it.

Jethro.
Post by Steve Ousley
Also, what setup do I need to perform (if any) on the 3Com switch in order
to enable RANCID to back up the switch? Is it simply ssh/telnet access for
RANCID.
Thanks for any help (again)
Steve Ousley
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK
Andrew Brennan
2008-03-14 11:14:06 UTC
Permalink
While 3Com's older switches are menu driven, I believe the 3300s and 4xxx
models all permit you to "overload" the command - effectively using it as
though there was a standard CLI. You can't dump the config to text where
RANCID would then parse it, but you can script up a rather simple wrapper
and run a TFTP daemon to collect the configs (which are text files, so if
RANCID were then reading the files from the dump directory ...)

If you're familiar with Expect and the "autoexpect" script, either SSH or
Telnet into one of your switches, then issue this:

system backupConfig save <tftpd-ip> <filename> <notes-field>

... and you'll have your configs (mostly) backed up. The backup process
leaves out a few security related bit of data (ssh keys, etc.) so you may
need to include those later before you restore a config to a switch. The
autoexpect script builds a script to run exactly what you have typed. If
you modify that script to read a few arguments when you start it, you'll
be 95% done with your 4400 backup project.

andrew.
Post by Steve Ousley
Many thanks for the quick response Jethro, this is not the answer I wanted
(We use 3Com 4400's) but I'll have to live with it. I can see why it's not
possible, and it's not too much of a problem, we will have to investigate
some other method of doing this.
Cheers again.
Steve
Jethro R Binks
2008-03-14 23:10:19 UTC
Permalink
Post by Andrew Brennan
While 3Com's older switches are menu driven, I believe the 3300s and
4xxx models all permit you to "overload" the command - effectively using
it as though there was a standard CLI. You can't dump the config to
text where RANCID would then parse it, but you can script up a rather
simple wrapper and run a TFTP daemon to collect the configs (which are
text files, so if RANCID were then reading the files from the dump
directory ...)
Hmm, I didn't know the configs saved through tftp were text files, I'd
always assumed they were binary. But then I don't think I've ever looked
... in that case your solution may well be viable and maybe I'll give it a
whirl one day (although to be honest while we have a huge legacy of the
older kit, most of our development concentrates on the newer H3C stuff).

I'm also minded to comment that there are two philosophies for using
rancid; it is certainly useful as an actual backup tool, but you have to
be aware that restoring one of those backups requires some care,
especially if you've been stripping out sensitive information like SNMP
strings (I can't remember the last time I actually needed the backup of a
switch config).

In my environment, it's actually the other functions of rancid that are
its most useful features - the notification of config changes and the
ability to review changes over time through CVS. I work in a team of
several, and it works well for us to get notified of the changes others
are making day-to-day.

Jethro.
Post by Andrew Brennan
If you're familiar with Expect and the "autoexpect" script, either SSH or
system backupConfig save <tftpd-ip> <filename> <notes-field>
... and you'll have your configs (mostly) backed up. The backup process
leaves out a few security related bit of data (ssh keys, etc.) so you may
need to include those later before you restore a config to a switch. The
autoexpect script builds a script to run exactly what you have typed. If
you modify that script to read a few arguments when you start it, you'll
be 95% done with your 4400 backup project.
andrew.
Post by Steve Ousley
Many thanks for the quick response Jethro, this is not the answer I wanted
(We use 3Com 4400's) but I'll have to live with it. I can see why it's not
possible, and it's not too much of a problem, we will have to investigate
some other method of doing this.
Cheers again.
Steve
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK

Loading...