From morty at frakir.org Mon Jul 3 22:20:41 2006 From: morty at frakir.org (Mordechai T. Abzug) Date: Mon, 3 Jul 2006 18:20:41 -0400 Subject: [rancid] Re: Maximum length of config In-Reply-To: References: Message-ID: <20060703222041.GH6212@red-sonja.frakir.org> On Fri, Jun 30, 2006 at 12:52:57AM +0100, Jee Kay wrote: > I've got a device that returns 35k+ lines of config... and expect > doesn't seem to be very happy about that. Specifically it seems to > give up after roughly 29k lines - I'm guessing a buffer of some > description has filled up. Which device type? rancid is actually a collection of scripts. There are different scripts for different device types. > Sorry for the newbie expect question, but is this a known 'problem' > and if so how do I go about making it go away? :) Not a problem for me, for the device types I use. Look inside the *login script for your device type and see if it includes exp_continue in the run_commands equivalent; or match_max; or handling for full_buffer. - Morty From heas at shrubbery.net Tue Jul 4 06:56:25 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 3 Jul 2006 23:56:25 -0700 Subject: [rancid] Re: Maximum length of config In-Reply-To: <20060703222041.GH6212@red-sonja.frakir.org> References: <20060703222041.GH6212@red-sonja.frakir.org> Message-ID: <20060704065625.GA7601@shrubbery.net> Mon, Jul 03, 2006 at 06:20:41PM -0400, Mordechai T. Abzug: > On Fri, Jun 30, 2006 at 12:52:57AM +0100, Jee Kay wrote: > > > I've got a device that returns 35k+ lines of config... and expect > > doesn't seem to be very happy about that. Specifically it seems to > > give up after roughly 29k lines - I'm guessing a buffer of some > > description has filled up. > > Which device type? > > rancid is actually a collection of scripts. There are different > scripts for different device types. > > > Sorry for the newbie expect question, but is this a known 'problem' > > and if so how do I go about making it go away? :) > > Not a problem for me, for the device types I use. > > Look inside the *login script for your device type and see if it > includes exp_continue in the run_commands equivalent; or match_max; or > handling for full_buffer. feh. look at the expect patches on the rancid site. From georg.naggies at r-it.at Mon Jul 10 11:02:27 2006 From: georg.naggies at r-it.at (georg.naggies at r-it.at) Date: Mon, 10 Jul 2006 13:02:27 +0200 Subject: [rancid] run_commands adaptation for Huawei Message-ID: Hello! I'm trying to adapt Rancid for Huawei routers, by doing a "3comlogin" from clogin. Logging in is easy, with minimal adaptation of clogin. I'm having trouble though to get run_commands to work. I commented out this line -re "^\[^\n\r *]*$reprompt" {send_user -- "$expect_out(buffer)"} otherwise it breaks out of the one loop, just after the commands are sent, immediately. When I do away with the line, I never get to breaking out of the loop, though, of course. Can someone shed light on how clogin distinguishes from a prompt after commands are done, breaking out of the loop, from a prompt before commands? In other words, what's the difference between "^\[^\n\r]*$reprompt." and "^\[^\n\r *]*$reprompt" ? I have been thinking long on the regular expressions, therefore now trying my luck on the list, thanks Georg Naggies (Georg Naggies IT Service Operations - Support Problem-Management Raiffeisen Informatik GmbH A-1020 Wien, Lilienbrunngasse 7-9 T: +43 1/99 3 98 - 9354 F: +43 1/99 3 99 - 1131 M: +43-664-6275053 mailto:georg.naggies at r-it.at http://raiffeiseninformatik.at) PS code in question, clogin line 630 to 653 expect { # eating backspaces, explanation from the list archives -re "\b+" { exp_continue } # presumably, exiting the loop when commands are done -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)" } } # continuing the loop -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)" exp_continue } # continuing the loop when seeing new line -re "\[\n\r]+" { send_user -- "$expect_out(buffer)" exp_continue } # sending spaces to various "More"-prompts -re "\[^\r\n]*Press to cont\[^\r\n]*" { send " " # bloody ^[[2K after " " expect { -re "^\[^\r\n]*\r" {} } exp_continue } -re "^ *--More--\[^\n\r]*" { send " " exp_continue } -re "^<-+ More -+>\[^\n\r]*" { send_user -- "$expect_out(buffer)" send " " exp_continue } } From groberts at hcis.net Mon Jul 10 15:36:42 2006 From: groberts at hcis.net (Gary L Roberts) Date: Mon, 10 Jul 2006 10:36:42 -0500 Subject: [rancid] Unrecognized command errors Message-ID: <44B2740A.5040805@hcis.net> An HTML attachment was scrubbed... URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060710/f549d63e/attachment.html From andy at shady.org Tue Jul 11 14:40:50 2006 From: andy at shady.org (andy) Date: Tue, 11 Jul 2006 15:40:50 +0100 Subject: [rancid] Re: Huawei routers In-Reply-To: References: Message-ID: <20060711144049.GB74800@shady.org> yes but in a messy way using tftp to offload the config. $tftphost = "x.x.x.x"; needs defined. see attached, but im sure the expect coders could be far more impressive and actually do a proper one. cheers On Thu, Jun 29, 2006 at 08:40:18AM +0200, georg.naggies at r-it.at wrote: > Anyone got Rancid to work with Huawei equipment and would care to share? > > Regards, > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > -- andy andy at shady.org ----------------------------------------------- Never argue with an idiot. They drag you down to their level, then beat you with experience. ----------------------------------------------- -------------- next part -------------- #!/usr/bin/perl ## # RANCID - Really Awesome New Cisco confIg Differ # Makes Huawei Switch TFTP its current-config # Prepends other environment, power, fan, version info # # Syntax: hslogin [-l] [-d] [-f filename] host use Getopt::Std; getopts('dfl'); $log = $opt_l; $debug = $opt_d; $host = $ARGV[0]; $file = $opt_f; $tftphost = "x.x.x.x"; # This routine is used to print out the router configuration sub ProcessHistory { my($new_hist_tag,$new_command,$command_string, at string)=(@_); if((($new_hist_tag ne $hist_tag) || ($new_command ne $command)) && defined %history) { print eval "$command \%history"; undef %history; } if (($new_hist_tag) && ($new_command) && ($command_string)) { if ($history{$command_string}) { $history{$command_string} = "$history{$command_string}@string"; } else { $history{$command_string} = "@string"; } } elsif (($new_hist_tag) && ($new_command)) { $history{++$#history} = "@string"; } else { print "@string"; } $hist_tag = $new_hist_tag; $command = $new_command; 1; } # Create the tftp file, and set it 777 open(TOUCH,">/tftpboot/$host.tftp"); close(TOUCH); chmod 0777, "/tftpboot/$host.tftp"; # Main $huawei_commands=sprintf("display fan;display power;display environment;display version;tftp put flash:/vrpcfg.txt //%s/%s.tftp",$tftphost,$host); open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n"; select(OUTPUT); # make OUTPUT unbuffered if ($debug) { $| = 1; } if ($file) { print STDERR "opening file $file\n" if ($debug); print STDOUT "opening file $file\n" if ($log); open(INPUT,"< $file") || die "open failed for $file: $!\n"; } else { print "# RANCID-CONTENT-TYPE: huawei\n!\n"; print(STDERR "executing echo hslogin -c\"$huawei_commands\" $host\n") if ($debug); print(STDOUT "executing echo hslogin -c\"$huawei_commands\" $host\n") if ($debug); if (defined($ENV{NOPIPE})) { system "hslogin -c \"$huawei_commands\" $host $host.raw" || die "hslogin failed for $host: $!\n"; open(INPUT, "< $host.raw") || die "hslogin failed for $host: $!\n"; } else { open(INPUT,"hslogin -c \"$huawei_commands\" $host ) { print $line; } } close(INPUT); close(OUTPUT); From groberts at hcis.net Tue Jul 11 14:41:56 2006 From: groberts at hcis.net (Gary Roberts) Date: Tue, 11 Jul 2006 09:41:56 -0500 Subject: [rancid] temperature changes cause diffs to be sent out Message-ID: <7389588697107768e5d91073479926c4@hcis.net> Running rancid 2.3.2a the router being backed up is a Foundry FastIron SuperX-PREM. here is sample diff ! Fan controlled temperature: ! Rule 1/2 (MGMT CARDS THERMAL PLANE): 36.0 deg-C - ! Rule 2/2 (LINE CARDS THERMAL PLANE): 37.2 deg-C + ! Rule 2/2 (LINE CARDS THERMAL PLANE): 37.7 deg-C ! ! Fan speed switching temperature thresholds: ! Rule 1/2 (MGMT CARDS THERMAL PLANE): ! Speed 1: NM<----->40 deg-C @@ -54,17 +54,17 @@ ! Speed 3: 44<----->52 deg-C ! Speed 4: 48<----->55 deg-C ! Speed 5: 52<----->80 deg-C (shutdown) ! - ! Slot 1 Temperature: 36.5 deg-C - ! Slot 2 Temperature: 38.0 deg-C + ! Slot 1 Temperature: 37.0 deg-C + ! Slot 2 Temperature: 38.5 deg-C ! Slot 3 Temperature: empty ! Slot 4 Temperature: empty ! Slot 5 Temperature: empty ! Slot 6 Temperature: empty ! Slot 7 Temperature: empty ! Slot 8 Temperature: empty - ! Slot 9 Temperature: 36.0 deg-C (exhaust side), 31.5 deg-C (intake side) + ! Slot 9 Temperature: 36.0 deg-C (exhaust side), 32.0 deg-C (intake side) ! Exhaust Side Temperature Readings: ! Warning level.......: 70.0 deg-C ! Shutdown level......: 80.0 deg-C ! Intake Side Temperature Readings: it appears that everytime there is a reported temp change in the chassis, a diff is sent out. This gets somewhat annoying by days end, Whats the best way to keep the diffs from being sent out on a temp change? thanks in advance Gary From shekhar at mos.com.np Wed Jul 12 09:20:58 2006 From: shekhar at mos.com.np (Shekhar Basnet) Date: Wed, 12 Jul 2006 15:05:58 +0545 Subject: [rancid] Re: Trouble with awk In-Reply-To: References: Message-ID: <1152696058.1248.69.camel@chulu.mos.com.np> cat /usr/local/rancid/var/bsr/configs/* | ./mktop s On Wed, 2006-07-12 at 14:15, Rikard Stemland Skjelsvik wrote: > Hello! > > I'm in the process of checking out rancid and other related tools. I was > very intriged by "Managing IP Networks with Free Software" at Nanog. > When trying to run mktop i get the following error message(se below). I am > not very familiar with awk and hope that someone on the list could point > me in the right direction. > > Thank you for your time! > > > > # ./mktop /usr/local/rancid/var/bsr/configs > bsr.top > awk: ./mktop:392: sub(/^ +description +"/, "); > awk: ./mktop:392: ^ unterminated string > # cat /usr/local/rancid/var/bsr/configs | ./mktop > bsr.top > awk: ./mktop:392: sub(/^ +description +"/, "); > awk: ./mktop:392: ^ unterminated stringth an > "}" at line 63 > > > Line 389 to 394 is: > > /description "/ && (indent > 1) && (section[1] == "interfaces") && \ > (config == JUNOS) { > sub(/^ +description +"/, ""); > sub(/\";$/, ""); > new_ifdesc = $0; > next; > } > > I am running awk version: > # /usr/local/bin/awk --version > GNU Awk 3.1.4 > Copyright (C) 1989, 1991-2003 Free Software Foundation > > on: > # uname -a > SunOS okm-cw2000 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V210 > > -- > Rikard From rskjels at pogostick.net Wed Jul 12 09:41:56 2006 From: rskjels at pogostick.net (Rikard Stemland Skjelsvik) Date: Wed, 12 Jul 2006 11:41:56 +0200 (MEST) Subject: [rancid] Re: Trouble with awk In-Reply-To: <1152696058.1248.69.camel@chulu.mos.com.np> References: <1152696058.1248.69.camel@chulu.mos.com.np> Message-ID: Thank you for taking the time to answer. I have tried what you suggested and it gives the following: # cat /usr/local/rancid/var/bsr/configs/* | ./mktop awk: ./mktop:392: sub(/^ +description +"/, "); awk: ./mktop:392: ^ unterminated string Broken Pipe # The only new line is "Broken Pipe" The command "cat /usr/local/rancid/var/bsr/configs/* " works fine -- Rikard On Wed, 12 Jul 2006, Shekhar Basnet wrote: > cat /usr/local/rancid/var/bsr/configs/* | ./mktop > > s > > On Wed, 2006-07-12 at 14:15, Rikard Stemland Skjelsvik wrote: >> Hello! >> >> I'm in the process of checking out rancid and other related tools. I was >> very intriged by "Managing IP Networks with Free Software" at Nanog. >> When trying to run mktop i get the following error message(se below). I am >> not very familiar with awk and hope that someone on the list could point >> me in the right direction. >> >> Thank you for your time! >> >> >> >> # ./mktop /usr/local/rancid/var/bsr/configs > bsr.top >> awk: ./mktop:392: sub(/^ +description +"/, "); >> awk: ./mktop:392: ^ unterminated string >> # cat /usr/local/rancid/var/bsr/configs | ./mktop > bsr.top >> awk: ./mktop:392: sub(/^ +description +"/, "); >> awk: ./mktop:392: ^ unterminated stringth an >> "}" at line 63 >> >> >> Line 389 to 394 is: >> >> /description "/ && (indent > 1) && (section[1] == "interfaces") && \ >> (config == JUNOS) { >> sub(/^ +description +"/, ""); >> sub(/\";$/, ""); >> new_ifdesc = $0; >> next; >> } >> >> I am running awk version: >> # /usr/local/bin/awk --version >> GNU Awk 3.1.4 >> Copyright (C) 1989, 1991-2003 Free Software Foundation >> >> on: >> # uname -a >> SunOS okm-cw2000 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V210 >> >> -- >> Rikard > > From shekhar at mos.com.np Wed Jul 12 09:59:08 2006 From: shekhar at mos.com.np (Shekhar Basnet) Date: Wed, 12 Jul 2006 15:44:08 +0545 Subject: [rancid] Re: Trouble with awk In-Reply-To: References: <1152696058.1248.69.camel@chulu.mos.com.np> Message-ID: <1152698348.1248.80.camel@chulu.mos.com.np> I am afraid I am not able to help you out. I use Linux and it worked for me in the first shot. Maybe some experts in this list have more ideas as I am not so familiar with awk myself. [root at test mktop]# uname -a Linux test 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 i686 i386 GNU/Linux -s On Wed, 2006-07-12 at 15:26, Rikard Stemland Skjelsvik wrote: > Thank you for taking the time to answer. I have tried what you > suggested and it gives the following: > > # cat /usr/local/rancid/var/bsr/configs/* | ./mktop > awk: ./mktop:392: sub(/^ +description +"/, "); > awk: ./mktop:392: ^ unterminated string > Broken Pipe > # > > The only new line is "Broken Pipe" > > The command "cat /usr/local/rancid/var/bsr/configs/* " works fine > > > -- > Rikard > > > > On Wed, 12 Jul 2006, Shekhar Basnet wrote: > > > cat /usr/local/rancid/var/bsr/configs/* | ./mktop > > > > s > > > > On Wed, 2006-07-12 at 14:15, Rikard Stemland Skjelsvik wrote: > >> Hello! > >> > >> I'm in the process of checking out rancid and other related tools. I was > >> very intriged by "Managing IP Networks with Free Software" at Nanog. > >> When trying to run mktop i get the following error message(se below). I am > >> not very familiar with awk and hope that someone on the list could point > >> me in the right direction. > >> > >> Thank you for your time! > >> > >> > >> > >> # ./mktop /usr/local/rancid/var/bsr/configs > bsr.top > >> awk: ./mktop:392: sub(/^ +description +"/, "); > >> awk: ./mktop:392: ^ unterminated string > >> # cat /usr/local/rancid/var/bsr/configs | ./mktop > bsr.top > >> awk: ./mktop:392: sub(/^ +description +"/, "); > >> awk: ./mktop:392: ^ unterminated stringth an > >> "}" at line 63 > >> > >> > >> Line 389 to 394 is: > >> > >> /description "/ && (indent > 1) && (section[1] == "interfaces") && \ > >> (config == JUNOS) { > >> sub(/^ +description +"/, ""); > >> sub(/\";$/, ""); > >> new_ifdesc = $0; > >> next; > >> } > >> > >> I am running awk version: > >> # /usr/local/bin/awk --version > >> GNU Awk 3.1.4 > >> Copyright (C) 1989, 1991-2003 Free Software Foundation > >> > >> on: > >> # uname -a > >> SunOS okm-cw2000 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V210 > >> > >> -- > >> Rikard > > > > From rskjels at pogostick.net Wed Jul 12 12:22:43 2006 From: rskjels at pogostick.net (Rikard Stemland Skjelsvik) Date: Wed, 12 Jul 2006 14:22:43 +0200 (MEST) Subject: [rancid] Re: Trouble with awk In-Reply-To: References: <1152696058.1248.69.camel@chulu.mos.com.np> <1152698348.1248.80.camel@chulu.mos.com.np> Message-ID: The suggestion from Wim Livens fixed the problems i had. I was able to create the top-file. Thank you all for your help! On a relatet note: I would like to thank you all for rancid. I have only used the clogin script up unntil now. But that alone has saved me hours of typing and tons of frustration. ---------------------------------------------------------------------------- I am running awk version: # /usr/local/bin/awk --version GNU Awk 3.1.4 Copyright (C) 1989, 1991-2003 Free Software Foundation on: # uname -a SunOS okm-cw2000 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V210 --------------------------------------------------------------------------- -- Rikard On Wed, 12 Jul 2006, Wim Livens wrote: >> > # cat /usr/local/rancid/var/bsr/configs/* | ./mktop >> > awk: ./mktop:392: sub(/^ +description +"/, "); >> > awk: ./mktop:392: ^ unterminated string > > I'm not an awk expert and know nothing about junos, but maybe just try > backslashing that quote? > > sub(/^ +description +\"/, ""); > > It seems weird that it is escaped in the second sub but not in the > first. Both with or without the backslash work on my platform (GNU > Awk 3.1.3) but maybe that's just luck. > > Wim. > From groberts at hcis.net Wed Jul 12 20:48:30 2006 From: groberts at hcis.net (Gary Roberts) Date: Wed, 12 Jul 2006 15:48:30 -0500 Subject: [rancid] CVS question Message-ID: <1affa7c3402b9a94018c2690ddc1bea3@hcis.net> Scenario: 1 NOC is on the East Coast, and 1 NOC is on the West Coast, Problem: I wish to be able to break down my repository so that when it is viewed (via CVSWeb), The break out gives you both NOC's,, and each NOC broken into rows. So my $List_Of_Groups= would be "EastCoast WestCoast" but how do i break each down to add rows? ie: EastCoast => RowA => RowB EastCoast => RowA => RowB etc,, Thanks in advance Gary From groberts at hcis.net Sat Jul 15 02:49:13 2006 From: groberts at hcis.net (Gary L Roberts) Date: Fri, 14 Jul 2006 21:49:13 -0500 Subject: [rancid] Occam Gateways Message-ID: <44B857A9.3010807@hcis.net> We have several occams that i would like to grab configs off of. but running into problems. The OS would be considered IOS like, it asks for password then enable password, and has a show run command., I am able to clogin to the device.,,.and execute show run, no problems, but when allowing rancid to run on its own, it errors out: Trying to get all of the configs. 10.xxx.xxx.xxx: End of run not found % Unrecognized command ===================================== im not running all the "cisco like" commands in the @command table, just show run. Clues anyone? thanks in advance -- Gary From groberts at hcis.net Mon Jul 17 15:42:43 2006 From: groberts at hcis.net (Gary L Roberts) Date: Mon, 17 Jul 2006 10:42:43 -0500 Subject: [rancid] Redback timeouts lockout admin accounts Message-ID: <44BBAFF3.5040401@hcis.net> Hello All, I have an issue trying to run RANCID on a Redback SmartEdge 400. Running ./clogin produces this output: [rancid at Rancid bin]$ ./clogin 10.xxx.xxx.xxx 10.xxx.xxx.xxx spawn ssh -c 3des -x -l adminlogin 10.xxx.xxx.xxx adminlogin at 10.xxx.xxx.xxx's password: [local]REDBACK#show config Error: TIMEOUT reached [rancid at Rancid bin]$ show config bash: show: command not found Redback only allows so many admin sessions at one time to be logged into the system. And since RANCID errors out, it is not closing the ssh session. so after 1 days time, it completely locks out remote access to the router. I've removed the equipment from my router.db until a solution is found, ,but i am at a loss as to where to begin, Any suggestions? Thanks Gary From heas at shrubbery.net Mon Jul 17 15:49:43 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 17 Jul 2006 08:49:43 -0700 Subject: [rancid] Re: Redback timeouts lockout admin accounts In-Reply-To: <44BBAFF3.5040401@hcis.net> References: <44BBAFF3.5040401@hcis.net> Message-ID: <20060717154943.GA22965@shrubbery.net> Mon, Jul 17, 2006 at 10:42:43AM -0500, Gary L Roberts: > Hello All, > I have an issue trying to run RANCID on a Redback SmartEdge 400. > Running ./clogin produces this output: > > [rancid at Rancid bin]$ ./clogin 10.xxx.xxx.xxx > 10.xxx.xxx.xxx > spawn ssh -c 3des -x -l adminlogin 10.xxx.xxx.xxx > adminlogin at 10.xxx.xxx.xxx's password: > [local]REDBACK#show config > > Error: TIMEOUT reached > [rancid at Rancid bin]$ show config > bash: show: command not found see the autoenable .cloginrc option > > Redback only allows so many admin sessions at one time to be logged into > the system. > And since RANCID errors out, it is not closing the ssh session. so after > 1 days time, it completely locks out remote access to the router. > I've removed the equipment from my router.db until a solution is found, > ,but i am at a loss as to where to begin, thats an o/s bug, call redback > Any suggestions? > > Thanks > Gary > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From eravin at panix.com Mon Jul 17 16:05:21 2006 From: eravin at panix.com (Ed Ravin) Date: Mon, 17 Jul 2006 12:05:21 -0400 Subject: [rancid] Re: Redback timeouts lockout admin accounts In-Reply-To: <44BBAFF3.5040401@hcis.net> References: <44BBAFF3.5040401@hcis.net> Message-ID: <20060717160521.GA614@panix.com> On Mon, Jul 17, 2006 at 10:42:43AM -0500, Gary L Roberts wrote: > Running ./clogin produces this output: > > [rancid at Rancid bin]$ ./clogin 10.xxx.xxx.xxx > 10.xxx.xxx.xxx > spawn ssh -c 3des -x -l adminlogin 10.xxx.xxx.xxx > adminlogin at 10.xxx.xxx.xxx's password: > [local]REDBACK#show config > > Error: TIMEOUT reached > [rancid at Rancid bin]$ show config > bash: show: command not found > > > Redback only allows so many admin sessions at one time to be logged into > the system. > And since RANCID errors out, it is not closing the ssh session. so after > 1 days time, it completely locks out remote access to the router. I think I fixed that problem with clogin a couple of months ago - see patch below. clogin wasn't properly closing the SSH/telnet session if there was a timeout error. @@ -626,7 +644,7 @@ exp_continue } -re "\[\n\r]+" { exp_continue } - timeout { return 0 } + timeout { close; return 0 } eof { return 0 } } set in_proc 0 From groberts at hcis.net Mon Jul 17 16:09:00 2006 From: groberts at hcis.net (Gary L Roberts) Date: Mon, 17 Jul 2006 11:09:00 -0500 Subject: [rancid] Re: Redback timeouts lockout admin accounts Message-ID: <44BBB61C.9060501@hcis.net> Thanks John, That was it. Gary Mon, Jul 17, 2006 at 10:42:43AM -0500, Gary L Roberts: > > Hello All, > > I have an issue trying to run RANCID on a Redback SmartEdge 400. > > Running ./clogin produces this output: > > > > [rancid at Rancid bin]$ ./clogin 10.xxx.xxx.xxx > > 10.xxx.xxx.xxx > > spawn ssh -c 3des -x -l adminlogin 10.xxx.xxx.xxx > > adminlogin at 10.xxx.xxx.xxx's password: > > [local]REDBACK#show config > > > > Error: TIMEOUT reached > > [rancid at Rancid bin]$ show config > > bash: show: command not found > see the autoenable .cloginrc option > > > > Redback only allows so many admin sessions at one time to be logged into > > the system. > > And since RANCID errors out, it is not closing the ssh session. so after > > 1 days time, it completely locks out remote access to the router. > > I've removed the equipment from my router.db until a solution is found, > > ,but i am at a loss as to where to begin, > thats an o/s bug, call redback > Any suggestions? > > Thanks > Gary From heas at shrubbery.net Mon Jul 17 21:30:09 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 17 Jul 2006 14:30:09 -0700 Subject: [rancid] Re: Redback timeouts lockout admin accounts In-Reply-To: <20060717160521.GA614@panix.com> References: <44BBAFF3.5040401@hcis.net> <20060717160521.GA614@panix.com> Message-ID: <20060717213009.GI22965@shrubbery.net> Mon, Jul 17, 2006 at 12:05:21PM -0400, Ed Ravin: > On Mon, Jul 17, 2006 at 10:42:43AM -0500, Gary L Roberts wrote: > > Running ./clogin produces this output: > > > > [rancid at Rancid bin]$ ./clogin 10.xxx.xxx.xxx > > 10.xxx.xxx.xxx > > spawn ssh -c 3des -x -l adminlogin 10.xxx.xxx.xxx > > adminlogin at 10.xxx.xxx.xxx's password: > > [local]REDBACK#show config > > > > Error: TIMEOUT reached > > [rancid at Rancid bin]$ show config > > bash: show: command not found > > > > > > Redback only allows so many admin sessions at one time to be logged into > > the system. > > And since RANCID errors out, it is not closing the ssh session. so after > > 1 days time, it completely locks out remote access to the router. > > I think I fixed that problem with clogin a couple of months ago - see > patch below. clogin wasn't properly closing the SSH/telnet session > if there was a timeout error. That looks correct, though you should catch the close, but I doubt this related since the telnet/ssh would see EOF on stdin and close the network side. > @@ -626,7 +644,7 @@ > exp_continue > } > -re "\[\n\r]+" { exp_continue } > - timeout { return 0 } > + timeout { close; return 0 } > eof { return 0 } > } > set in_proc 0 > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From wim at livens.net Wed Jul 12 12:04:38 2006 From: wim at livens.net (Wim Livens) Date: Wed, 12 Jul 2006 14:04:38 +0200 Subject: [rancid] Re: Trouble with awk In-Reply-To: <1152698348.1248.80.camel@chulu.mos.com.np> References: <1152696058.1248.69.camel@chulu.mos.com.np> <1152698348.1248.80.camel@chulu.mos.com.np> Message-ID: > > # cat /usr/local/rancid/var/bsr/configs/* | ./mktop > > awk: ./mktop:392: sub(/^ +description +"/, "); > > awk: ./mktop:392: ^ unterminated string I'm not an awk expert and know nothing about junos, but maybe just try backslashing that quote? sub(/^ +description +\"/, ""); It seems weird that it is escaped in the second sub but not in the first. Both with or without the backslash work on my platform (GNU Awk 3.1.3) but maybe that's just luck. Wim. From kcolemail at gmail.com Tue Jul 18 21:22:57 2006 From: kcolemail at gmail.com (Kade Cole) Date: Tue, 18 Jul 2006 16:22:57 -0500 Subject: [rancid] Aruba Wireless Message-ID: I am experimenting with getting rancid to backup the configs on my Aruba Wireless Controllers. I am building off of clogin. These devices are similar to Cisco as they have an enable mode. They differ in that they do not have a username for the enable mode. This is the procedure: ssh login with admin username, type password, receive > prompt, type enable, type enable password, receive # prompt. I am having trouble entering enable mode. The clogin script will return the error "Error: TIMEOUT reached". Anyone out there have these Aruba Controllers or any helpful tips or pointers. Thanks for your time. Kade P. Cole From JJackson at aninetworks.com Wed Jul 19 18:32:51 2006 From: JJackson at aninetworks.com (Joseph Jackson) Date: Wed, 19 Jul 2006 11:32:51 -0700 Subject: [rancid] Monitoring Route Table with RANCID. Message-ID: First I just wanted to say that I love RANCID it's a great tool. I have been looking around trying to see if there is any easy way to get rancid to monitor the route table on 1 router? I would like it to pretty much do a show ip route and then diff any differences it see's in it. Is this easy? Thanks Joseph From david_laporte at harvard.edu Wed Jul 19 18:50:12 2006 From: david_laporte at harvard.edu (David LaPorte) Date: Wed, 19 Jul 2006 14:50:12 -0400 Subject: [rancid] Re: Monitoring Route Table with RANCID. In-Reply-To: References: Message-ID: <44BE7EE4.4050309@harvard.edu> We've been pulling interior routing tables (static, connected, ospf, rip, igrp, eigrp) on all our routers to allow us to monitor route changes and (more importantly) build a network topology off the RANCID data. The key is, if I remember correctly, to strip out the time values in the routes or you'll pick them up in a diff every hour. I can supply our diffs if anyone is interested. Dave Joseph Jackson wrote: > First I just wanted to say that I love RANCID it's a great tool. > I have been looking around trying to see if there is any easy way to > get > rancid to monitor the route table on 1 router? I would like it to > pretty much do a show ip route and then diff any differences it > see's in > it. Is this easy? > Thanks > Joseph > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From shekhar at mos.com.np Thu Jul 20 04:24:40 2006 From: shekhar at mos.com.np (Shekhar Basnet) Date: Thu, 20 Jul 2006 10:09:40 +0545 Subject: [rancid] Re: Monitoring Route Table with RANCID. In-Reply-To: <44BE7EE4.4050309@harvard.edu> References: <44BE7EE4.4050309@harvard.edu> Message-ID: <1153369480.8547.85.camel@chulu.mos.com.np> How does one do it? I would love to do that kind of thing too. Would I have to run a different instance of RANCID and tweak the software too? Can you also post your diffs? Thanks Shekhar. On Thu, 2006-07-20 at 00:35, David LaPorte wrote: > We've been pulling interior routing tables (static, connected, ospf, > rip, igrp, eigrp) on all our routers to allow us to monitor route > changes and (more importantly) build a network topology off the RANCID data. > > The key is, if I remember correctly, to strip out the time values in the > routes or you'll pick them up in a diff every hour. I can supply our > diffs if anyone is interested. > > Dave > > Joseph Jackson wrote: > > First I just wanted to say that I love RANCID it's a great tool. > > I have been looking around trying to see if there is any easy way to > > get > > rancid to monitor the route table on 1 router? I would like it to > > pretty much do a show ip route and then diff any differences it > > see's in > > it. Is this easy? > > Thanks > > Joseph > > > > > > > > _______________________________________________ > > Rancid-discuss mailing list > > Rancid-discuss at shrubbery.net > > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From mohacsi at niif.hu Thu Jul 20 07:57:18 2006 From: mohacsi at niif.hu (Mohacsi Janos) Date: Thu, 20 Jul 2006 09:57:18 +0200 (CEST) Subject: [rancid] inventory mgmt script from rancid output Message-ID: <20060720094547.R54590@mignon.ki.iif.hu> Dear All, Did anybody already write a post-processing script to extract inventory only (CPU, memory, interfaces wit their serials) from rancid output files and presents in a more easy to view format? Thanks. Regards, Janos Mohacsi Network Engineer, Research Associate, Head of Network Planning NIIF/HUNGARNET, HUNGARY Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 From david_laporte at harvard.edu Thu Jul 20 12:40:53 2006 From: david_laporte at harvard.edu (David LaPorte) Date: Thu, 20 Jul 2006 08:40:53 -0400 Subject: [rancid] Re: Monitoring Route Table with RANCID. In-Reply-To: <1153369480.8547.85.camel@chulu.mos.com.np> References: <44BE7EE4.4050309@harvard.edu> <1153369480.8547.85.camel@chulu.mos.com.np> Message-ID: <44BF79D5.9040802@harvard.edu> My diff against 2.3.1 is attached. We only run one instance of RANCID, but this is just one of several patches we apply to customize it. Dave Shekhar Basnet wrote: > How does one do it? I would love to do that kind of thing too. Would I > have to run a different instance of RANCID and tweak the software too? > Can you also post your diffs? > > Thanks > Shekhar. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rancid.patch Url: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060720/9c01c475/attachment.ksh From heas at shrubbery.net Thu Jul 20 15:40:57 2006 From: heas at shrubbery.net (john heasley) Date: Thu, 20 Jul 2006 08:40:57 -0700 Subject: [rancid] Re: inventory mgmt script from rancid output In-Reply-To: <20060720094547.R54590@mignon.ki.iif.hu> References: <20060720094547.R54590@mignon.ki.iif.hu> Message-ID: <20060720154057.GC26741@shrubbery.net> ISTR that Joe Abley did as part of the tools he spoke about at nanog. http://www.nanog.org/mtg-0210/abley.html Thu, Jul 20, 2006 at 09:57:18AM +0200, Mohacsi Janos: > Dear All, > Did anybody already write a post-processing script to extract > inventory only (CPU, memory, interfaces wit their serials) from rancid > output files and presents in a more easy to view format? Thanks. > Regards, > > Janos Mohacsi > Network Engineer, Research Associate, Head of Network Planning > NIIF/HUNGARNET, HUNGARY > Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From mohacsi at niif.hu Thu Jul 20 17:11:17 2006 From: mohacsi at niif.hu (Mohacsi Janos) Date: Thu, 20 Jul 2006 19:11:17 +0200 (CEST) Subject: [rancid] Re: inventory mgmt script from rancid output In-Reply-To: <20060720154057.GC26741@shrubbery.net> References: <20060720094547.R54590@mignon.ki.iif.hu> <20060720154057.GC26741@shrubbery.net> Message-ID: <20060720190805.U54590@mignon.ki.iif.hu> Unfortunately scripts of Joe Abley do other things: - Automatic network configuration audits about unused filters: - Automatic generation of DNS records for router interfaces - Automatic generation of graphical maps - Gathering data from BGP peers to help in choosing "maximum-prefix" session limits. Thanks anyway. Janos Mohacsi Network Engineer, Research Associate, Head of Network Planning NIIF/HUNGARNET, HUNGARY Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 On Thu, 20 Jul 2006, john heasley wrote: > ISTR that Joe Abley did as part of the tools he spoke about at nanog. > http://www.nanog.org/mtg-0210/abley.html > > Thu, Jul 20, 2006 at 09:57:18AM +0200, Mohacsi Janos: >> Dear All, >> Did anybody already write a post-processing script to extract >> inventory only (CPU, memory, interfaces wit their serials) from rancid >> output files and presents in a more easy to view format? Thanks. >> Regards, >> >> Janos Mohacsi >> Network Engineer, Research Associate, Head of Network Planning >> NIIF/HUNGARNET, HUNGARY >> Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 >> >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > From Saliel.Figueira at tivit.com.br Thu Jul 20 17:56:06 2006 From: Saliel.Figueira at tivit.com.br (Saliel Figueira) Date: Thu, 20 Jul 2006 14:56:06 -0300 Subject: [rancid] Re: inventory mgmt script from rancid output Message-ID: I just finished a quick script-thing to parse configs/* from cisco boxes and extract some of this info to a comma-delimited file. I can send it to anyone interested in picking from there ... Saliel -----Original Message----- From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Mohacsi Janos Sent: quinta-feira, 20 de julho de 2006 04:57 To: Rancid-discuss at shrubbery.net Subject: [rancid] inventory mgmt script from rancid output Dear All, Did anybody already write a post-processing script to extract inventory only (CPU, memory, interfaces wit their serials) from rancid output files and presents in a more easy to view format? Thanks. Regards, Janos Mohacsi Network Engineer, Research Associate, Head of Network Planning NIIF/HUNGARNET, HUNGARY Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From mohacsi at niif.hu Thu Jul 20 19:20:32 2006 From: mohacsi at niif.hu (Mohacsi Janos) Date: Thu, 20 Jul 2006 21:20:32 +0200 (CEST) Subject: [rancid] Re: inventory mgmt script from rancid output In-Reply-To: References: Message-ID: <20060720211855.W27059@mignon.ki.iif.hu> On Thu, 20 Jul 2006, Saliel Figueira wrote: > I just finished a quick script-thing to parse configs/* from cisco boxes > and extract some of this info to a comma-delimited file. > > I can send it to anyone interested in picking from there ... Yes, please. Send it to me. Thanks Regards, Janos Mohacsi > > Saliel > > -----Original Message----- > From: rancid-discuss-bounces at shrubbery.net > [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Mohacsi Janos > Sent: quinta-feira, 20 de julho de 2006 04:57 > To: Rancid-discuss at shrubbery.net > Subject: [rancid] inventory mgmt script from rancid output > > Dear All, > Did anybody already write a post-processing script to extract > inventory only (CPU, memory, interfaces wit their serials) from rancid > output files and presents in a more easy to view format? Thanks. > Regards, > > Janos Mohacsi > Network Engineer, Research Associate, Head of Network Planning > NIIF/HUNGARNET, HUNGARY Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 > 9F52 0D1F 00F9 AF98 > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > From salmanab at hotmail.com Thu Jul 20 22:17:56 2006 From: salmanab at hotmail.com (SALMAN ABDOLLAHI VAYEGHAN) Date: Thu, 20 Jul 2006 22:17:56 +0000 Subject: [rancid] telnet to internal devices in network Message-ID: An HTML attachment was scrubbed... URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060720/7641ee7c/attachment.html From shekhar at mos.com.np Fri Jul 21 04:02:47 2006 From: shekhar at mos.com.np (Shekhar Basnet) Date: Fri, 21 Jul 2006 09:47:47 +0545 Subject: [rancid] Re: inventory mgmt script from rancid output In-Reply-To: References: Message-ID: <1153454567.13109.30.camel@chulu.mos.com.np> I am interested. Could you please post to me? Thanks Shekhar. On Thu, 2006-07-20 at 23:41, Saliel Figueira wrote: > I just finished a quick script-thing to parse configs/* from cisco boxes > and extract some of this info to a comma-delimited file. > > I can send it to anyone interested in picking from there ... > > Saliel > > -----Original Message----- > From: rancid-discuss-bounces at shrubbery.net > [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Mohacsi Janos > Sent: quinta-feira, 20 de julho de 2006 04:57 > To: Rancid-discuss at shrubbery.net > Subject: [rancid] inventory mgmt script from rancid output > > Dear All, > Did anybody already write a post-processing script to extract > inventory only (CPU, memory, interfaces wit their serials) from rancid > output files and presents in a more easy to view format? Thanks. > Regards, > > Janos Mohacsi > Network Engineer, Research Associate, Head of Network Planning > NIIF/HUNGARNET, HUNGARY Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 > 9F52 0D1F 00F9 AF98 > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From shekhar at mos.com.np Fri Jul 21 11:08:28 2006 From: shekhar at mos.com.np (Shekhar Basnet) Date: Fri, 21 Jul 2006 16:53:28 +0545 Subject: [rancid] Re: Monitoring Route Table with RANCID. In-Reply-To: <44BF79D5.9040802@harvard.edu> References: <44BE7EE4.4050309@harvard.edu> <1153369480.8547.85.camel@chulu.mos.com.np> <44BF79D5.9040802@harvard.edu> Message-ID: <1153480106.13109.46.camel@chulu.mos.com.np> Thanks for the patch. One thing I am not clear is how to apply it? Do I just append these config lines to the rancid file? Thanks Shekhar. On Thu, 2006-07-20 at 18:25, David LaPorte wrote: > My diff against 2.3.1 is attached. We only run one instance of RANCID, > but this is just one of several patches we apply to customize it. > > Dave > > Shekhar Basnet wrote: > > How does one do it? I would love to do that kind of thing too. Would I > > have to run a different instance of RANCID and tweak the software too? > > Can you also post your diffs? > > > > Thanks > > Shekhar. > > > ______________________________________________________________________ > *** rancid-2.3.1/bin/rancid Thu Oct 6 22:40:22 2005 > --- /usr/local/rancid/bin/rancid Sat Oct 8 22:23:41 2005 > *************** > *** 578,583 **** > --- 578,698 ---- > return; > } > > + # Local modification - 02/18/03 - dlp > + # This routine prints the IP routing table on core, non-border routers > + sub ShowIPRouteConnected { > + print STDERR " In ShowIPRouteConnected: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^C|^\s+\[/) { > + #$_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!Connected Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteStatic { > + print STDERR " In ShowIPRouteStatic: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^S|^\s+\[/) { > + #$_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!Static Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteRIP { > + print STDERR " In ShowIPRouteRIP: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^R|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!RIP Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteIGRP { > + print STDERR " In ShowIPRouteIGRP: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^I|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","keysort","","!IGRP Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + sub ShowIPRouteEIGRP { > + print STDERR " In ShowIPRouteEIGRP: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^D|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!EIGRP Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteOSPF { > + print STDERR " In ShowIPRouteOSPF: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^O|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!OSPF Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > # This routine parses "dir /all ((disk|slot)N|bootflash|nvram):" > sub DirSlotN { > # Skip if this is not a 3600, 7000, 7200, 7500, or 12000. > *************** > *** 1465,1470 **** > --- 1580,1591 ---- > 'show controllers cbus' => "ShowContCbus", > 'show diagbus' => "ShowDiagbus", > 'show diag' => "ShowDiag", > + 'show ip route connected' => "ShowIPRouteConnected", > + 'show ip route static' => "ShowIPRouteStatic", > + 'show ip route rip' => "ShowIPRouteRIP", > + 'show ip route igrp' => "ShowIPRouteIGRP", > + 'show ip route eigrp' => "ShowIPRouteEIGRP", > + 'show ip route ospf' => "ShowIPRouteOSPF", > 'show module' => "ShowModule", # cat 6500-ios > 'show spe version' => "ShowSpeVersion", > 'show c7200' => "ShowC7200", > *************** > *** 1521,1526 **** > --- 1642,1653 ---- > "show controllers cbus", > "show diagbus", > "show diag", > + "show ip route connected", > + "show ip route static", > + "show ip route rip", > + "show ip route igrp", > + "show ip route eigrp", > + "show ip route ospf", > "show module", > "show spe version", > "show c7200", From georg.naggies at r-it.at Fri Jul 21 12:16:02 2006 From: georg.naggies at r-it.at (georg.naggies at r-it.at) Date: Fri, 21 Jul 2006 14:16:02 +0200 Subject: [rancid] Re: Monitoring Route Table with RANCID. In-Reply-To: <1153480106.13109.46.camel@chulu.mos.com.np> Message-ID: Shekar, look into "rancid" in the bin directory, the places where to make the additions are pretty obvious. (from line 1532 onwards) Alternatively, try the "patch"-utility, by copying David's code in a file and running, roughly patch rancid David, merci beaucoup, very useful. Made this addition which I'd like to share because I spent some time in trial & error with escaping the "*" in "show ip route vrf * bgp", sub ShowIPRouteVrfBGP { print STDERR " In ShowIPRouteVrfBGP: $_" if ($debug); while () { tr/\015//d; last if(/^$prompt/); next if (/^\s*$/); return(1) if /(Invalid input detected|Type help or )/; return(-1) if (/command authorization failed/i); if ($_ =~ /^B|^\s+\[/) { $_ = (split(",",$_,2))[0]."\n"; } else { next; } ProcessHistory("ROUTES","numsort","","!MBGP Routes: $_"); } ProcessHistory("","","","!\n"); return(0); } 'show ip route vrf * bgp' => "ShowIPRouteVrfBGP", "show ip route vrf \\* bgp", Georg shekhar at mos.com.np Gesendet von: rancid-discuss-bounces at shrubbery.net 21.07.2006 13:08 An david_laporte at harvard.edu Kopie Rancid-discuss at shrubbery.net Thema [rancid] Re: Monitoring Route Table with RANCID. Thanks for the patch. One thing I am not clear is how to apply it? Do I just append these config lines to the rancid file? Thanks Shekhar. On Thu, 2006-07-20 at 18:25, David LaPorte wrote: > My diff against 2.3.1 is attached. We only run one instance of RANCID, > but this is just one of several patches we apply to customize it. > > Dave > > Shekhar Basnet wrote: > > How does one do it? I would love to do that kind of thing too. Would I > > have to run a different instance of RANCID and tweak the software too? > > Can you also post your diffs? > > > > Thanks > > Shekhar. > > > ______________________________________________________________________ > *** rancid-2.3.1/bin/rancid Thu Oct 6 22:40:22 2005 > --- /usr/local/rancid/bin/rancid Sat Oct 8 22:23:41 2005 > *************** > *** 578,583 **** > --- 578,698 ---- > return; > } > > + # Local modification - 02/18/03 - dlp > + # This routine prints the IP routing table on core, non-border routers > + sub ShowIPRouteConnected { > + print STDERR " In ShowIPRouteConnected: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^C|^\s+\[/) { > + #$_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!Connected Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteStatic { > + print STDERR " In ShowIPRouteStatic: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^S|^\s+\[/) { > + #$_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!Static Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteRIP { > + print STDERR " In ShowIPRouteRIP: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^R|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!RIP Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteIGRP { > + print STDERR " In ShowIPRouteIGRP: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^I|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","keysort","","!IGRP Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + sub ShowIPRouteEIGRP { > + print STDERR " In ShowIPRouteEIGRP: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^D|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!EIGRP Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > + sub ShowIPRouteOSPF { > + print STDERR " In ShowIPRouteOSPF: $_" if ($debug); > + while () { > + tr/\015//d; > + last if(/^$prompt/); > + next if (/^\s*$/); > + return(1) if /(Invalid input detected|Type help or )/; > + return(-1) if (/command authorization failed/i); > + if ($_ =~ /^O|^\s+\[/) { > + $_ = (split(",",$_,2))[0]."\n"; > + } else { > + next; > + } > + ProcessHistory("ROUTES","numsort","","!OSPF Routes: $_"); > + } > + ProcessHistory("","","","!\n"); > + return(0); > + } > + > # This routine parses "dir /all ((disk|slot)N|bootflash|nvram):" > sub DirSlotN { > # Skip if this is not a 3600, 7000, 7200, 7500, or 12000. > *************** > *** 1465,1470 **** > --- 1580,1591 ---- > 'show controllers cbus' => "ShowContCbus", > 'show diagbus' => "ShowDiagbus", > 'show diag' => "ShowDiag", > + 'show ip route connected' => "ShowIPRouteConnected", > + 'show ip route static' => "ShowIPRouteStatic", > + 'show ip route rip' => "ShowIPRouteRIP", > + 'show ip route igrp' => "ShowIPRouteIGRP", > + 'show ip route eigrp' => "ShowIPRouteEIGRP", > + 'show ip route ospf' => "ShowIPRouteOSPF", > 'show module' => "ShowModule", # cat 6500-ios > 'show spe version' => "ShowSpeVersion", > 'show c7200' => "ShowC7200", > *************** > *** 1521,1526 **** > --- 1642,1653 ---- > "show controllers cbus", > "show diagbus", > "show diag", > + "show ip route connected", > + "show ip route static", > + "show ip route rip", > + "show ip route igrp", > + "show ip route eigrp", > + "show ip route ospf", > "show module", > "show spe version", > "show c7200", _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From Marek.Keerand at elisa.ee Sat Jul 22 20:01:24 2006 From: Marek.Keerand at elisa.ee (Marek Keerand) Date: Sat, 22 Jul 2006 23:01:24 +0300 Subject: [rancid] Rancid and Juniper routers Message-ID: <1C7075E499A0C040B31A3667D287652406A284@POSTKONTOR-1.int.radiolinja.ee> Hello! I want to get configs from juniper M7i router with rancid. I've added following line to .cloginrc file: add user my_junipers_address telnet_username add password my_junipers_address telnet_password When i run jlogin my_junipers_address, i get following error: Error: Check your password for my_junipers_address. So i'm doing something wrong. Can anybody please explain, what are correct actions to get config data from juniper routers. Thanks in advance, Marek -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060722/8450a75f/attachment.html From yuvalba at netvision.net.il Sun Jul 23 10:10:15 2006 From: yuvalba at netvision.net.il (Yuval Ben-Ari) Date: Sun, 23 Jul 2006 12:10:15 +0200 Subject: [rancid] Re: inventory mgmt script from rancid output Message-ID: <58D14E53A4F69C4EAF4D29171C447CC491FA45@NTX-CL.forest.netvision.net.il> I like the filter_audit tool any idea if it is still being maintained ? can anyone provide the author contact ? 10x > -----Original Message----- > From: rancid-discuss-bounces at shrubbery.net > [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of > john heasley > Sent: Thursday, July 20, 2006 5:41 PM > To: Mohacsi Janos > Cc: Rancid-discuss at shrubbery.net > Subject: [rancid] Re: inventory mgmt script from rancid output > > > ISTR that Joe Abley did as part of the tools he spoke about at nanog. > http://www.nanog.org/mtg-0210/abley.html > > Thu, Jul 20, 2006 at 09:57:18AM +0200, Mohacsi Janos: > > Dear All, > > Did anybody already write a post-processing script to extract > > inventory only (CPU, memory, interfaces wit their serials) > from rancid > > output files and presents in a more easy to view format? Thanks. > > Regards, > > > > Janos Mohacsi > > Network Engineer, Research Associate, Head of Network Planning > > NIIF/HUNGARNET, HUNGARY > > Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 > > From yuvalba at netvision.net.il Sun Jul 23 10:11:48 2006 From: yuvalba at netvision.net.il (Yuval Ben-Ari) Date: Sun, 23 Jul 2006 12:11:48 +0200 Subject: [rancid] Re: inventory mgmt script from rancid output Message-ID: <58D14E53A4F69C4EAF4D29171C447CC491FA46@NTX-CL.forest.netvision.net.il> I also made a perl tool that extracts some data into a CSV file and also a cgi perl script that can display it as a table. however it has some bug where it duplicated the data and I could not find time to investigate. > -----Original Message----- > From: rancid-discuss-bounces at shrubbery.net > [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of > Mohacsi Janos > Sent: Thursday, July 20, 2006 9:57 AM > To: Rancid-discuss at shrubbery.net > Subject: [rancid] inventory mgmt script from rancid output > > > Dear All, > Did anybody already write a post-processing script to extract > inventory only (CPU, memory, interfaces wit their serials) > from rancid > output files and presents in a more easy to view format? Thanks. > Regards, > > Janos Mohacsi > Network Engineer, Research Associate, Head of Network Planning > NIIF/HUNGARNET, HUNGARY > Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > From heas at shrubbery.net Sun Jul 23 18:03:46 2006 From: heas at shrubbery.net (john heasley) Date: Sun, 23 Jul 2006 11:03:46 -0700 Subject: [rancid] Re: inventory mgmt script from rancid output In-Reply-To: <58D14E53A4F69C4EAF4D29171C447CC491FA45@NTX-CL.forest.netvision.net.il> References: <58D14E53A4F69C4EAF4D29171C447CC491FA45@NTX-CL.forest.netvision.net.il> Message-ID: <20060723180346.GC459@shrubbery.net> AFAIK it is. join their mail list, tool-makers or something like that. Sun, Jul 23, 2006 at 12:10:15PM +0200, Yuval Ben-Ari: > I like the filter_audit tool > any idea if it is still being maintained ? > can anyone provide the author contact ? > > 10x > > > -----Original Message----- > > From: rancid-discuss-bounces at shrubbery.net > > [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of > > john heasley > > Sent: Thursday, July 20, 2006 5:41 PM > > To: Mohacsi Janos > > Cc: Rancid-discuss at shrubbery.net > > Subject: [rancid] Re: inventory mgmt script from rancid output > > > > > > ISTR that Joe Abley did as part of the tools he spoke about at nanog. > > http://www.nanog.org/mtg-0210/abley.html > > > > Thu, Jul 20, 2006 at 09:57:18AM +0200, Mohacsi Janos: > > > Dear All, > > > Did anybody already write a post-processing script to extract > > > inventory only (CPU, memory, interfaces wit their serials) > > from rancid > > > output files and presents in a more easy to view format? Thanks. > > > Regards, > > > > > > Janos Mohacsi > > > Network Engineer, Research Associate, Head of Network Planning > > > NIIF/HUNGARNET, HUNGARY > > > Key 00F9AF98: 8645 1312 D249 471B DBAE 21A2 9F52 0D1F 00F9 AF98 > > > From morty at frakir.org Mon Jul 24 02:05:53 2006 From: morty at frakir.org (Mordechai T. Abzug) Date: Sun, 23 Jul 2006 22:05:53 -0400 Subject: [rancid] Re: Rancid and Juniper routers In-Reply-To: <1C7075E499A0C040B31A3667D287652406A284@POSTKONTOR-1.int.radiolinja.ee> References: <1C7075E499A0C040B31A3667D287652406A284@POSTKONTOR-1.int.radiolinja.ee> Message-ID: <20060724020553.GG6162@red-sonja.frakir.org> On Sat, Jul 22, 2006 at 11:01:24PM +0300, Marek Keerand wrote: > I want to get configs from juniper M7i router with rancid. > I've added following line to .cloginrc file: > > add user my_junipers_address telnet_username > add password my_junipers_address telnet_password > > When i run jlogin my_junipers_address, i get following error: > > Error: Check your password for my_junipers_address. > > So i'm doing something wrong. Can anybody please explain, what are > correct actions to get config data from juniper routers. What you describe SHOULD work. Does the username or password include any metacharacters? If yes, you might want to try: add password my_junipers_address {telnet_password} If that doesn't help, and you really are using telnet, fire up a sniffer and see what is actually going across your wire. - Morty From Anton.Schweitzer at o2.com Mon Jul 24 08:36:45 2006 From: Anton.Schweitzer at o2.com (Anton.Schweitzer at o2.com) Date: Mon, 24 Jul 2006 10:36:45 +0200 Subject: [rancid] Problems Moving Devices Message-ID: Hi there, i moved some router from the ROUTER group to the SWITCH group, now rancid does not get the configs anymore Any idea what happend ? Cheers Anton Anton Schweitzer CNO IP Backoffice o2 (Germany) GmbH & Co.OHG Georg Brauchle-Ring 23-25, D-80992 M?nchen Tel +49(0)89-2442-5794 Mobil +49(0)176-23407715 Fax +49(0)89-2442-5632 anton.schweitzer at o2.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060724/f3630bf1/attachment.html From mloveley at plus.net Mon Jul 24 09:10:09 2006 From: mloveley at plus.net (Mark Loveley) Date: Mon, 24 Jul 2006 10:10:09 +0100 Subject: [rancid] Re: Rancid and Juniper routers In-Reply-To: <20060724020553.GG6162@red-sonja.frakir.org> References: <1C7075E499A0C040B31A3667D287652406A284@POSTKONTOR-1.int.radiolinja.ee> <20060724020553.GG6162@red-sonja.frakir.org> Message-ID: > On Sat, Jul 22, 2006 at 11:01:24PM +0300, Marek Keerand wrote: > >> I want to get configs from juniper M7i router with rancid. >> I've added following line to .cloginrc file: >> >> add user my_junipers_address telnet_username >> add password my_junipers_address telnet_password I'm sure we needed to add this to the cloginrc for our junipers add noenable my_junipers_address 1 Thanks Mark From Marek.Keerand at elisa.ee Mon Jul 24 09:55:22 2006 From: Marek.Keerand at elisa.ee (Marek Keerand) Date: Mon, 24 Jul 2006 12:55:22 +0300 Subject: [rancid] Re: Rancid and Juniper routers In-Reply-To: Message-ID: <1C7075E499A0C040B31A3667D287652406A28B@POSTKONTOR-1.int.radiolinja.ee> Problem solved. My juniper uses radius to authenticate users. It first asks password of a user witch runs rancid. Somehow jlogin can't handle this and gives error (although clogin works ok). So i had to create special user rancid in radius server db and use it in cloginrc. Big thanks to all! Marek -----Original Message----- From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Mark Loveley Sent: Monday, July 24, 2006 12:10 PM To: rancid-discuss at shrubbery.net Subject: [rancid] Re: Rancid and Juniper routers > On Sat, Jul 22, 2006 at 11:01:24PM +0300, Marek Keerand wrote: > >> I want to get configs from juniper M7i router with rancid. >> I've added following line to .cloginrc file: >> >> add user my_junipers_address telnet_username add password >> my_junipers_address telnet_password I'm sure we needed to add this to the cloginrc for our junipers add noenable my_junipers_address 1 Thanks Mark _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From mloveley at plus.net Mon Jul 24 11:19:38 2006 From: mloveley at plus.net (Mark Loveley) Date: Mon, 24 Jul 2006 12:19:38 +0100 Subject: [rancid] Rancid and APC devices Message-ID: Original email is here:- http://www.shrubbery.net/pipermail/rancid-discuss/2005-October/ 001235.html Just for confirmation, I've just added the APC module our 2.3.1 rancid install and have no problems pulling the config from a AP7951 model APC device on a debian (sarge) linux box. No changes to the code were needed. Only point of note is that clogin errors as it does not recognize the ftp method. I'd say get this added as a permanent rancid module :) Thanks Mark From heas at shrubbery.net Mon Jul 24 16:30:15 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 24 Jul 2006 09:30:15 -0700 Subject: [rancid] Re: Rancid and Juniper routers In-Reply-To: References: <1C7075E499A0C040B31A3667D287652406A284@POSTKONTOR-1.int.radiolinja.ee> <20060724020553.GG6162@red-sonja.frakir.org> Message-ID: <20060724163015.GC28224@shrubbery.net> Mon, Jul 24, 2006 at 10:10:09AM +0100, Mark Loveley: > > On Sat, Jul 22, 2006 at 11:01:24PM +0300, Marek Keerand wrote: > > > >> I want to get configs from juniper M7i router with rancid. > >> I've added following line to .cloginrc file: > >> > >> add user my_junipers_address telnet_username > >> add password my_junipers_address telnet_password > > I'm sure we needed to add this to the cloginrc for our junipers > > add noenable my_junipers_address 1 jlogin ignores the enable related variables, since the juniper has no enable concept. From heas at shrubbery.net Mon Jul 24 17:10:40 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 24 Jul 2006 10:10:40 -0700 Subject: [rancid] Re: Rancid and Juniper routers In-Reply-To: <1C7075E499A0C040B31A3667D287652406A28B@POSTKONTOR-1.int.radiolinja.ee> References: <1C7075E499A0C040B31A3667D287652406A28B@POSTKONTOR-1.int.radiolinja.ee> Message-ID: <20060724171040.GE28224@shrubbery.net> Mon, Jul 24, 2006 at 12:55:22PM +0300, Marek Keerand: > Problem solved. My juniper uses radius to authenticate users. It first > asks password of a user witch runs rancid. Somehow jlogin can't handle > this and gives error (although clogin works ok). So i had to create > special user rancid in radius server db and use it in cloginrc. That should not be. The code makes no assumption or condition on whether a username prompt is received. Please explain the scenario more precisely. > Big thanks to all! > Marek > > -----Original Message----- > From: rancid-discuss-bounces at shrubbery.net > [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Mark > Loveley > Sent: Monday, July 24, 2006 12:10 PM > To: rancid-discuss at shrubbery.net > Subject: [rancid] Re: Rancid and Juniper routers > > > On Sat, Jul 22, 2006 at 11:01:24PM +0300, Marek Keerand wrote: > > > >> I want to get configs from juniper M7i router with rancid. > >> I've added following line to .cloginrc file: > >> > >> add user my_junipers_address telnet_username add password > >> my_junipers_address telnet_password > > I'm sure we needed to add this to the cloginrc for our junipers > > add noenable my_junipers_address 1 > > Thanks > Mark > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss From heas at shrubbery.net Mon Jul 24 18:42:44 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 24 Jul 2006 11:42:44 -0700 Subject: [rancid] Re: Problems Moving Devices In-Reply-To: References: Message-ID: <20060724184244.GA1554@shrubbery.net> Mon, Jul 24, 2006 at 10:36:45AM +0200, Anton.Schweitzer at o2.com: > Hi there, > > i moved some router from the ROUTER group to the SWITCH group, now rancid > does not get the configs anymore > > Any idea what happend ? how did you move them. you should have just moved the entries between the router.db files. Check the logs. From bmurphy at lucent.com Mon Jul 24 22:03:16 2006 From: bmurphy at lucent.com (Murphy, Barry (Barry)) Date: Tue, 25 Jul 2006 08:03:16 +1000 Subject: [rancid] Changing the time from UTC to NZST or GMT+12 Message-ID: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com> Hey guys, My rancid seems to be using UTC time and I'd like to modify it to NZST or GMT+12 (NZ) but can't find any documentation on this. Could anyone provide assistance here? Thanks Barry Murphy From heas at shrubbery.net Mon Jul 24 22:09:45 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 24 Jul 2006 15:09:45 -0700 Subject: [rancid] Re: Changing the time from UTC to NZST or GMT+12 In-Reply-To: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com> References: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com> Message-ID: <20060724220945.GG21546@shrubbery.net> Tue, Jul 25, 2006 at 08:03:16AM +1000, Murphy, Barry (Barry): > Hey guys, > > My rancid seems to be using UTC time and I'd like to modify it to NZST or > GMT+12 (NZ) but can't find any documentation on this. > Could anyone provide assistance here? rancid would inherit TZ from the system &/ cron. From bmurphy at lucent.com Mon Jul 24 22:11:26 2006 From: bmurphy at lucent.com (Murphy, Barry (Barry)) Date: Tue, 25 Jul 2006 08:11:26 +1000 Subject: [rancid] Re: Changing the time from UTC to NZST or GMT+12 Message-ID: <3561A7F511A9D41195D900508BAE61680295D705@nz2001exch001u.anz.lucent.com> The system is reflecting the correct time: root at Rancid # date Tue Jul 25 10:10:45 NZST 2006 Barry -----Original Message----- From: john heasley [mailto:heas at shrubbery.net] Sent: Tuesday, 25 July 2006 10:10 a.m. To: Murphy, Barry (Barry) Cc: Rancid-discuss at shrubbery.net Subject: Re: [rancid] Changing the time from UTC to NZST or GMT+12 Tue, Jul 25, 2006 at 08:03:16AM +1000, Murphy, Barry (Barry): > Hey guys, > > My rancid seems to be using UTC time and I'd like to modify it to NZST or > GMT+12 (NZ) but can't find any documentation on this. > Could anyone provide assistance here? rancid would inherit TZ from the system &/ cron. From joe.provo at rcn.com Mon Jul 24 22:12:01 2006 From: joe.provo at rcn.com (Joe Provo) Date: Mon, 24 Jul 2006 18:12:01 -0400 Subject: [rancid] Re: Changing the time from UTC to NZST or GMT+12 In-Reply-To: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com>; from bmurphy@lucent.com on Tue, Jul 25, 2006 at 08:03:16AM +1000 References: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com> Message-ID: <20060724181201.A12889@noc.ultra.net> On Tue, Jul 25, 2006 at 08:03:16AM +1000, Murphy, Barry (Barry) wrote: > Hey guys, > > My rancid seems to be using UTC time and I'd like to modify it to NZST or > GMT+12 (NZ) but can't find any documentation on this. > Could anyone provide assistance here? if (bsd) ; man 8 tzsetup fi -- Joe Provo Voice 617.670.2904 Senior Manager, Internet Planning & Design Fax 617.670.2920 Network Engineering, RCN From morty at frakir.org Mon Jul 24 22:13:34 2006 From: morty at frakir.org (Mordechai T. Abzug) Date: Mon, 24 Jul 2006 18:13:34 -0400 Subject: [rancid] Re: Changing the time from UTC to NZST or GMT+12 In-Reply-To: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com> References: <3561A7F511A9D41195D900508BAE61680295D6ED@nz2001exch001u.anz.lucent.com> Message-ID: <20060724221334.GN6162@red-sonja.frakir.org> On Tue, Jul 25, 2006 at 08:03:16AM +1000, Murphy, Barry (Barry) wrote: > My rancid seems to be using UTC time and I'd like to modify it to > NZST or GMT+12 (NZ) but can't find any documentation on this. Could > anyone provide assistance here? What time is your system set up for? Change your system time, and rancid should follow. You can probably override it for rancid, though, by setting and exporting TZ in rancid.conf. That is, for US/Eastern time: TZ=EST5EDT; export TZ - Morty From heas at shrubbery.net Mon Jul 24 22:14:38 2006 From: heas at shrubbery.net (john heasley) Date: Mon, 24 Jul 2006 15:14:38 -0700 Subject: [rancid] Re: Changing the time from UTC to NZST or GMT+12 In-Reply-To: <3561A7F511A9D41195D900508BAE61680295D705@nz2001exch001u.anz.lucent.com> References: <3561A7F511A9D41195D900508BAE61680295D705@nz2001exch001u.anz.lucent.com> Message-ID: <20060724221438.GJ21546@shrubbery.net> cron is a daemon, ie: a long-running process. if you changed the timezone and have not restarted it, it still has the TZ that it started with. [Sorry, but this is not the Unix help list.] Tue, Jul 25, 2006 at 08:11:26AM +1000, Murphy, Barry (Barry): > The system is reflecting the correct time: > > root at Rancid # date > Tue Jul 25 10:10:45 NZST 2006 > > Barry > > > -----Original Message----- > From: john heasley [mailto:heas at shrubbery.net] > Sent: Tuesday, 25 July 2006 10:10 a.m. > To: Murphy, Barry (Barry) > Cc: Rancid-discuss at shrubbery.net > Subject: Re: [rancid] Changing the time from UTC to NZST or GMT+12 > > > Tue, Jul 25, 2006 at 08:03:16AM +1000, Murphy, Barry (Barry): > > Hey guys, > > > > My rancid seems to be using UTC time and I'd like to modify it to NZST or > > GMT+12 (NZ) but can't find any documentation on this. > > Could anyone provide assistance here? > > rancid would inherit TZ from the system &/ cron. From bmurphy at lucent.com Mon Jul 24 22:25:51 2006 From: bmurphy at lucent.com (Murphy, Barry (Barry)) Date: Tue, 25 Jul 2006 08:25:51 +1000 Subject: [rancid] Re: Changing the time from UTC to NZST or GMT+12 Message-ID: <3561A7F511A9D41195D900508BAE61680295D732@nz2001exch001u.anz.lucent.com> Sorry guys, cvsweb.conf required the change, thanks for the hints and help. Cheers Barry -----Original Message----- From: Mordechai T. Abzug [mailto:morty at frakir.org] Sent: Tuesday, 25 July 2006 10:14 a.m. To: Murphy, Barry (Barry) Cc: Rancid-discuss at shrubbery.net Subject: Re: [rancid] Changing the time from UTC to NZST or GMT+12 On Tue, Jul 25, 2006 at 08:03:16AM +1000, Murphy, Barry (Barry) wrote: > My rancid seems to be using UTC time and I'd like to modify it to > NZST or GMT+12 (NZ) but can't find any documentation on this. Could > anyone provide assistance here? What time is your system set up for? Change your system time, and rancid should follow. You can probably override it for rancid, though, by setting and exporting TZ in rancid.conf. That is, for US/Eastern time: TZ=EST5EDT; export TZ - Morty From terry at tmk.com Tue Jul 25 05:12:22 2006 From: terry at tmk.com (Terry Kennedy) Date: Tue, 25 Jul 2006 01:12:22 -0400 (EDT) Subject: [rancid] Minor patch for 2600/3600 Compression AIM reporting Message-ID: <01M56S5SHUA400238M@tmk.com> Hello, all - I just placed a 2651XM with a compression AIM into service and noticed a problem with the reporting of the AIM - it was mixed in with the WIC info: !Slot 0/0: type FT1 BT8360 !Slot 0/0: hvers 1.3 rev B0 !Slot 0/0: part 800-03279-03, serial xxxxxxxx ! !Slot 0/1: type FT1 BT8360 !Slot 0/1: hvers 1.0 rev B0 !Slot 0/1: hvers 1.3 rev D0 !Slot 0/1: part 73-3045-04, serial JABxxxxxxxx !Slot 0/1: part 800-03279-03, serial xxxxxxxx I made a trivial patch to add detection for this card, and now have out- put like this: !Slot 0/0: type FT1 BT8360 !Slot 0/0: hvers 1.3 rev B0 !Slot 0/0: part 800-03279-03, serial xxxxxxxx ! !Slot 0/1: type FT1 BT8360 !Slot 0/1: hvers 1.3 rev D0 !Slot 0/1: part 800-03279-03, serial xxxxxxxx ! !Slot 0: type Compression AIM !Slot 0: hvers 1.0 rev B0 !Slot 0: part 73-3045-04, serial JABxxxxxxxx Here is the patch: *** rancid.bak Fri Feb 3 19:10:51 2006 --- rancid Tue Jul 25 01:04:53 2006 *************** *** 891,897 **** # 7200, 3600, 2600, and 1700 stuff if (/^(Slot)\s+(\d+(\/\d+)?):/ || /^\s+(WIC|VIC|WIC\/VIC) Slot (\d):/ ! || /^(Encryption AIM) (\d):/) { if ($1 eq "WIC") { $WIC = "/$2"; } elsif ($1 eq "VIC") { --- 891,898 ---- # 7200, 3600, 2600, and 1700 stuff if (/^(Slot)\s+(\d+(\/\d+)?):/ || /^\s+(WIC|VIC|WIC\/VIC) Slot (\d):/ ! || /^(Encryption AIM) (\d):/ ! || /^(Compression AIM) (\d):/) { if ($1 eq "WIC") { $WIC = "/$2"; } elsif ($1 eq "VIC") { *************** *** 901,906 **** --- 902,913 ---- } elsif ($1 eq "DSP") { $WIC = "/$2"; } elsif ($1 eq "Encryption AIM") { + $slot = "$2"; + undef($WIC); + ProcessHistory("SLOT","","","!\n"); + ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n"); + next; + } elsif ($1 eq "Compression AIM") { $slot = "$2"; undef($WIC); ProcessHistory("SLOT","","","!\n"); However, given that there are at least two other types of AIMs out there (ATM and VPN), it would probably be better to match on " AIM", un- someone thinks there's a reason not to. Terry Kennedy http://www.tmk.com terry at tmk.com New York, NY USA From terry at tmk.com Tue Jul 25 05:18:13 2006 From: terry at tmk.com (Terry Kennedy) Date: Tue, 25 Jul 2006 01:18:13 -0400 (EDT) Subject: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" In-Reply-To: "Your message dated Thu, 29 Jun 2006 23:51:57 +0200" <44A44B7D.7080606@redhat.com> References: Message-ID: <01M56S6YCNXG00238M@tmk.com> > Robin Mordasiewicz wrote: > > I am noticing an error in the output > > > > "!VLAN: % Ambiguous command: "show vlan"" > I get the same on 38xx and 37xx Cisco routers and planned to fix it but > it's not a priority. The correct fix would be to run on those boxes a > sh vlan-switch Has anyone taken a shot at fixing this yet, or should I get to work on it? Terry Kennedy http://www.tmk.com terry at tmk.com New York, NY USA From mstefani at redhat.com Tue Jul 25 07:51:58 2006 From: mstefani at redhat.com (Michael Stefaniuc) Date: Tue, 25 Jul 2006 09:51:58 +0200 Subject: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" In-Reply-To: <01M56S6YCNXG00238M@tmk.com> References: <01M56S6YCNXG00238M@tmk.com> Message-ID: <44C5CD9E.1090503@redhat.com> Terry Kennedy wrote: >>Robin Mordasiewicz wrote: >> >>>I am noticing an error in the output >>> >>>"!VLAN: % Ambiguous command: "show vlan"" >> >>I get the same on 38xx and 37xx Cisco routers and planned to fix it but >>it's not a priority. The correct fix would be to run on those boxes a >>sh vlan-switch > > > Has anyone taken a shot at fixing this yet, or should I get to work on > it? John Heasley has already send a 2 line patch to the list as reply to this thread. Works like a charm. bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 Sr. Network Engineer Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani at redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart From terry at tmk.com Tue Jul 25 08:01:35 2006 From: terry at tmk.com (Terry Kennedy) Date: Tue, 25 Jul 2006 04:01:35 -0400 (EDT) Subject: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" In-Reply-To: "Your message dated Tue, 25 Jul 2006 09:51:58 +0200" <44C5CD9E.1090503@redhat.com> References: <01M56S6YCNXG00238M@tmk.com> Message-ID: <01M56Y2KXI380028QO@tmk.com> > John Heasley has already send a 2 line patch to the list as reply to > this thread. Works like a charm. Before I sent my message, I looked in my local rancid-discuss archive, and after reading your reply I also checked the onine archive, and I can't see any messages with this subject other than the original poster's mes- sage, your reply, and now my followup and your reply. Can someone point me in the right direction? Thanks, Terry Kennedy http://www.tmk.com terry at tmk.com New York, NY USA From mstefani at redhat.com Tue Jul 25 08:13:43 2006 From: mstefani at redhat.com (Michael Stefaniuc) Date: Tue, 25 Jul 2006 04:13:43 -0400 Subject: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" In-Reply-To: <01M56Y2KXI380028QO@tmk.com> References: <01M56S6YCNXG00238M@tmk.com> <01M56Y2KXI380028QO@tmk.com> Message-ID: <44C5D2B7.6080805@redhat.com> Terry Kennedy wrote: >> John Heasley has already send a 2 line patch to the list as reply to >> this thread. Works like a charm. > > Before I sent my message, I looked in my local rancid-discuss archive, > and after reading your reply I also checked the onine archive, and I can't > see any messages with this subject other than the original poster's mes- > sage, your reply, and now my followup and your reply. > > Can someone point me in the right direction? Sorry, my bad. He sent the patch only to the original poster and myself. See attachment. bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 Sr. Network Engineer Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani at redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart -------------- next part -------------- An embedded message was scrubbed... From: john heasley Subject: Re: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" Date: Thu, 29 Jun 2006 17:12:20 -0700 Size: 4426 Url: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060725/98851073/attachment.eml From rmordasiewicz at samuelmanutech.com Tue Jul 25 12:09:01 2006 From: rmordasiewicz at samuelmanutech.com (Robin Mordasiewicz) Date: Tue, 25 Jul 2006 08:09:01 -0400 (EDT) Subject: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" In-Reply-To: <44C5D2B7.6080805@redhat.com> References: <01M56S6YCNXG00238M@tmk.com> <01M56Y2KXI380028QO@tmk.com> <44C5D2B7.6080805@redhat.com> Message-ID: On Tue, 25 Jul 2006, Michael Stefaniuc wrote: > Terry Kennedy wrote: >>> John Heasley has already send a 2 line patch to the list as reply to >>> this thread. Works like a charm. >> >> Before I sent my message, I looked in my local rancid-discuss archive, >> and after reading your reply I also checked the onine archive, and I can't >> see any messages with this subject other than the original poster's mes- >> sage, your reply, and now my followup and your reply. >> >> Can someone point me in the right direction? > Sorry, my bad. He sent the patch only to the original poster and myself. See > attachment. Sorry I did not reply to the list. The patch was sent to me. I applied it and it works. From heas at shrubbery.net Tue Jul 25 12:05:08 2006 From: heas at shrubbery.net (john heasley) Date: Tue, 25 Jul 2006 12:05:08 -0000 Subject: [rancid] Re: !VLAN: % Ambiguous command: "show vlan" In-Reply-To: <20060630001125.C08BA86555@guelah.shrubbery.net> <44A44B7D.7080606@redhat.com> References: <20060630001125.C08BA86555@guelah.shrubbery.net> <44A44B7D.7080606@redhat.com> Message-ID: <20060630001220.GY2952@shrubbery.net> Thu, Jun 29, 2006 at 11:51:57PM +0200, Michael Stefaniuc: > Robin Mordasiewicz wrote: > > I am noticing an error in the output > > > > "!VLAN: % Ambiguous command: "show vlan"" > I get the same on 38xx and 37xx Cisco routers and planned to fix it but > it's not a priority. The correct fix would be to run on those boxes a > sh vlan-switch > > bye > michael > > > > > > > my device is > > NAME: "2821 chassis", DESCR: "2821 chassis" > > !Image: Software: C2800NM-IPBASE-M, 12.4(5a), RELEASE SOFTWARE (fc3) > > !Image: Compiled: Sat 14-Jan-06 03:19 by alnguyen > > !Image: flash:c2800nm-ipbase-mz.124-5a.bin > > ! > > !ROM Bootstrap: Version 12.4(1r) [hqluong 1r], RELEASE SOFTWARE (fc1) Index: rancid.in =================================================================== RCS file: /home/rancid/.CVS/rancid/bin/rancid.in,v retrieving revision 1.204 diff -u -1 -0 -r1.204 rancid.in --- rancid.in 28 May 2006 16:38:52 -0000 1.204 +++ rancid.in 30 Jun 2006 00:11:25 -0000 @@ -1358,20 +1358,21 @@ print STDERR " In ShowVLAN: $_" if ($debug); ($_=,return(1)) if (!$DO_SHOW_VLAN); while () { tr/\015//d; last if (/^$prompt/); next if (/^(\s*|\s*$cmd\s*)$/); return(1) if /Line has invalid autocommand /; return(1) if /(Invalid input detected|Type help or )/; + return(1) if /Ambiguous command/i; # newer releases (~12.1(9)) place the vlan config in the normal # configuration (write term). return(1) if ($type =~ /^(3550|4500|7600)$/); #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/); return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX if (/^(<-+ More -+>)/) { my($len) = length($1); s/^$1\s{$len}//; } @@ -1754,20 +1755,21 @@ {'show controllers cbus' => 'ShowContCbus'}, {'show diagbus' => 'ShowDiagbus'}, {'admin show diag' => 'ShowDiag'}, {'show diag' => 'ShowDiag'}, {'show module' => 'ShowModule'}, # cat 6500-ios {'show spe version' => 'ShowSpeVersion'}, {'show c7200' => 'ShowC7200'}, {'show inventory raw' => 'ShowInventory'}, {'show vtp status' => 'ShowVTP'}, {'show vlan' => 'ShowVLAN'}, + {'show vlan-switch' => 'ShowVLAN'}, {'show debug' => 'ShowDebug'}, {'show running-config' => 'WriteTerm'}, {'write term' => 'WriteTerm'}, ); # Use an array to preserve the order of the commands and a hash for mapping # commands to the subroutine and track commands that have been completed. @commands = map(keys(%$_), @commandtable); %commands = map(%$_, @commandtable); $cisco_cmds=join(";", at commands); From m at mongers.org Wed Jul 26 13:17:29 2006 From: m at mongers.org (Morten Liebach) Date: Wed, 26 Jul 2006 15:17:29 +0200 Subject: [rancid] Wrong command sent and TIMEOUTs with HP ProCurve 2824 Message-ID: <20060726131729.GA26428@mongers.org> Hello, I am trying to get rancid to work with our HP ProCurve 2824's. And I have problems. The switches are set up so that there's no password on the enable command. I've been trying various configurations without enable password, empty password and the same as the login password to no avail. This is the .cloginrc I'm using: add user * rancid add password * {PASSWORD} {} add autoenable * {0} add method * ssh Operating system is FreeBSD 4.11, rancid and friends are installed from ports. Adding to the fun; I don't always get the same output. Let me illustrate: ===== begin 1st try ===== $ flogin 123.123.123.123 123.123.123.123 spawn ssh -c 3des -x -l rancid 123.123.123.123 rancid at 123.123.123.123's password: HP J4903A ProCurve Switch 2824 Firmware revision I.07.31 Copyright (C) 1991-2003 Hewlett-Packard Co. All Rights Reserved. RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and Computer Software clause at 52.227-7013. HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303 [snip bunch of empty lines] Connecting to Tacacs server Press any key to continue Error: TIMEOUT reached ===== end 1st try ===== And another time: ===== begin 2nd try ===== $ flogin 123.123.123.123 123.123.123.123 spawn ssh -c 3des -x -l rancid 123.123.123.123 rancid at 123.123.123.123's password: HP J4903A ProCurve Switch 2824 Firmware revision I.07.31 Copyright (C) 1991-2003 Hewlett-Packard Co. All Rights Reserved. [snip bunch of empty lines] foundry-switch> [snip bunch of empty lines] foundry-switch> nable Invalid input: nable foundry-switch> Error: TIMEOUT reached can not find channel named "exp4" while executing "interact" ("foreach" body line 131) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" # Figure out prompt. # Since autoena..." (file "/usr/local/libexec/rancid/flogin" line 518) ===== end 2nd try ===== I wonder where that 'e' went... The second variant is the rarest. Trying an interactive login by hand: ===== begin interactive session ===== $ ssh user at 123.123.123.123 user at 123.123.123.123's password: [snip bunch of empty lines] foundry-switch> en foundry-switch# sh version Image stamp: /sw/code/build/mako(m03) Aug 26 2003 16:49:11 I.07.31 1179 Boot Image: Primary foundry-switch# exit foundry-switch> exit Do you want to log out [y/n]? y [snip bunch of empty lines] Connection to 123.123.123.123 closed by remote host. Connection to 123.123.123.123 closed. ===== end interactive session ===== So, what am I doing wrong? Have a nice day Morten -- http://m.mongers.org/weblog/ -- http://flickr.com/photos/morten_liebach/ From mfreeman at multimax.com Wed Jul 26 19:40:00 2006 From: mfreeman at multimax.com (Freeman, Michael) Date: Wed, 26 Jul 2006 14:40:00 -0500 Subject: [rancid] Rancid + ssh Message-ID: Is it possible to make rancid use the SSH protocol to simply connect to a device, execute 1 command, and capture the output somewhere? From heas at shrubbery.net Wed Jul 26 20:11:36 2006 From: heas at shrubbery.net (john heasley) Date: Wed, 26 Jul 2006 13:11:36 -0700 Subject: [rancid] Re: Rancid + ssh In-Reply-To: References: Message-ID: <20060726201136.GA14994@shrubbery.net> Wed, Jul 26, 2006 at 02:40:00PM -0500, Freeman, Michael: > Is it possible to make rancid use the SSH protocol to simply connect to > a device, execute 1 command, and capture the output somewhere? > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss Configure your .cloginrc for ssh. clogin -c 'show version' host1 host2 host3 > output 2>&1 From salmanab at hotmail.com Wed Jul 26 22:11:26 2006 From: salmanab at hotmail.com (SALMAN ABDOLLAHI VAYEGHAN) Date: Wed, 26 Jul 2006 22:11:26 +0000 Subject: [rancid] Re: Rancid + ssh In-Reply-To: <20060726201136.GA14994@shrubbery.net> Message-ID: An HTML attachment was scrubbed... URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060726/fcd8beba/attachment.html From heas at shrubbery.net Wed Jul 26 22:50:51 2006 From: heas at shrubbery.net (john heasley) Date: Wed, 26 Jul 2006 15:50:51 -0700 Subject: [rancid] Re: Rancid + ssh In-Reply-To: References: <20060726201136.GA14994@shrubbery.net> Message-ID: <20060726225051.GB15010@shrubbery.net> Wed, Jul 26, 2006 at 10:11:26PM +0000, SALMAN ABDOLLAHI VAYEGHAN: >
> Hi, > just wondering why the following command doesn't work. > clogin -c 'telnet xxx.xxx.xxx.xxx' yyy.yyy.yyy.yyy > 'y' acts as a gateway and 'x' works as workstation inside the network. I am able to connect to 'y' device easily...but it won't connect to 'x' device for some reason...it says "timeout expired!" even though the passwords and everthing else is been set in .cloginrc file. Can anyone help me with this? because the script expect to talk to the top-level CLI and has no knowledge of commands requiring/accepting & prompting for additional values. eg: < prompt command > < output < prompt exit > < eof From arnold at nipper.de Wed Jul 26 22:50:58 2006 From: arnold at nipper.de (Arnold Nipper) Date: Thu, 27 Jul 2006 00:50:58 +0200 Subject: [rancid] Re: Rancid + ssh In-Reply-To: References: Message-ID: <44C7F1D2.2080604@nipper.de> On 27.07.2006 00:11 SALMAN ABDOLLAHI VAYEGHAN wrote > Hi, > > just wondering why the following command doesn't work. > > clogin -c 'telnet xxx.xxx.xxx.xxx' yyy.yyy.yyy.yyy > > 'y' acts as a gateway and 'x' works as workstation inside the network. I > am able to connect to 'y' device easily...but it won't connect to 'x' > device for some reason...it says "timeout expired!" even though the > passwords and everthing else is been set in .cloginrc file. > Can anyone help me with this? > You will have to provide username und password between '' ... i.e. something like clogin -c 'telnet xxx.xxx.xxx.xxx\nusername\npassword' yyy.yyy.yyy.yyy Arnold From heas at shrubbery.net Wed Jul 26 22:52:50 2006 From: heas at shrubbery.net (john heasley) Date: Wed, 26 Jul 2006 15:52:50 -0700 Subject: [rancid] Re: Rancid + ssh In-Reply-To: <20060726225051.GB15010@shrubbery.net> References: <20060726201136.GA14994@shrubbery.net> <20060726225051.GB15010@shrubbery.net> Message-ID: <20060726225250.GA11620@shrubbery.net> Wed, Jul 26, 2006 at 03:50:51PM -0700, john heasley: > Wed, Jul 26, 2006 at 10:11:26PM +0000, SALMAN ABDOLLAHI VAYEGHAN: > >
> > Hi, > > just wondering why the following command doesn't work. > > clogin -c 'telnet xxx.xxx.xxx.xxx' yyy.yyy.yyy.yyy > > 'y' acts as a gateway and 'x' works as workstation inside the network. I am able to connect to 'y' device easily...but it won't connect to 'x' device for some reason...it says "timeout expired!" even though the passwords and everthing else is been set in .cloginrc file. Can anyone help me with this? > > because the script expect to talk to the top-level CLI and has no knowledge > of commands requiring/accepting & prompting for additional values. > > eg: < prompt > command > > < output > < prompt > exit > > < eof I forgot to mention, not that I & others haven't before now, that you can handle such things with -s and -x...for varying degrees of handle. From karpenko at willers.employees.org Thu Jul 27 15:05:24 2006 From: karpenko at willers.employees.org (jkarpenko) Date: Thu, 27 Jul 2006 08:05:24 -0700 (PDT) Subject: [rancid] expect login script and failure Message-ID: <20060727080121.T58325@willers.employees.org> Okay, this is puzzling me. I've got my .cloginrc correctly populated and I can manually run the clogin and rancid scripts on a single device and everything works with no problems (clogin, use the "-c" flag or just run the rancid and everything works flawlessly). But as soon as I run rancid-run on the group number, it chokes with the following error: "testdevice clogin error: Error: Connection closed (ssh): testdevice". So, I can manually run clogin and rancid with no problems but when they get called by rancid-run it blows chunks. /karpenko/ From heas at shrubbery.net Thu Jul 27 17:37:25 2006 From: heas at shrubbery.net (john heasley) Date: Thu, 27 Jul 2006 10:37:25 -0700 Subject: [rancid] Re: expect login script and failure In-Reply-To: <20060727080121.T58325@willers.employees.org> References: <20060727080121.T58325@willers.employees.org> Message-ID: <20060727173725.GF27184@shrubbery.net> Thu, Jul 27, 2006 at 08:05:24AM -0700, jkarpenko: > > Okay, this is puzzling me. I've got my .cloginrc correctly populated and I can manually run the clogin and rancid scripts on a single device and everything works with no problems (clogin, use the "-c" flag or just run the rancid and everything works flawlessly). But as soon as I run rancid-run on the group number, it chokes with the following error: "testdevice clogin error: Error: Connection closed (ssh): testdevice". So, I can manually run clogin and rancid with no problems but when they get called by rancid-run it blows chunks. Perhaps your PATH and that of rancid.conf differ and it's getting a broken ssh, has different defaults, or a different ssh.conf? From alonso at gisi.com.mx Sun Jul 30 16:16:40 2006 From: alonso at gisi.com.mx (alonso) Date: Sun, 30 Jul 2006 11:16:40 -0500 Subject: [rancid] extreme switch support Message-ID: <002d01c6b3f3$a448ff30$d15a97c9@alons> Hi, helpme plis I need the imagen to the summit 48 model 15010 Image : Extremeware Version 4.1.19 (Build 2) Regards Alonso -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20060730/0e9d308f/attachment.html