From afort at choqolat.org Sun May 2 01:05:08 2004 From: afort at choqolat.org (Andrew Fort) Date: Sun, 02 May 2004 11:05:08 +1000 Subject: Custom RANCID modules In-Reply-To: <1083354159.3818.5.camel@localhost.localdomain> References: <1083354159.3818.5.camel@localhost.localdomain> Message-ID: <40944944.40705@choqolat.org> Joshua Ginsberg wrote: > I was wondering if anybody had any experience or pointers for somebody > trying to begin creating RANCID modules for other types of networking > equipment. I've looked at the code base, and I'm not really able to make > heads or tails of how it all works. Thanks for any help you could > provide. If the device is vastly different than one of the others already in the distribution, you're going to need to produce *login program (normally written in expect) and an output parser *rancid program (which produces the data checked into CVS). I've hacked with a couple of them (alteon, riverstone) that are in the distribution now; so the maintainers can provide you some more answers I'm sure. My suggestions are: - Try to modify what is in clogin (to handle your new device without breaking others using it) if the device works similarly enough (method of logging in, etc) to a cisco. This applies for other login/parser pairs, also. For example, Foundry made their CLI just different enough from Cisco IOS syntax that there are separate program for each of those vendors. - expect doesn't have the most obvious syntax, so you'll need to stare at the code for longer than you would a more popular language. If you are successful, hallucinations and madness will ensue. At this time, you will be "expected". The O'Reilly "Exploring Expect" book (Libes) is rumored to assist if you have the patience for it (I'm not sure whether it's not a good book, or tcl is the culprit). - Ask plenty of questions, and consider people who may use the equipment how you do not (for example, those who use TACACS+/RADIUS auth where you do not, or vice versa). Oh.. what is the device, by the way? :) -afort From joshg at brainstorminternet.net Mon May 3 14:37:20 2004 From: joshg at brainstorminternet.net (Joshua Ginsberg) Date: Mon, 03 May 2004 08:37:20 -0600 Subject: Custom RANCID modules In-Reply-To: <40944944.40705@choqolat.org> References: <1083354159.3818.5.camel@localhost.localdomain> <40944944.40705@choqolat.org> Message-ID: <1083595039.3018.3.camel@localhost.localdomain> Thanks for your reply, Andrew. So let the questions begin... :-D I'm not the Perl Gods' gift to mankind, so could somebody briefly explain to me what sub ProcessHistory does? And to answer your question, my boss has instructed me to make RANCID modules for Copper Mountain Copper Edge DSLAM's and for Lucent Stinger DSLAM's. Thanks again. -jag On Sat, 2004-05-01 at 19:05, Andrew Fort wrote: > Joshua Ginsberg wrote: > > > I was wondering if anybody had any experience or pointers for somebody > > trying to begin creating RANCID modules for other types of networking > > equipment. I've looked at the code base, and I'm not really able to make > > heads or tails of how it all works. Thanks for any help you could > > provide. > > If the device is vastly different than one of the others already in the > distribution, you're going to need to produce *login program (normally > written in expect) and an output parser *rancid program (which produces > the data checked into CVS). > > I've hacked with a couple of them (alteon, riverstone) that are in the > distribution now; so the maintainers can provide you some more answers > I'm sure. My suggestions are: > > - Try to modify what is in clogin (to handle your new device without > breaking others using it) if the device works similarly enough (method > of logging in, etc) to a cisco. This applies for other login/parser > pairs, also. For example, Foundry made their CLI just different enough > from Cisco IOS syntax that there are separate program for each of those > vendors. > > - expect doesn't have the most obvious syntax, so you'll need to stare > at the code for longer than you would a more popular language. If you > are successful, hallucinations and madness will ensue. At this time, > you will be "expected". > > The O'Reilly "Exploring Expect" book (Libes) is rumored to assist if you > have the patience for it (I'm not sure whether it's not a good book, or > tcl is the culprit). > > - Ask plenty of questions, and consider people who may use the equipment > how you do not (for example, those who use TACACS+/RADIUS auth where you > do not, or vice versa). > > Oh.. what is the device, by the way? :) > > -afort -- Joshua Ginsberg Network Operations -- Brainstorm Internet From anchi_zhang at yahoo.com Tue May 4 21:07:41 2004 From: anchi_zhang at yahoo.com (Anchi Zhang) Date: Tue, 4 May 2004 14:07:41 -0700 (PDT) Subject: what to do with "proceed (y/n) [n]?" Message-ID: <20040504210741.17795.qmail@web60704.mail.yahoo.com> How would you use Rancid to handle situations like one below? 1km-dmz-cx1> (enable) copy config slot0:config This command uploads non-default configurations only. Use 'copy config all' to upload both default and non-default configurations. Upload configuration to slot0:config 18355672 bytes available on device slot0, proceed (y/n) [n]? y ............... From michaelj at ntscom.com Mon May 3 14:46:44 2004 From: michaelj at ntscom.com (Mike J) Date: Mon, 3 May 2004 09:46:44 -0500 Subject: help with TNT's Message-ID: I was wondering if anybody had any experience or problems using RANCID with Lucent Ascend TNT's. I can't find much documentation on the Lucent TNT's and Rancid. Any ideas or help would be greatly appreciated. Mike michaelj at nts-online.net From asp at partan.com Wed May 5 03:44:17 2004 From: asp at partan.com (Andrew Partan) Date: Tue, 4 May 2004 23:44:17 -0400 Subject: what to do with "proceed (y/n) [n]?" In-Reply-To: <20040504210741.17795.qmail@web60704.mail.yahoo.com> References: <20040504210741.17795.qmail@web60704.mail.yahoo.com> Message-ID: <20040505034417.GC12185@partan.com> On Tue, May 04, 2004 at 02:07:41PM -0700, Anchi Zhang wrote: > How would you use Rancid to handle situations like one below? > > 1km-dmz-cx1> (enable) copy config slot0:config > This command uploads non-default configurations only. > Use 'copy config all' to upload both default and non-default > configurations. > > Upload configuration to slot0:config > > 18355672 bytes available on device slot0, proceed (y/n) [n]? y > ............... > > --0-1985934314-1083704861=:17368-- Take a look at cisco-load.exp and cisco-reload.exp (both distributed as example scripts with rancid) and see if either can be modified to do what you need. --asp From heas at shrubbery.net Wed May 5 06:57:04 2004 From: heas at shrubbery.net (john heasley) Date: Wed, 5 May 2004 06:57:04 +0000 Subject: help with TNT's In-Reply-To: References: Message-ID: <20040505065704.GB25156@shrubbery.net> Mon, May 03, 2004 at 09:46:44AM -0500, Mike J: > I was wondering if anybody had any experience or problems using RANCID with > Lucent Ascend TNT's. I can't find much documentation on the Lucent TNT's and > Rancid. Any ideas or help would be greatly appreciated. > > Mike > michaelj at nts-online.net The tnt module was contributed, we dont have any ourselves. perhaps if you describe your problem, we can help debug. From heas at shrubbery.net Wed May 5 07:13:58 2004 From: heas at shrubbery.net (john heasley) Date: Wed, 5 May 2004 07:13:58 +0000 Subject: Custom RANCID modules In-Reply-To: <1083595039.3018.3.camel@localhost.localdomain> References: <1083354159.3818.5.camel@localhost.localdomain> <40944944.40705@choqolat.org> <1083595039.3018.3.camel@localhost.localdomain> Message-ID: <20040505071358.GC25156@shrubbery.net> Mon, May 03, 2004 at 08:37:20AM -0600, Joshua Ginsberg: > Thanks for your reply, Andrew. So let the questions begin... :-D > > I'm not the Perl Gods' gift to mankind, so could somebody briefly > explain to me what sub ProcessHistory does? ProcessHistory(tag, command, command arg, line) command is one of the functions keynsort, keysort, valsort, numsort, or ipsort. see the comments. basically, lines (of the output collected from the router) are "buffered" or "queued" with the given command and tag until of them changes, at which point the buffer is flushed. so, /^Cisco Secure PIX /i && ProcessHistory("COMMENTS","keysort","F1", "!Image: $_") && next; /^This PIX has an?\s+(.*)$/ && ProcessHistory("COMMENTS","keysort","C1", "!$_") && next; lines matching these would be buffered and sorted with keysort whose arg is F1 or C1. if it then hit /^Serial Number:\s+(.*)$/ && ProcessHistory("FOO","keysort","C1", "!$_") && next; or /^(HD unit \d), idb/ && ProcessHistory("INT","","","!Interface: $1\n") && next; the buffer would be flushed due to tag or command change, respectively. From afort at choqolat.org Thu May 6 04:20:46 2004 From: afort at choqolat.org (Andrew Fort) Date: Thu, 06 May 2004 14:20:46 +1000 Subject: Custom RANCID modules In-Reply-To: <1083595039.3018.3.camel@localhost.localdomain> References: <1083354159.3818.5.camel@localhost.localdomain> <40944944.40705@choqolat.org> <1083595039.3018.3.camel@localhost.localdomain> Message-ID: <4099BD1E.1080307@choqolat.org> On 4/05/2004 12:37 AM, Joshua Ginsberg wrote: >And to answer your question, my boss has instructed me to make RANCID >modules for Copper Mountain Copper Edge DSLAM's and for Lucent Stinger >DSLAM's. > >Thanks again. > >-jag > > I think I still have some Stingers in the labs, I think there's even some modules in them, still. I should be able to help you test if they haven't died :-) -afort From arnold at nipper.de Wed May 12 21:47:31 2004 From: arnold at nipper.de (Arnold Nipper) Date: Wed, 12 May 2004 23:47:31 +0200 Subject: ssh with authorized_keys Message-ID: <40A29B73.8020107@nipper.de> I'm trying to use rancid for quagga as well. Quagga either supports access via telnet on port 260x or via vtysh/ssh. To use rancid with telnet on port 260x works quite well, but I run into problems when I want to use it with vtysh/ssh. Obviously rancid also expects to login via username/password. When using ssh & ssh-agent I no longer need an username/password. I fiddled around with different settings but can not convince rancid to not echo the username. It always looks like Hello, this is quagga (version 0.96.4). Copyright 1996-2002 Kunihiro Ishiguro. rs1> quagga % Unknown command. rs1> Any ideas how to configure this? Arnold From asp at partan.com Wed May 12 21:55:13 2004 From: asp at partan.com (Andrew Partan) Date: Wed, 12 May 2004 17:55:13 -0400 Subject: ssh with authorized_keys In-Reply-To: <40A29B73.8020107@nipper.de> References: <40A29B73.8020107@nipper.de> Message-ID: <20040512215513.GA24380@partan.com> On Wed, May 12, 2004 at 11:47:31PM +0200, Arnold Nipper wrote: > To use rancid with telnet on port 260x works quite well, but I run into > problems when I want to use it with vtysh/ssh. Obviously rancid also > expects to login via username/password. When using ssh & ssh-agent I no > longer need an username/password. I fiddled around with different > settings but can not convince rancid to not echo the username. It always > looks like jlogin does not insist on sending the username. Have you tried jlogin? Or just clogin? --asp From arnold at nipper.de Wed May 12 22:08:49 2004 From: arnold at nipper.de (Arnold Nipper) Date: Thu, 13 May 2004 00:08:49 +0200 Subject: ssh with authorized_keys In-Reply-To: <20040512215513.GA24380@partan.com> References: <40A29B73.8020107@nipper.de> <20040512215513.GA24380@partan.com> Message-ID: <40A2A071.40804@nipper.de> On 12.05.2004 23:55 Andrew Partan wrote: > On Wed, May 12, 2004 at 11:47:31PM +0200, Arnold Nipper wrote: > >>To use rancid with telnet on port 260x works quite well, but I run into >>problems when I want to use it with vtysh/ssh. Obviously rancid also >>expects to login via username/password. When using ssh & ssh-agent I no >>longer need an username/password. I fiddled around with different >>settings but can not convince rancid to not echo the username. It always >>looks like > > > jlogin does not insist on sending the username. Have you tried jlogin? > Or just clogin? clogin at least accepts "" as password. It looks like jlogin doesn't :-( Also quagga is (almost) like cisco. And yes I'm using clogin only. That's what I meant when I said I use rancid. Arnold From asp at partan.com Wed May 12 22:15:52 2004 From: asp at partan.com (Andrew Partan) Date: Wed, 12 May 2004 18:15:52 -0400 Subject: ssh with authorized_keys In-Reply-To: <40A2A071.40804@nipper.de> References: <40A29B73.8020107@nipper.de> <20040512215513.GA24380@partan.com> <40A2A071.40804@nipper.de> Message-ID: <20040512221552.GA24523@partan.com> On Thu, May 13, 2004 at 12:08:49AM +0200, Arnold Nipper wrote: > > jlogin does not insist on sending the username. Have you tried jlogin? > > Or just clogin? > > clogin at least accepts "" as password. It looks like jlogin doesn't :-( I have a dummy password specified for jlogin; it doesn't use it. add user jr0 {aspcli} add userpassword jr0 {x} add method jr0 ssh > Also quagga is (almost) like cisco. And yes I'm using clogin only. > That's what I meant when I said I use rancid. rancid is the package plus one of the programs in the package; its kinda confusing. You might look at jlogin to see if that works to at least log into the quagga box. If that works, then look to see what jlogin does that skips the username stuff and see if there is a patch that can be make to clogin to add that ability to clogin. --asp From arnold at nipper.de Wed May 12 22:24:15 2004 From: arnold at nipper.de (Arnold Nipper) Date: Thu, 13 May 2004 00:24:15 +0200 Subject: ssh with authorized_keys In-Reply-To: <20040512221552.GA24523@partan.com> References: <40A29B73.8020107@nipper.de> <20040512215513.GA24380@partan.com> <40A2A071.40804@nipper.de> <20040512221552.GA24523@partan.com> Message-ID: <40A2A40F.9020504@nipper.de> Andrew, On 13.05.2004 00:15 Andrew Partan wrote: > You might look at jlogin to see if that works to at least log into > the quagga box. If that works, then look to see what jlogin does > that skips the username stuff and see if there is a patch that can > be make to clogin to add that ability to clogin. I'm able to login via jlogin skipping the username. I will look into jlogin tomorrow (it's already 0:30 over here). Thanks for the hints, Arnold From sven at huster.me.uk Wed May 12 15:29:14 2004 From: sven at huster.me.uk (Sven Huster) Date: Wed, 12 May 2004 16:29:14 +0100 Subject: Problem with extreme Message-ID: <20040512152914.GA29747@gate.huster.me.uk> Hello Running rancid against a Alpine 3808 ExtremeWare 6.2.2 I run into the following problem: ----------------------------------------------------------------- sven at nms-w3:~/confgs/core$ xrancid -d alpine executing clogin -t 90 -c "show version;show memory;show diagnostics;show switch;show slot;show configuration detail;show configuration" alpine PROMPT MATCH: alpine:\d+ ?# HIT COMMAND:alpine:3 # show version In ShowVersion: alpine:3 # show version HIT COMMAND:alpine:4 # show memory In ShowMemory: alpine:4 # show memory HIT COMMAND:alpine:6 # show switch In ShowSwitch: alpine:6 # show switch HIT COMMAND:alpine:8 # show configuration detail In WriteTerm: alpine:8 # show configuration detail End WriteTerm: # End of configuration file for "alpine". alpine: missed cmd(s): show configuration,show diagnostics,show slot alpine: missed cmd(s): show configuration,show diagnostics,show slot ----------------------------------------------------------------- Running the command (clogin ...) manually I get some missing characters in the output, which I guess trigger the problem: ----------------------------------------------------------------- alpine:5 # how diagnostics Syntax error at token how Available commands: clear configure create delete disable download enable exit history logout nslookup ping quit reboot restart rtlookup run save scp2 show ssh2 telnet traceroute unconfigure upload use xping alpine:6 # show switch ----------------------------------------------------------------- Any ideas? Thanks Sven From heas at shrubbery.net Fri May 14 15:59:13 2004 From: heas at shrubbery.net (john heasley) Date: Fri, 14 May 2004 08:59:13 -0700 Subject: Problem with extreme In-Reply-To: <20040512152914.GA29747@gate.huster.me.uk> References: <20040512152914.GA29747@gate.huster.me.uk> Message-ID: <20040514155913.GC11376@shrubbery.net> Wed, May 12, 2004 at 04:29:14PM +0100, Sven Huster: > Hello > > Running rancid against a Alpine 3808 ExtremeWare 6.2.2 I run into > the following problem: > Running the command (clogin ...) manually I get some missing characters in > the output, which I guess trigger the problem: > > ----------------------------------------------------------------- > alpine:5 # how diagnostics > > Syntax error at token how > > Available commands: > clear configure create delete disable download enable exit history > logout nslookup ping quit reboot restart rtlookup run save scp2 show > ssh2 telnet traceroute unconfigure upload use xping > > alpine:6 # show switch > ----------------------------------------------------------------- > > Any ideas? A WAG, clogin is stumbling over the pager. try disabling the pager, share clogin's output clogin -c .... alpine > out From dbshah at myway.com Thu May 20 12:14:28 2004 From: dbshah at myway.com (dharmesh) Date: Thu, 20 May 2004 08:14:28 -0400 (EDT) Subject: Want to add PacketShaper to RANCID Message-ID: <20040520121428.A4E2639A1@mprdmxin.myway.com> Ah well, they say its not as bad as they say it is. ---------anonymous Hi all, I am new to this list, I have browsed through the archives of this list & havent found anything specific for the PacketShaper ( http://www.packeteer.com/) . I have been successfully running RANCD v 2.3 on RH9 for IOS/CatOS devices. Now my boss has asked me to integrate PacketShaper with RANCID. I am no PERL guru , but can do a little bit of hacking by seeing other people's work. I have seen the clogin ,rancid & tntrancid scripts & understood some of its functionality. On that basis i have created a pslogin ( copy of clogin with some hacks ) & psrancid ( copy of tntrancid with some hacks ) . I can successfully login via telnet & execute a cmd(s) to a packetshaper device via the pslogin script. But my problems begin when i use psrancid, even a simple cmd like displaying system uptime sends shivers down my spine. I am attaching follwoing files for your perusal & guidance 1) Normal o/p of ps ( packetshaper) to cmds via telnet 2) o/p of pslogin to the same cmds via telnet 3) o/p of psrancid's .new file 4) my hacked up psrancid 5) my .cloginrc file 6) output of psrancid run with -dl switch & finally I request your help in aiding me to get psrancid to properly parse the o/p of the two cmds as attached in (1) I cannot attach the o/p of setup capture cmd because as of yet i am not able to do it via pslogin script as that cmd is interactive & requires user input to complete. You shall find out abt it in the setup capture-output-normal-telnet.txt file sorry if this mail fills up ur mailbox , but i feel it would help you help me out faster. Also i am attaching a zip file which has all the above said files. I could have pasted the code /& o/p here , but it would have messed up the formatting , again i know its rude to attach files on the list, but pls forgive me. Thanks in advance Regards Dharmesh _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com -------------- next part -------------- A non-text attachment was scrubbed... Name: packetshaper troubleshooting.zip Type: application/x-zip-compressed Size: 8751 bytes Desc: not available Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20040520/5d501648/attachment.bin From mmenke at porksoda.com Wed May 19 20:43:33 2004 From: mmenke at porksoda.com (Mark Menke) Date: Wed, 19 May 2004 13:43:33 -0700 Subject: Upgrade to 2.3 broke my cat5 switches. Message-ID: <40ABC6F5.7050600@porksoda.com> It seems that the upgrade from 2.2.2 to 2.3 broke my cat5's. I get the error - svl0swi00: missed cmd(s): write term When I look at the .raw file section, it seems like the warning has stomped on my command. I'm on redhat 9. ----- from svl0swi00.raw --------- set authorization commands disable console^M set authorization commands disable telnet^M end^M svl0swi00> (enable)This command shows non-default configurations only.^M Use 'write terminal all' to show both default and non-default configurations.^M ..............^M ..................^M ..................^M ....................^M ....................^M ....................^M ----- from svl0swi00.raw --------- From heas at shrubbery.net Thu May 20 16:48:56 2004 From: heas at shrubbery.net (john heasley) Date: Thu, 20 May 2004 09:48:56 -0700 Subject: Upgrade to 2.3 broke my cat5 switches. In-Reply-To: <40ABC6F5.7050600@porksoda.com> References: <40ABC6F5.7050600@porksoda.com> Message-ID: <20040520164856.GV25194@shrubbery.net> 2.3 is a bit more pedantic w/ prompt matching. The problem is that we seem to have gotten too elegant for tcl. versions prior to expect 5.40 (whatever flavour of month tcl that mates with) bugger the regex and we end-up with something very generic. I'm guessing that this is your problem and that you'll find the command embedded somewhere in the output prior to the prompt. Try expect 5.40.1 and be sure to apply the expect patch that is on www.shrubbery.net/rancid for Linux and Solaris, else you'll likely end-up with hung sessions. Wed, May 19, 2004 at 01:43:33PM -0700, Mark Menke: > It seems that the upgrade from 2.2.2 to 2.3 broke my cat5's. I get the > error - > svl0swi00: missed cmd(s): write term > > When I look at the .raw file section, it seems like the warning has > stomped on my command. > > I'm on redhat 9. > > ----- from svl0swi00.raw --------- > set authorization commands disable console^M > set authorization commands disable telnet^M > end^M > svl0swi00> (enable)This command shows non-default configurations only.^M > Use 'write terminal all' to show both default and non-default > configurations.^M > ..............^M > ..................^M > ..................^M > ....................^M > ....................^M > ....................^M > > ----- from svl0swi00.raw --------- >