[comp.archives] [cisco] expect script to retrieve cisco router configuration information

"Louis A. Mamakos" <louie@sayshell.umd.edu> (05/11/91)

Archive-name: internet/route/cisco-expect/1991-05-08
Archive: ftp.cisco.com:cisco-expect.shar [131.108.1.111]
Original-posting-by: "Louis A. Mamakos" <louie@sayshell.umd.edu>
Original-subject: expect script to retrieve cisco router configuration information
Reposted-by: emv@msen.com (Edward Vielmetti, MSEN)


I have submitted a set of expect scripts (and a perl script) that I
use to help maintain cisco router configuration information to the
FTP.CISCO.COM anonymous FTP server.  Its in a file called
'cisco-expect.shar'.  'expect' may be ftp'd as pub/expect.shar.Z from
durer.cme.nist.gov.  Perl is available all over the place.

To use these scripts you'll need the 'expect' program.  In short,
there is a script which will telnet into a cisco router (you specify
the passwords) and do a WRITE NETWORK back to the host that you're
running the script on.  There is also a quicky perl script which
strips the passwords out of the configuration before it is saved away
in the archive directory.

There is also a script which will telnet to a router and do a
CONFIGURE NETWORK to modify configuration information.  This is very
useful if you want to change a bunch of routers all at once (say, to
update the name server information).

Also included is a diddly script which telnets into a cisco router to
checkpoint the IP accounting information.

There's really no documentation other than some comments in the
scripts themselves; they are really quite short and easy to understand
if you understand how 'expect' works.

If you have any new and improved versions or improvements, please let
me know.  They were just quick hacks that I came up with, and someone
I knew suggested that this is just the sort of thing others had
wanted.

Enjoy,
louie



-- comp.archives file verification
ftp.cisco.com
This is the cisco Systems, Inc. anonymous FTP directory. The directory and ls
commands have been disabled for security reasons. You can still access the
files you want if you know their full path and name.

Some commonly-requested files in this directory are described in the
file named README. Retreive this file for a description of these
generally useful files.

found cisco-expect ok
ftp.cisco.com:cisco-expect.shar