RANCID + Catalyst or Routers

Sep 13, 2007 4 Replies

I'm trying to use RANCID to backup the configs of a few catalyst switches. I'm currently using RANCID successfully for PIX firewalls by using:



bin/clogin -c "write net" ip.address.of.firewall



However, in IOS land as you know, we have "copy running-config tftp://1.1.1.1/configname.config" When I run this as:



bin/clogin -c "copy running-config tftp://1.1.1.1/configname.config" ip.address.of.switch



RANCID is able to login to the unit, issue the command and then it times out and exits. If I telnet and do it manually from the same box, it works, but I have to confirm the host and filenames (network is configed properly, this should work). I can't figure out how to get RANCID to confirm these entries and according to all the docs I've read through we can't do a single line copy to tftp.



I've also tried unsuccessfully:



bin/clogin -c "copy running-config tftp:;1.1.1.1;configname.confg" ip.address.of.switch



Been looking through docs and so forth, only thing I've come close to is the man page of clogin which acknowledges that copy run tftp on IOS requires more input characters but I have not found how to get this going. Any help would be greatly appreciated.



TIA,



Adam



try creating an exec alias on each router:

config t alias exec bkupcfg copy running-config tftp://1.1.1.1/.config end wri mem

bkupcfg

bin/clogin -c "bkupcfg" ip.address.of.firewall

On 13.09.2007 03:01 snipped-for-privacy@layer8group.com wrote

Adam,

try bin/clogin -c "copy running-config tftp://1.1.1.1/configname.config\\r\\r\\r" ip.address.of.switch

or use alias comamnd as suggested (which I would prefer. I always only say "wr mem; save" where save is may alias)

Arnold

there is also the ability to supress the prompts from the copy command using the "file prompt quite" config command

be careful with this one though ...

#config Configuring from terminal, memory, or network [terminal]? t Enter configuration commands, one per line. End with CNTL/Z. (config)#file prompt quiet (config)#end #bkupcfg

7216 bytes copied in 0.396 secs (18222 bytes/sec) #

Arnold, Thanks for your note. the \r\r\r worked while the alias still asked for more input (did not work). What does the \r\r\r do specifically? Is there a document somewhere?

Thanks everyone for your help!

Adam

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required