Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!caen!hellgate.utah.edu!csn!boulder!daemon From: louie@sayshell.umd.edu (Louis A. Mamakos) Newsgroups: comp.dcom.sys.cisco Subject: expect script to retrieve cisco router configuration information Message-ID: <34874@boulder.Colorado.EDU> Date: 8 May 91 16:38:04 GMT Sender: daemon@boulder.Colorado.EDU Lines: 33 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