Cisco + Linux How to store configs in one script?

Hi gents, I'm trying to increase my skills in router management but it aint easy! I tried to do a linux shell script that made a sh run in each of my routers, the exit of this script goes directly to a file so I could keep/change my configs in one "click"

but i obtain this result : Conecting 10.20.38.1 Trying 10.20.38.1... Connected to 10.20.38.1 (10.20.38.1). Escape character is '^]'.

Reply to
Sako
Loading thread data ...

I use EXPECT. You can ask question on it on "comp.*.tcl" NG. Sorry I don't remember * in the middle.

HTH

Alex.

Reply to
AM

One possible solution would be to log into the router and copy the running or startup config to a tftp server instead of trying to parse a sh run. You could place them into a project or CSV directory and even name them using a variable.

copy running-config tftp:///directory/%hostname.config copy startup-config tftp:///directory%hostname.config

Etc

Reply to
mikenipp

Personally I wouldn't re-invent the wheel (unless I could also patent it). I use RANCID religiously.

formatting link
It's a great tool. It connects via telnet or ssh to pull down the config, filesystem details, and more; stores each config in CVS; diffs the current and previous version; and finally emails the any differences between the 2 versions to you. This is an excellent way to keep an eye on your hardware. It's not something I would expect a would-be-attacker to think of when compromising a Cisco. A changes (even to the stores IOS image) will be picked up by RANCID. I run RANCID every 4 hours on all of my hardware.

There are other tools that do the same thing. Cisco points users to the COSI-NMS project.

formatting link
Browse that site and you'll find other similar applications.

J
Reply to
J

Reply to
Doug McIntyre

I should really start proof-reading my posts before I click send...

Reply to
J

Thanks to you all I'll try RANCID , sounds fine !

I would do copy run tftp but I couldn't even log-on by telnet with the script

THANKS, once again.

Sako ha escrito:

Reply to
Sako

As fas as I recall Windows telnet is broken and can not accept input from stdio.

As suggested to do your own scripting use Expect. It is rumoured that TerraTerm has good scripting tools.

In addition you can do a config download using snmp.

Reply to
anybody43

Reply to
seanlsimon

On 08.08.2006 10:34 Sako wrote

Reply to
Arnold Nipper

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.