From adam at ballinatta.com Wed Apr 1 08:08:22 2015 From: adam at ballinatta.com (Adam Korab) Date: Wed, 1 Apr 2015 08:08:22 +0000 Subject: [rancid] vyatta/vyos Message-ID: <2A056751ADB3C44F899E0507487FEE1FD5BEA586@atropos.blnt.ad> Hi Tony, Having a bit of trouble with this on a fresh rancid 3.2 install and files pulled from git tonight as well. Target is a UBNT EdgeRouter Pro, v1.6.0. I edited rancid.types.conf to append | no -more as the default 'show configuration' and 'show configuration commands' get stuffed through the less pager which resulted in a timeout. Also commented out a few that don't apply to the However, rancid-run shows those failing: Getting missed routers: round 4. r01.adm: vlogin error: Error: TIMEOUT reached r01.adm: missed cmd(s): show version all,show configuration | no-more,show system image,show configuration commands | no-more r01.adm: End of run not found # ending: Wed Apr 1 02:54:38 CDT 2015 But manually running these via vlogin works fine: [rancid at nms2 ~]$ vlogin -c "show version all;show configuration | no-more" r01.adm r01.adm spawn ssh -c 3des -x -l admin r01.adm admin at r01.adm's password: Linux ubnt 3.10.20-UBNT #1 SMP Wed Oct 29 20:51:42 PDT 2014 mips64 Welcome to EdgeOS Last login: Wed Apr 1 07:58:13 2015 from 10.16.0.15 admin at r01.adm:~$ admin at r01.adm:~$ set terminal length 0 Invalid command admin at r01.adm:~$ show version all show configuration | no-more Version: v1.6.0 Build ID: 4716006 Build on: 10/31/14 17:38 Copyright: 2012-2014 Ubiquiti Networks, Inc. HW model: EdgeRouter Pro 8-Port HW S/N: 24A43C3CF41B Uptime: 07:59:35 up 5 days, 12:06, 1 user, load average: 0.00, 0.01, 0.05 admin at r01.adm:~$ show configuration | no-more interfaces { ethernet eth0 { } admin at r01.adm:~$ exit logout Connection to r01.adm closed. Thanks! --Adam -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Antonio Querubin Sent: Wednesday, February 18, 2015 6:55 AM To: robert.4.hughes at bt.com Cc: rancid-discuss at shrubbery.net Subject: Re: [rancid] vyatta/vyos The vyos support now installs/runs as a module. See the README in the git repository for updated install info. Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.4.hughes at bt.com Wed Apr 1 08:41:52 2015 From: robert.4.hughes at bt.com (robert.4.hughes at bt.com) Date: Wed, 1 Apr 2015 08:41:52 +0000 Subject: [rancid] vyatta/vyos In-Reply-To: <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> References: <8ABFC807392ABC49BCAD4465458B3C9106CD18A776@EMV32-UKDY.domain1.systemhost.net> <8ABFC807392ABC49BCAD4465458B3C9106CD95C115@EMV32-UKDY.domain1.systemhost.net> <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> Message-ID: Hi Adam, I am seeing the same issue. When I run rancid-run I see the following errors in the log file: router01: vlogin error: Error: TIMEOUT reached router01: missed cmd(s): show configuration commands router01: End of run not found # Getting missed routers: round 1. Passed argv0 into rancid-fe { Unknown router manufacturer for {: Manually I can run vlogin -c "show configuration commands" router01 And this pulls back the config. Note I manually changed the vrancid file to just run the command "show configuration commands", not sure if this is the correct way to configure the commands or should I be using rancid.types.conf? Regards Rob From: Adam Korab [mailto:adam at ballinatta.com] Sent: 01 April 2015 09:04 To: Antonio Querubin; Hughes,R,Robert,VIE C Cc: rancid-discuss at shrubbery.net Subject: RE: [rancid] vyatta/vyos Hi Tony, Having a bit of trouble with this on a fresh rancid 3.2 install and files pulled from git tonight as well. Target is a UBNT EdgeRouter Pro, v1.6.0. I edited rancid.types.conf to append | no -more as the default 'show configuration' and 'show configuration commands' get stuffed through the less pager which resulted in a timeout. Also commented out a few that don't apply to the However, rancid-run shows those failing: Getting missed routers: round 4. r01.adm: vlogin error: Error: TIMEOUT reached r01.adm: missed cmd(s): show version all,show configuration | no-more,show system image,show configuration commands | no-more r01.adm: End of run not found # ending: Wed Apr 1 02:54:38 CDT 2015 But manually running these via vlogin works fine: [rancid at nms2 ~]$ vlogin -c "show version all;show configuration | no-more" r01.adm r01.adm spawn ssh -c 3des -x -l admin r01.adm admin at r01.adm's password: Linux ubnt 3.10.20-UBNT #1 SMP Wed Oct 29 20:51:42 PDT 2014 mips64 Welcome to EdgeOS Last login: Wed Apr 1 07:58:13 2015 from 10.16.0.15 admin at r01.adm:~$ admin at r01.adm:~$ set terminal length 0 Invalid command admin at r01.adm:~$ show version all show configuration | no-more Version: v1.6.0 Build ID: 4716006 Build on: 10/31/14 17:38 Copyright: 2012-2014 Ubiquiti Networks, Inc. HW model: EdgeRouter Pro 8-Port HW S/N: 24A43C3CF41B Uptime: 07:59:35 up 5 days, 12:06, 1 user, load average: 0.00, 0.01, 0.05 admin at r01.adm:~$ show configuration | no-more interfaces { ethernet eth0 { } admin at r01.adm:~$ exit logout Connection to r01.adm closed. Thanks! --Adam -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Antonio Querubin Sent: Wednesday, February 18, 2015 6:55 AM To: robert.4.hughes at bt.com Cc: rancid-discuss at shrubbery.net Subject: Re: [rancid] vyatta/vyos The vyos support now installs/runs as a module. See the README in the git repository for updated install info. Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at lavanauts.org Wed Apr 1 12:11:02 2015 From: tony at lavanauts.org (Antonio Querubin) Date: Wed, 1 Apr 2015 02:11:02 -1000 (HST) Subject: [rancid] vyatta/vyos In-Reply-To: <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> References: <8ABFC807392ABC49BCAD4465458B3C9106CD18A776@EMV32-UKDY.domain1.systemhost.net> <8ABFC807392ABC49BCAD4465458B3C9106CD95C115@EMV32-UKDY.domain1.systemhost.net> <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> Message-ID: On Wed, 1 Apr 2015, Adam Korab wrote: > Having a bit of trouble with this on a fresh rancid 3.2 install and > files pulled from git tonight as well. Target is a UBNT EdgeRouter Pro, > v1.6.0. > > I edited rancid.types.conf to append | no -more as the default 'show > configuration' and 'show configuration commands' get stuffed through the > less pager which resulted in a timeout. Also commented out a few that > don't apply to the > > However, rancid-run shows those failing: > > Getting missed routers: round 4. > r01.adm: vlogin error: Error: TIMEOUT reached > r01.adm: missed cmd(s): show version all,show configuration | no-more,show system image,show configuration commands | no-more > r01.adm: End of run not found Unfortunately, I'm unable to reproduce the problem. I modified my rancid.types.conf the same way as above and it works here (no timeout and obtains the entire config). However, this is for a VyOS router and not an Ubiquiti. I don't have access to an Ubiquiti router so unfortunately I can't troubleshoot further. Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com From tony at lavanauts.org Wed Apr 1 12:21:05 2015 From: tony at lavanauts.org (Antonio Querubin) Date: Wed, 1 Apr 2015 02:21:05 -1000 (HST) Subject: [rancid] vyatta/vyos In-Reply-To: References: <8ABFC807392ABC49BCAD4465458B3C9106CD18A776@EMV32-UKDY.domain1.systemhost.net> <8ABFC807392ABC49BCAD4465458B3C9106CD95C115@EMV32-UKDY.domain1.systemhost.net> <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> Message-ID: On Wed, 1 Apr 2015, robert.4.hughes at bt.com wrote: > I am seeing the same issue. > > When I run rancid-run I see the following errors in the log file: > > router01: vlogin error: Error: TIMEOUT reached > router01: missed cmd(s): show configuration commands > router01: End of run not found > # > Getting missed routers: round 1. > Passed argv0 into rancid-fe { > Unknown router manufacturer for {: > > Manually I can run vlogin -c "show configuration commands" router01 > And this pulls back the config. > > Note I manually changed the vrancid file to just run the command "show > configuration commands", not sure if this is the correct way to > configure the commands or should I be using rancid.types.conf? vrancid is no longer used and should be deleted. You should be using rancid.types.conf and vyos.pm. The latter needs to be moved to the same directory where rancid.pm resides. rancid.types.conf should look something like: vyos;script;rancid -t vyos vyos;login;vlogin vyos;module;vyos vyos;inloop;vyos::inloop vyos;command;vyos::ShowHardware;show hardware cpu vyos;command;vyos::ShowHardware;show hardware dmi vyos;command;vyos::ShowHardware;show hardware pci vyos;command;vyos::ShowHardware;show hardware scsi vyos;command;vyos::ShowHardware;show hardware usb vyos;command;vyos::ShowVersion;show system routing-daemons vyos;command;vyos::ShowVersion;show system image vyos;command;vyos::ShowVersion;show version all vyos;command;vyos::ShowConfiguration;show configuration vyos;command;vyos::ShowConfiguration;show configuration commands Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com From robert.4.hughes at bt.com Wed Apr 1 13:04:59 2015 From: robert.4.hughes at bt.com (robert.4.hughes at bt.com) Date: Wed, 1 Apr 2015 13:04:59 +0000 Subject: [rancid] vyatta/vyos In-Reply-To: References: <8ABFC807392ABC49BCAD4465458B3C9106CD18A776@EMV32-UKDY.domain1.systemhost.net> <8ABFC807392ABC49BCAD4465458B3C9106CD95C115@EMV32-UKDY.domain1.systemhost.net> <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> Message-ID: Hi Antonio, I have installed the new modules, so I guess it was just ignoring vrancid anyway. I have now deleted vrancid to make sure. I still get the error in the log file router01: vlogin error: Error: TIMEOUT reached This is the vyos entry in rancid.types.conf vyos;script;rancid -t vyos vyos;login;vlogin vyos;module;vyos vyos;inloop;vyos::inloop vyos;command;vyos::ShowConfiguration;show configuration commands This is the output when I run: rancid -t vyos -d router01 loadtype: device type vyos loadtype: found device type vyos in /opt/rancid/etc/rancid.types.conf executing vlogin -t 120 -c"show configuration commands" router01 HIT COMMAND:vyos at router01:~$ show configuration commands In ShowConfiguration: vyos at router01:~$ show configuration commands I can run this manually ok, it logs in and displays the config fine: vlogin -t 120 -c"show configuration commands" router01 Is there anywhere else I can look to change? Regards Rob -----Original Message----- From: Antonio Querubin [mailto:tony at lavanauts.org] Sent: 01 April 2015 13:21 To: Hughes,R,Robert,VIE C Cc: adam at ballinatta.com; rancid-discuss at shrubbery.net Subject: RE: [rancid] vyatta/vyos On Wed, 1 Apr 2015, robert.4.hughes at bt.com wrote: > I am seeing the same issue. > > When I run rancid-run I see the following errors in the log file: > > router01: vlogin error: Error: TIMEOUT reached > router01: missed cmd(s): show configuration commands > router01: End of run not found > # > Getting missed routers: round 1. > Passed argv0 into rancid-fe { > Unknown router manufacturer for {: > > Manually I can run vlogin -c "show configuration commands" router01 > And this pulls back the config. > > Note I manually changed the vrancid file to just run the command "show > configuration commands", not sure if this is the correct way to > configure the commands or should I be using rancid.types.conf? vrancid is no longer used and should be deleted. You should be using rancid.types.conf and vyos.pm. The latter needs to be moved to the same directory where rancid.pm resides. rancid.types.conf should look something like: vyos;script;rancid -t vyos vyos;login;vlogin vyos;module;vyos vyos;inloop;vyos::inloop vyos;command;vyos::ShowHardware;show hardware cpu vyos;command;vyos::ShowHardware;show hardware dmi vyos;command;vyos::ShowHardware;show hardware pci vyos;command;vyos::ShowHardware;show hardware scsi vyos;command;vyos::ShowHardware;show hardware usb vyos;command;vyos::ShowVersion;show system routing-daemons vyos;command;vyos::ShowVersion;show system image vyos;command;vyos::ShowVersion;show version all vyos;command;vyos::ShowConfiguration;show configuration vyos;command;vyos::ShowConfiguration;show configuration commands Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com From tony at lavanauts.org Wed Apr 1 13:19:43 2015 From: tony at lavanauts.org (Antonio Querubin) Date: Wed, 1 Apr 2015 03:19:43 -1000 (HST) Subject: [rancid] vyatta/vyos In-Reply-To: References: <8ABFC807392ABC49BCAD4465458B3C9106CD18A776@EMV32-UKDY.domain1.systemhost.net> <8ABFC807392ABC49BCAD4465458B3C9106CD95C115@EMV32-UKDY.domain1.systemhost.net> <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> Message-ID: On Wed, 1 Apr 2015, robert.4.hughes at bt.com wrote: > I have installed the new modules, so I guess it was just ignoring > vrancid anyway. I have now deleted vrancid to make sure. > > I still get the error in the log file router01: vlogin error: Error: > TIMEOUT reached > > This is the vyos entry in rancid.types.conf > > vyos;script;rancid -t vyos > vyos;login;vlogin > vyos;module;vyos > vyos;inloop;vyos::inloop > vyos;command;vyos::ShowConfiguration;show configuration commands > > This is the output when I run: rancid -t vyos -d router01 > > loadtype: device type vyos > loadtype: found device type vyos in /opt/rancid/etc/rancid.types.conf > executing vlogin -t 120 -c"show configuration commands" router01 > HIT COMMAND:vyos at router01:~$ show configuration commands > In ShowConfiguration: vyos at router01:~$ show configuration commands So you shouldn't be getting that TIMEOUT error any more. Is your router.db entry for router01 referencing 'vyos' instead of 'vrancid'? router01;vyos;up Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com From robert.4.hughes at bt.com Wed Apr 1 13:26:25 2015 From: robert.4.hughes at bt.com (robert.4.hughes at bt.com) Date: Wed, 1 Apr 2015 13:26:25 +0000 Subject: [rancid] vyatta/vyos In-Reply-To: References: <8ABFC807392ABC49BCAD4465458B3C9106CD18A776@EMV32-UKDY.domain1.systemhost.net> <8ABFC807392ABC49BCAD4465458B3C9106CD95C115@EMV32-UKDY.domain1.systemhost.net> <2A056751ADB3C44F899E0507487FEE1FD5BEA528@atropos.blnt.ad> Message-ID: <6d81f24781234b65a0053eb7598319f9@rew09926dag04d.domain1.systemhost.net> Yes, although rather than router01 it is an actual ip address. The same works for quagga nodes ok, those are using a device type of cisco. xx.xx.xx.xx;vyos;up;node provisioned by opennms nodeid;14 -----Original Message----- From: Antonio Querubin [mailto:tony at lavanauts.org] Sent: 01 April 2015 14:20 To: Hughes,R,Robert,VIE C Cc: adam at ballinatta.com; rancid-discuss at shrubbery.net Subject: RE: [rancid] vyatta/vyos On Wed, 1 Apr 2015, robert.4.hughes at bt.com wrote: > I have installed the new modules, so I guess it was just ignoring > vrancid anyway. I have now deleted vrancid to make sure. > > I still get the error in the log file router01: vlogin error: Error: > TIMEOUT reached > > This is the vyos entry in rancid.types.conf > > vyos;script;rancid -t vyos > vyos;login;vlogin > vyos;module;vyos > vyos;inloop;vyos::inloop > vyos;command;vyos::ShowConfiguration;show configuration commands > > This is the output when I run: rancid -t vyos -d router01 > > loadtype: device type vyos > loadtype: found device type vyos in /opt/rancid/etc/rancid.types.conf > executing vlogin -t 120 -c"show configuration commands" router01 HIT > COMMAND:vyos at router01:~$ show configuration commands > In ShowConfiguration: vyos at router01:~$ show configuration > commands So you shouldn't be getting that TIMEOUT error any more. Is your router.db entry for router01 referencing 'vyos' instead of 'vrancid'? router01;vyos;up Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com From sithila at yahoo.com Wed Apr 1 14:02:19 2015 From: sithila at yahoo.com (Sithila Konara) Date: Wed, 1 Apr 2015 14:02:19 +0000 (UTC) Subject: [rancid] Cisco ASA couldn't access form RANCID Message-ID: <1813213333.3473644.1427896939981.JavaMail.yahoo@mail.yahoo.com> Hi, I have configured rancid for take back of my cisco and juniper devices. I used https://nsrc.org/workshops/2014/nsrc-tein-ait/raw-attachment/wiki/Agenda/rancid-exercise.htm?as reference.?I have created four groups and Firewall_Cisco is one of them. It has two Cisco ASA devices (10.200.190.1 and 10.200.190.2). I can take all devices backups including 10.200.190.1 but for some reason not 10.200.190.2. I have checked that I can ssh 10.200.190.2 from that server but executing "/var/lib/rancid/bin/clogin 10.200.190.5" gives following error. rancid at SERVER01:~$ /var/lib/rancid/bin/clogin 10.200.190.2 10.200.190.2spawn telnet 10.200.190.2Trying 10.200.190.2...Error: TIMEOUT reached .cloginrc file add user 10.200.190.123 sithilaadd password 10.200.190.123 Psr1989.add user 10.200.190.124 sithilaadd password 10.200.190.124 Psr1989.add user * sithilaadd password * Psr1989. kbsl14noc router.db 10.200.190.1:cisco:up10.200.190.2:cisco:up I have attached my router.db and .cloginrc with this? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: router.db Type: application/octet-stream Size: 46 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: .cloginrc Type: application/octet-stream Size: 194 bytes Desc: not available URL: From gmourani at gmail.com Wed Apr 8 18:52:14 2015 From: gmourani at gmail.com (Gerhard Mourani) Date: Wed, 8 Apr 2015 14:52:14 -0400 Subject: [rancid] Flash: Code Flash Message-ID: <24DCC5D7-2D05-4989-9F5E-E2CD0E031D77@gmail.com> Hello, Someone know how to make Rancid stop to send me this kind of diff related to Flash? --- foundry/configs/10.2.107.2 2015/04/02 04:48:46 1.3 +++ foundry/configs/10.2.107.2 2015/04/02 16:49:40 1.4 @@ -45,7 +45,7 @@ !Flash: Compressed Pri Code size = 10842104, Version:08.0.01cT311 (ICX64S08001c.bin) !Flash: Compressed Sec Code size = 10828856, Version:08.0.01T311 (ICX64S08001.bin) !Flash: Compressed Boot-Monitor Image size = 778992, Version:10.0.00T310 -!Flash: Code Flash Free Space = 6930432 +!Flash: Code Flash Free Space = 6897664 ! ! ! Gerhard, From Douglas.Hughes at DEShawResearch.com Wed Apr 8 18:55:24 2015 From: Douglas.Hughes at DEShawResearch.com (Hughes, Doug) Date: Wed, 8 Apr 2015 18:55:24 +0000 Subject: [rancid] Flash: Code Flash In-Reply-To: <24DCC5D7-2D05-4989-9F5E-E2CD0E031D77@gmail.com> References: <24DCC5D7-2D05-4989-9F5E-E2CD0E031D77@gmail.com> Message-ID: Kind of an informal FAQ Edit your francid (or whatever rancid file you are using) Find the sub ShowFlash in there Where it says next if, add another one like this: next if (/Flash Free Space/); -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Gerhard Mourani Sent: Wednesday, April 08, 2015 2:52 PM To: rancid-discuss at shrubbery.net Subject: [rancid] Flash: Code Flash Hello, Someone know how to make Rancid stop to send me this kind of diff related to Flash? --- foundry/configs/10.2.107.2 2015/04/02 04:48:46 1.3 +++ foundry/configs/10.2.107.2 2015/04/02 16:49:40 1.4 @@ -45,7 +45,7 @@ !Flash: Compressed Pri Code size = 10842104, Version:08.0.01cT311 (ICX64S08001c.bin) !Flash: Compressed Sec Code size = 10828856, Version:08.0.01T311 (ICX64S08001.bin) !Flash: Compressed Boot-Monitor Image size = 778992, Version:10.0.00T310 -!Flash: Code Flash Free Space = 6930432 +!Flash: Code Flash Free Space = 6897664 ! ! ! Gerhard, _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss From Douglas.Hughes at DEShawResearch.com Wed Apr 8 19:02:29 2015 From: Douglas.Hughes at DEShawResearch.com (Hughes, Doug) Date: Wed, 8 Apr 2015 19:02:29 +0000 Subject: [rancid] Flash: Code Flash In-Reply-To: References: <24DCC5D7-2D05-4989-9F5E-E2CD0E031D77@gmail.com> Message-ID: You got it. That easy. From: Gerhard Mourani [mailto:gmourani at gmail.com] Sent: Wednesday, April 08, 2015 3:02 PM To: Hughes, Doug Cc: rancid-discuss at shrubbery.net Subject: Re: [rancid] Flash: Code Flash So, you mean changing: # This routine parses "show flash" sub ShowFlash { my($INPUT, $OUTPUT) = @_; print STDERR " In ShowFlash: $_" if ($debug); while (<$INPUT>) { tr/\015//d; last if (/^$prompt/); next if (/^\s*$/); return(1) if (/^\s+\^$/); # edgeiron invalid command ProcessHistory("FLASH","","","!Flash: $_"); } ProcessHistory("","","","!\n"); return; } for this one: # This routine parses "show flash" sub ShowFlash { my($INPUT, $OUTPUT) = @_; print STDERR " In ShowFlash: $_" if ($debug); while (<$INPUT>) { tr/\015//d; last if (/^$prompt/); next if (/^\s*$/); next if (/Flash Free Space/); return(1) if (/^\s+\^$/); # edgeiron invalid command ProcessHistory("FLASH","","","!Flash: $_"); } ProcessHistory("","","","!\n"); return; } Right? On Apr 8, 2015, at 2:55 PM, Hughes, Doug > wrote: Kind of an informal FAQ Edit your francid (or whatever rancid file you are using) Find the sub ShowFlash in there Where it says next if, add another one like this: next if (/Flash Free Space/); -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Gerhard Mourani Sent: Wednesday, April 08, 2015 2:52 PM To: rancid-discuss at shrubbery.net Subject: [rancid] Flash: Code Flash Hello, Someone know how to make Rancid stop to send me this kind of diff related to Flash? --- foundry/configs/10.2.107.2 2015/04/02 04:48:46 1.3 +++ foundry/configs/10.2.107.2 2015/04/02 16:49:40 1.4 @@ -45,7 +45,7 @@ !Flash: Compressed Pri Code size = 10842104, Version:08.0.01cT311 (ICX64S08001c.bin) !Flash: Compressed Sec Code size = 10828856, Version:08.0.01T311 (ICX64S08001.bin) !Flash: Compressed Boot-Monitor Image size = 778992, Version:10.0.00T310 -!Flash: Code Flash Free Space = 6930432 +!Flash: Code Flash Free Space = 6897664 ! ! ! Gerhard, _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmourani at gmail.com Wed Apr 8 19:01:35 2015 From: gmourani at gmail.com (Gerhard Mourani) Date: Wed, 8 Apr 2015 15:01:35 -0400 Subject: [rancid] Flash: Code Flash In-Reply-To: References: <24DCC5D7-2D05-4989-9F5E-E2CD0E031D77@gmail.com> Message-ID: So, you mean changing: # This routine parses "show flash" sub ShowFlash { my($INPUT, $OUTPUT) = @_; print STDERR " In ShowFlash: $_" if ($debug); while (<$INPUT>) { tr/\015//d; last if (/^$prompt/); next if (/^\s*$/); return(1) if (/^\s+\^$/); # edgeiron invalid command ProcessHistory("FLASH","","","!Flash: $_"); } ProcessHistory("","","","!\n"); return; } for this one: # This routine parses "show flash" sub ShowFlash { my($INPUT, $OUTPUT) = @_; print STDERR " In ShowFlash: $_" if ($debug); while (<$INPUT>) { tr/\015//d; last if (/^$prompt/); next if (/^\s*$/); next if (/Flash Free Space/); return(1) if (/^\s+\^$/); # edgeiron invalid command ProcessHistory("FLASH","","","!Flash: $_"); } ProcessHistory("","","","!\n"); return; } Right? > On Apr 8, 2015, at 2:55 PM, Hughes, Doug wrote: > > Kind of an informal FAQ > > Edit your francid (or whatever rancid file you are using) > > Find the sub ShowFlash in there > > Where it says next if, add another one like this: > next if (/Flash Free Space/); > > -----Original Message----- > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Gerhard Mourani > Sent: Wednesday, April 08, 2015 2:52 PM > To: rancid-discuss at shrubbery.net > Subject: [rancid] Flash: Code Flash > > Hello, > > Someone know how to make Rancid stop to send me this kind of diff related to Flash? > > --- foundry/configs/10.2.107.2 2015/04/02 04:48:46 1.3 > +++ foundry/configs/10.2.107.2 2015/04/02 16:49:40 1.4 > @@ -45,7 +45,7 @@ > !Flash: Compressed Pri Code size = 10842104, Version:08.0.01cT311 (ICX64S08001c.bin) > !Flash: Compressed Sec Code size = 10828856, Version:08.0.01T311 (ICX64S08001.bin) > !Flash: Compressed Boot-Monitor Image size = 778992, Version:10.0.00T310 > -!Flash: Code Flash Free Space = 6930432 > +!Flash: Code Flash Free Space = 6897664 > ! > ! > ! > > Gerhard, > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmourani at gmail.com Wed Apr 8 19:04:52 2015 From: gmourani at gmail.com (Gerhard Mourani) Date: Wed, 8 Apr 2015 15:04:52 -0400 Subject: [rancid] Flash: Code Flash In-Reply-To: References: <24DCC5D7-2D05-4989-9F5E-E2CD0E031D77@gmail.com> Message-ID: <4ACE48C9-B175-4C14-A2AC-9441041B96B7@gmail.com> Thanks ;) > On Apr 8, 2015, at 3:02 PM, Hughes, Doug wrote: > > You got it. That easy. > > From: Gerhard Mourani [mailto:gmourani at gmail.com] > Sent: Wednesday, April 08, 2015 3:02 PM > To: Hughes, Doug > Cc: rancid-discuss at shrubbery.net > Subject: Re: [rancid] Flash: Code Flash > > So, you mean changing: > > # This routine parses "show flash" > sub ShowFlash { > my($INPUT, $OUTPUT) = @_; > print STDERR " In ShowFlash: $_" if ($debug); > > while (<$INPUT>) { > tr/\015//d; > last if (/^$prompt/); > next if (/^\s*$/); > return(1) if (/^\s+\^$/); # edgeiron invalid command > > ProcessHistory("FLASH","","","!Flash: $_"); > } > ProcessHistory("","","","!\n"); > return; > } > > for this one: > > # This routine parses "show flash" > sub ShowFlash { > my($INPUT, $OUTPUT) = @_; > print STDERR " In ShowFlash: $_" if ($debug); > > while (<$INPUT>) { > tr/\015//d; > last if (/^$prompt/); > next if (/^\s*$/); > next if (/Flash Free Space/); > return(1) if (/^\s+\^$/); # edgeiron invalid command > > ProcessHistory("FLASH","","","!Flash: $_"); > } > ProcessHistory("","","","!\n"); > return; > } > > Right? > > On Apr 8, 2015, at 2:55 PM, Hughes, Doug > wrote: > > Kind of an informal FAQ > > Edit your francid (or whatever rancid file you are using) > > Find the sub ShowFlash in there > > Where it says next if, add another one like this: > next if (/Flash Free Space/); > > -----Original Message----- > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net ] On Behalf Of Gerhard Mourani > Sent: Wednesday, April 08, 2015 2:52 PM > To: rancid-discuss at shrubbery.net > Subject: [rancid] Flash: Code Flash > > Hello, > > Someone know how to make Rancid stop to send me this kind of diff related to Flash? > > --- foundry/configs/10.2.107.2 2015/04/02 04:48:46 1.3 > +++ foundry/configs/10.2.107.2 2015/04/02 16:49:40 1.4 > @@ -45,7 +45,7 @@ > !Flash: Compressed Pri Code size = 10842104, Version:08.0.01cT311 (ICX64S08001c.bin) > !Flash: Compressed Sec Code size = 10828856, Version:08.0.01T311 (ICX64S08001.bin) > !Flash: Compressed Boot-Monitor Image size = 778992, Version:10.0.00T310 > -!Flash: Code Flash Free Space = 6930432 > +!Flash: Code Flash Free Space = 6897664 > ! > ! > ! > > Gerhard, > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Wed Apr 8 19:07:22 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Wed, 8 Apr 2015 19:07:22 +0000 (UTC) Subject: [rancid] New Install with OPENNMS Message-ID: <578258049.2660521.1428520042543.JavaMail.yahoo@mail.yahoo.com> Trying to finalize the install, and when I do rancid-run to load the configs, all I see in the files are these. $ tail var/logs/routers.20150408.135550 starting: Wed Apr 8 13:55:50 CDT 2015 ./bin/rancid-run: 206: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found ./bin/rancid-run: 213: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found ending: Wed Apr 8 13:55:50 CDT 2015 How do I fix this?? It is running on Wheezy, and when I try whereis rancid-trap, all I get is rancid-trap: with no paths.? I even tried adding it to path$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rancid/bin/rancid-trap:/usr/local/rancid/bin/rancid-run -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Wed Apr 8 19:19:52 2015 From: heas at shrubbery.net (heasley) Date: Wed, 8 Apr 2015 19:19:52 +0000 Subject: [rancid] New Install with OPENNMS In-Reply-To: <578258049.2660521.1428520042543.JavaMail.yahoo@mail.yahoo.com> References: <578258049.2660521.1428520042543.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150408191952.GA20144@shrubbery.net> Wed, Apr 08, 2015 at 07:07:22PM +0000, Todd Heide: > Trying to finalize the install, and when I do rancid-run to load the configs, all I see in the files are these. > $ tail var/logs/routers.20150408.135550 > starting: Wed Apr 8 13:55:50 CDT 2015 > > ./bin/rancid-run: 206: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found > > ./bin/rancid-run: 213: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found that is not part of rancid. ask opennms. > ending: Wed Apr 8 13:55:50 CDT 2015 > > How do I fix this?? It is running on Wheezy, and when I try whereis rancid-trap, all I get is rancid-trap: with no paths.? I even tried adding it to path$ echo $PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rancid/bin/rancid-trap:/usr/local/rancid/bin/rancid-run > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From workwithcisco at yahoo.com Wed Apr 8 19:40:16 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Wed, 8 Apr 2015 19:40:16 +0000 (UTC) Subject: [rancid] New Install with OPENNMS In-Reply-To: <20150408191952.GA20144@shrubbery.net> References: <20150408191952.GA20144@shrubbery.net> Message-ID: <584717331.2702009.1428522016631.JavaMail.yahoo@mail.yahoo.com> OK, how about this?? I think I ran into this a long time ago as well Dont remember what I did to fix it, thinking it is something with Apache. Traceback (most recent call last): File "/var/www/viewvc/lib/viewvc.py", line 4848, in main request.run_viewvc() File "/var/www/viewvc/lib/viewvc.py", line 402, in run_viewvc self.view_func(self) File "/var/www/viewvc/lib/viewvc.py", line 2290, in view_directory file_data, options) File "/var/www/viewvc/lib/vclib/ccvs/bincvs.py", line 266, in dirlogs alltags = _get_logs(self, path_parts, entries_to_fetch, rev, subdirs) File "/var/www/viewvc/lib/vclib/ccvs/bincvs.py", line 1025, in _get_logs % file.path) Error: Rlog output ended early. Expected RCS file "/usr/local/rancid/var/CVS/routers/router.db,v" From: heasley To: Todd Heide Cc: "Rancid-discuss at shrubbery.net" Sent: Wednesday, April 8, 2015 2:19 PM Subject: Re: [rancid] New Install with OPENNMS Wed, Apr 08, 2015 at 07:07:22PM +0000, Todd Heide: > Trying to finalize the install, and when I do rancid-run to load the configs, all I see in the files are these. > $ tail var/logs/routers.20150408.135550 > starting: Wed Apr 8 13:55:50 CDT 2015 > > ./bin/rancid-run: 206: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found > > ./bin/rancid-run: 213: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found that is not part of rancid.? ask opennms. > ending: Wed Apr 8 13:55:50 CDT 2015 > > How do I fix this?? It is running on Wheezy, and when I try whereis rancid-trap, all I get is rancid-trap: with no paths.? I even tried adding it to path$ echo $PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rancid/bin/rancid-trap:/usr/local/rancid/bin/rancid-run > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Wed Apr 8 21:03:44 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Wed, 8 Apr 2015 21:03:44 +0000 (UTC) Subject: [rancid] New Install with OPENNMS In-Reply-To: <20150408191952.GA20144@shrubbery.net> References: <20150408191952.GA20144@shrubbery.net> Message-ID: <516918739.2746882.1428527024216.JavaMail.yahoo@mail.yahoo.com> Woot, I finally remembered what it was, rcs tools were missing. a little tweaking of the viewvc.conf and installing RCS and its working. Also Rancid is running now without issues(at least the ones I posted about). Will see soon if it actually starts backing up devices. First time I set this up since 2007. From: heasley To: Todd Heide Cc: "Rancid-discuss at shrubbery.net" Sent: Wednesday, April 8, 2015 2:19 PM Subject: Re: [rancid] New Install with OPENNMS Wed, Apr 08, 2015 at 07:07:22PM +0000, Todd Heide: > Trying to finalize the install, and when I do rancid-run to load the configs, all I see in the files are these. > $ tail var/logs/routers.20150408.135550 > starting: Wed Apr 8 13:55:50 CDT 2015 > > ./bin/rancid-run: 206: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found > > ./bin/rancid-run: 213: ./bin/rancid-run: /usr/local/bin/rancid-trap: not found that is not part of rancid.? ask opennms. > ending: Wed Apr 8 13:55:50 CDT 2015 > > How do I fix this?? It is running on Wheezy, and when I try whereis rancid-trap, all I get is rancid-trap: with no paths.? I even tried adding it to path$ echo $PATH > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rancid/bin/rancid-trap:/usr/local/rancid/bin/rancid-run > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From wpleasants at gmail.com Wed Apr 8 20:18:27 2015 From: wpleasants at gmail.com (Chip Pleasants) Date: Wed, 8 Apr 2015 16:18:27 -0400 Subject: [rancid] Adding IOS Commands to Rancid 3.1 Message-ID: I couldn't find anything that discussed this in detail, so I'm hoping someone could give me a little direction. I'm trying to add a new command in rancid 3.1 for IOS devices and its not issuing the command i'm trying to add when running rancid. it doesn't seem its looking at the rancid.types.conf file when running. I've modified the /etc/rancid/rancid.types.conf and the /usr/share/perl5/vendor_perl/rancid/ ios.pm. I've added my additions right about the "chow version" statement in both files. Below are my the additions to each file and some debug out when I run rancid. Thanks in advance for taking the time to assist and let me know if I can provide any more information. -Chip [rancid at server02 ~]$ cat /etc/rancid/rancid.types.conf | grep ShowArchiveConfigDiff cisco;command;ios::ShowArchiveConfigDiff;show archive config diff [rancid at server02 ~]$ sudo nano /usr/share/perl5/vendor_perl/rancid/ios.pm # This routine parses "ShowArchiveConfigDiff" sub ShowArchiveConfigDiff { my($INPUT, $OUTPUT, $cmd) = @_; print STDERR " In ShowArchiveConfigDiff: $_" if ($debug); while (<$INPUT>) { tr/\015//d; last if (/^$prompt/); next if (/^(\s*|\s*$cmd\s*)$/); next if (/^\s+\^$/); return(1) if (/Line has invalid autocommand /); return(1) if (/(invalid (input|command) detected|type help or )/i); if (/current template is/) { ProcessHistory("COMMENTS","keysort","IO","!Diff: $_"); } } ProcessHistory("COMMENTS","keysort","IO","!\n"); return(0); } [rancid at server02 ~]$ /usr/libexec/rancid/rancid -t cisco -d router.inc.net loadtype: device type cisco loadtype: found device type cisco in /etc/rancid/rancid.types.base executing clogin -t 90 -c"show version;show redundancy secondary;show idprom backplane;show install active;show env all;show rsp chassis-info;show gsr chassis;show diag chassis-info;show boot;show bootvar;show variables boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all sec-disk2:;show controllers;show controllers cbus;show diagbus;show diag;show capture;show module;show spe version;show c7200;show inventory raw;show vtp status;show vlan;show vlan-switch;show switch detail;show sdm prefer;show system mtu;show debug;show shun;more system:running-config;show running-config view full;show running-config;write term" router.inc.net PROMPT MATCH: router# HIT COMMAND:router#show version In ShowVersion: router#show version TYPE = ASR1001 HIT COMMAND:router#show redundancy secondary In ShowRedundancy: router#show redundancy secondary HIT COMMAND:router#show idprom backplane In ShowIDprom: router#show idprom backplane HIT COMMAND:router#show install active In ShowInstallActive: router#show install active HIT COMMAND:router#show env all In ShowEnv: router#show env all HIT COMMAND:router#show rsp chassis-info In ShowRSP: router#show rsp chassis-info HIT COMMAND:router#show gsr chassis In ShowGSR: router#show gsr chassis HIT COMMAND:router#show diag chassis-info In ShowGSR: router#show diag chassis-info HIT COMMAND:router#show boot In ShowBoot: router#show boot HIT COMMAND:router#show bootvar In ShowBoot: router#show bootvar HIT COMMAND:router#show variables boot In ShowBoot: router#show variables boot HIT COMMAND:router#show flash In ShowFlash: router#show flash HIT COMMAND:router#dir /all nvram: In DirSlotN: router#dir /all nvram: HIT COMMAND:router#dir /all bootflash: In DirSlotN: router#dir /all bootflash: HIT COMMAND:router#dir /all slot0: In DirSlotN: router#dir /all slot0: HIT COMMAND:router#dir /all disk0: In DirSlotN: router#dir /all disk0: HIT COMMAND:router#dir /all slot1: In DirSlotN: router#dir /all slot1: HIT COMMAND:router#dir /all disk1: In DirSlotN: router#dir /all disk1: HIT COMMAND:router#dir /all slot2: In DirSlotN: router#dir /all slot2: HIT COMMAND:router#dir /all disk2: In DirSlotN: router#dir /all disk2: HIT COMMAND:router#dir /all harddisk: In DirSlotN: router#dir /all harddisk: HIT COMMAND:router#dir /all harddiska: In DirSlotN: router#dir /all harddiska: HIT COMMAND:router#dir /all harddiskb: In DirSlotN: router#dir /all harddiskb: HIT COMMAND:router#dir /all sup-bootdisk: In DirSlotN: router#dir /all sup-bootdisk: HIT COMMAND:router#dir /all sup-bootflash: In DirSlotN: router#dir /all sup-bootflash: HIT COMMAND:router#dir /all sup-microcode: In DirSlotN: router#dir /all sup-microcode: HIT COMMAND:router#dir /all slavenvram: In DirSlotN: router#dir /all slavenvram: HIT COMMAND:router#dir /all slavebootflash: In DirSlotN: router#dir /all slavebootflash: HIT COMMAND:router#dir /all slaveslot0: In DirSlotN: router#dir /all slaveslot0: HIT COMMAND:router#dir /all slavedisk0: In DirSlotN: router#dir /all slavedisk0: HIT COMMAND:router#dir /all slaveslot1: In DirSlotN: router#dir /all slaveslot1: HIT COMMAND:router#dir /all slavedisk1: In DirSlotN: router#dir /all slavedisk1: HIT COMMAND:router#dir /all slaveslot2: In DirSlotN: router#dir /all slaveslot2: HIT COMMAND:router#dir /all slavedisk2: In DirSlotN: router#dir /all slavedisk2: HIT COMMAND:router#dir /all slavesup-bootflash: In DirSlotN: router#dir /all slavesup-bootflash: HIT COMMAND:router#dir /all sec-nvram: In DirSlotN: router#dir /all sec-nvram: HIT COMMAND:router#dir /all sec-bootflash: In DirSlotN: router#dir /all sec-bootflash: HIT COMMAND:router#dir /all sec-slot0: In DirSlotN: router#dir /all sec-slot0: HIT COMMAND:router#dir /all sec-disk0: In DirSlotN: router#dir /all sec-disk0: HIT COMMAND:router#dir /all sec-slot1: In DirSlotN: router#dir /all sec-slot1: HIT COMMAND:router#dir /all sec-disk1: In DirSlotN: router#dir /all sec-disk1: HIT COMMAND:router#dir /all sec-slot2: In DirSlotN: router#dir /all sec-slot2: HIT COMMAND:router#dir /all sec-disk2: In DirSlotN: router#dir /all sec-disk2: HIT COMMAND:router#show controllers In ShowContAll: router#show controllers HIT COMMAND:router#show controllers cbus In ShowContCbus: router#show controllers cbus HIT COMMAND:router#show diagbus In ShowDiagbus: router#show diagbus HIT COMMAND:router#show diag In ShowDiag: router#show diag HIT COMMAND:router#show capture In ShowCapture: router#show capture HIT COMMAND:router#show module In ShowModule: router#show module HIT COMMAND:router#show spe version In ShowSpeVersion: router#show spe version HIT COMMAND:router#show c7200 In ShowC7200: router#show c7200 HIT COMMAND:router#show inventory raw In ShowInventory: router#show inventory raw HIT COMMAND:router#show vtp status In ShowVTP: router#show vtp status HIT COMMAND:router#show vlan In ShowVLAN: router#show vlan HIT COMMAND:router#show vlan-switch In ShowVLAN: router#show vlan-switch HIT COMMAND:router#show switch detail In ShowDetail: router#show switch detail HIT COMMAND:router#show sdm prefer In ShowSDM: router#show sdm prefer HIT COMMAND:router#show system mtu In ShowMTU: router#show system mtu HIT COMMAND:router#show debug In ShowDebug: router#show debug HIT COMMAND:router#show shun In ShowShun: router#show shun HIT COMMAND:router#more system:running-config In WriteTerm: router#more system:running-config HIT COMMAND:router#show running-config view full In WriteTerm: router#show running-config view full HIT COMMAND:router#show running-config In WriteTerm: router#show running-config HIT COMMAND:router#write term In WriteTerm: router#write term [rancid at server02 ~]$ -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Wed Apr 8 22:36:08 2015 From: heas at shrubbery.net (heasley) Date: Wed, 8 Apr 2015 22:36:08 +0000 Subject: [rancid] Adding IOS Commands to Rancid 3.1 In-Reply-To: References: Message-ID: <20150408223608.GA24625@shrubbery.net> Wed, Apr 08, 2015 at 04:18:27PM -0400, Chip Pleasants: > I couldn't find anything that discussed this in detail, so I'm hoping > someone could give me a little direction. I'm trying to add a new command > in rancid 3.1 for IOS devices and its not issuing the command i'm trying to > add when running rancid. it doesn't seem its looking at the > rancid.types.conf file when running. I've modified the > /etc/rancid/rancid.types.conf and the /usr/share/perl5/vendor_perl/rancid/ > ios.pm. I've added my additions right about the "chow version" statement in > both files. Below are my the additions to each file and some debug out when > I run rancid. Thanks in advance for taking the time to assist and let me > know if I can provide any more information. You should copy the cisco definition from rancid.types.base to rancid.types.conf and give it a new name. rancid looks in the base file first, and new installations will overwrite that file. From wpleasants at gmail.com Wed Apr 8 23:58:03 2015 From: wpleasants at gmail.com (Chip Pleasants) Date: Wed, 8 Apr 2015 19:58:03 -0400 Subject: [rancid] Adding IOS Commands to Rancid 3.1 In-Reply-To: <20150408223608.GA24625@shrubbery.net> References: <20150408223608.GA24625@shrubbery.net> Message-ID: Thank you very much for assisting. Was I right in modifying the ios.pm? By definition do you mean something like below? I'm assuming if I wanted to use this definition I'd have to change devices in router.db that I wanted to run this command on? If it does work this way I suppose I'll want to add all the other commands normally baked in the cisco definition? # Custom Commands for Cisco IOS devices cisco-custom;script;rancid -t cisco cisco-custom;login;clogin cisco-custom;module;ios cisco-custom;inloop;ios::inloop cisco-custom;command;ios::ShowArchiveConfigDiff;show archive config diff -Chip On Wed, Apr 8, 2015 at 6:36 PM, heasley wrote: > Wed, Apr 08, 2015 at 04:18:27PM -0400, Chip Pleasants: > > I couldn't find anything that discussed this in detail, so I'm hoping > > someone could give me a little direction. I'm trying to add a new command > > in rancid 3.1 for IOS devices and its not issuing the command i'm trying > to > > add when running rancid. it doesn't seem its looking at the > > rancid.types.conf file when running. I've modified the > > /etc/rancid/rancid.types.conf and the > /usr/share/perl5/vendor_perl/rancid/ > > ios.pm. I've added my additions right about the "chow version" > statement in > > both files. Below are my the additions to each file and some debug out > when > > I run rancid. Thanks in advance for taking the time to assist and let me > > know if I can provide any more information. > > You should copy the cisco definition from rancid.types.base to > rancid.types.conf and give it a new name. > > rancid looks in the base file first, and new installations will overwrite > that file. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Thu Apr 9 15:13:50 2015 From: heas at shrubbery.net (heasley) Date: Thu, 9 Apr 2015 15:13:50 +0000 Subject: [rancid] Adding IOS Commands to Rancid 3.1 In-Reply-To: References: <20150408223608.GA24625@shrubbery.net> Message-ID: <20150409151349.GA50988@shrubbery.net> Wed, Apr 08, 2015 at 07:58:03PM -0400, Chip Pleasants: > Thank you very much for assisting. Was I right in modifying the ios.pm? By you can do that; again it will be overwritten by the next installation. you can create a separate pm for this command and include it with another module line - i cant recall if i added that in 3.1 or 3.2. > definition do you mean something like below? I'm assuming if I wanted to > use this definition I'd have to change devices in router.db that I wanted > to run this command on? If it does work this way I suppose I'll want to > add all the other commands normally baked in the cisco definition? yes, yes, yes. > > # Custom Commands for Cisco IOS devices > cisco-custom;script;rancid -t cisco > cisco-custom;login;clogin > cisco-custom;module;ios > cisco-custom;inloop;ios::inloop > cisco-custom;command;ios::ShowArchiveConfigDiff;show archive config diff cisco-custom;module;ios cisco-custom;module;myios cisco-custom;command;ios::ShowVersion;show version cisco-custom;command;ios::etc etc cisco-custom;command;myios::ShowArchiveConfigDiff;show archive config diff or if you wanted ShowVersion to do something different; you could create your own: cisco-custom;module;myios cisco-custom;command;myios::ShowVersion;show version cisco-custom;command;ios::etc etc From wpleasants at gmail.com Fri Apr 10 13:39:50 2015 From: wpleasants at gmail.com (Chip Pleasants) Date: Fri, 10 Apr 2015 09:39:50 -0400 Subject: [rancid] Adding IOS Commands to Rancid 3.1 In-Reply-To: <20150409151349.GA50988@shrubbery.net> References: <20150408223608.GA24625@shrubbery.net> <20150409151349.GA50988@shrubbery.net> Message-ID: I'm making some strides, but still not getting it to work. I made the changes discussed in the previous message except creating a new perl module. It looks like it issues the command from the output below, but nothing shows up in the file. I'm expecting things starting with !Difff. Does there need to be more logic for the output? [rancid at server02 ~]$ cat /etc/rancid/rancid.types.conf # Custom Commands for Cisco IOS devices cisco-ios;script;rancid -t cisco-ios cisco-ios;login;clogin cisco-ios;module;ios cisco-ios;inloop;ios::inloop cisco-ios;command;ios::ShowArchiveConfigDiff;show archive config diff [rancid at server02 ~]$ cat /usr/share/perl5/vendor_perl/rancid/ios.pm # This routine parses "ShowArchiveConfigDiff" sub ShowArchiveConfigDiff { my($INPUT, $OUTPUT, $cmd) = @_; print STDERR " In ShowArchiveConfigDiff: $_" if ($debug); while (<$INPUT>) { tr/\015//d; last if (/^$prompt/); next if (/^(\s*|\s*$cmd\s*)$/); next if (/^\s+\^$/); return(1) if (/Line has invalid autocommand /); return(1) if (/(invalid (input|command) detected|type help or )/i); if (/current template is/) { ProcessHistory("COMMENTS","keysort","IO","!Diff: $_"); } } ProcessHistory("COMMENTS","keysort","IO","!\n"); return(0); } [rancid at server02 ~]$ /usr/libexec/rancid/rancid -t cisco-ios -d router.inc.net loadtype: device type cisco-ios loadtype: found device type cisco-ios in /etc/rancid/rancid.types.conf executing clogin -t 90 -c"show archive config diff;show version;show redundancy secondary;show idprom backplane;show install active;show env all;show rsp chassis-info;show gsr chassis;show diag chassis-info;show boot;show bootvar;show variables boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all sec-disk2:;show controllers;show controllers cbus;show diagbus;show diag;show capture;show module;show spe version;show c7200;show inventory raw;show vtp status;show vlan;show vlan-switch;show switch detail;show sdm prefer;show system mtu;show debug;show shun;more system:running-config;show running-config view full;show running-config;write term" router.inc.net PROMPT MATCH: router# HIT COMMAND:router#show archive config diff In ShowArchiveConfigDiff: router#show archive config diff router#sh archive config differences ! !Contextual Config Diffs: crypto pki certificate chain TP-self-signed-1439941376 +certificate self-signed 01 nvram:router#7474.cer +ntp clock-period 36029336 crypto pki certificate chain TP-self-signed-1439941376 -certificate self-signed 01 -308202BE 30820227 A0030201 02020101 300D0609 2A864886 F70D0101 04050030 -63312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274 -69666963 6174652D 31343339 39343133 37363130 302E0609 2A864886 F70D0109 -02162143 4D48312D 49444631 302D4130 312E646F 6D61696E 30312E76 63647369 -2E6E6574 301E170D 39333033 30313030 30323439 5A170D32 30303130 31303030 -3030305A 3063312F 302D0603 55040313 26494F53 2D53656C 662D5369 676E6564 -2D436572 74696669 63617465 2D313433 39393431 33373631 30302E06 092A8648 -86F70D01 09021621 434D4831 2D494446 31302D41 30312E64 6F6D6169 6E30312E -76636473 692E6E65 7430819F 300D0609 2A864886 F70D0101 01050003 818D0030 -81890281 8100A2CC 9B49301D 797D5BC5 97A5358C B59D932E 1435D3C3 C03B3E7B -BA351D78 1F3705DA D3C91C08 C47BD867 3047AB49 A31E5EC8 5B449984 8D78A2C0 -E7BBC91E B286EBAB C2E105DB 1E1CF2AE BEC48BD6 4B1A247F DB6A1CD8 DEBE1505 -0F5DE00D C28D5A49 D6F9D076 120E14EC FDDEF22A 3173AF94 BC3CE14D 9B1160EF -9098D071 CFE50203 010001A3 8181307F 300F0603 551D1301 01FF0405 30030101 -FF302C06 03551D11 04253023 8221434D 48312D49 44463130 2D413031 2E646F6D -61696E30 312E7663 6473692E 6E657430 1F060355 1D230418 30168014 9B3F993D -E8086DD2 CC598472 04B43B3A D2309645 301D0603 551D0E04 1604149B 3F993DE8 -086DD2CC 59847204 B43B3AD2 30964530 0D06092A 864886F7 0D010104 05000381 -81004365 4AC25D08 C9AD3506 F146FBFA B51487AE EB8BBDD6 C5E18571 1320D367 -FE26C7C5 402535FD 80A267E6 1AAF099A D034CED7 5EDA462C FC465FB3 CD02B792 -72455D7D A1440B68 54AE7AB9 F5E5B42F 339D793B B315645C C29FE3A7 EA5EB2D9 -76DD8DF5 C0A0F984 864451CB 867F2869 73493329 1CACE7B4 6313183C CB38B6DC FC02 -quit -ntp clock-period 36029341 router# -Chip On Thu, Apr 9, 2015 at 11:13 AM, heasley wrote: > Wed, Apr 08, 2015 at 07:58:03PM -0400, Chip Pleasants: > > Thank you very much for assisting. Was I right in modifying the ios.pm? > By > > you can do that; again it will be overwritten by the next installation. > you can create a separate pm for this command and include it with another > module line - i cant recall if i added that in 3.1 or 3.2. > > > definition do you mean something like below? I'm assuming if I wanted to > > use this definition I'd have to change devices in router.db that I wanted > > to run this command on? If it does work this way I suppose I'll want to > > add all the other commands normally baked in the cisco definition? > > yes, yes, yes. > > > > > # Custom Commands for Cisco IOS devices > > cisco-custom;script;rancid -t cisco > > cisco-custom;login;clogin > > cisco-custom;module;ios > > cisco-custom;inloop;ios::inloop > > cisco-custom;command;ios::ShowArchiveConfigDiff;show archive config diff > > cisco-custom;module;ios > cisco-custom;module;myios > cisco-custom;command;ios::ShowVersion;show version > cisco-custom;command;ios::etc etc > cisco-custom;command;myios::ShowArchiveConfigDiff;show archive config diff > > or if you wanted ShowVersion to do something different; you could create > your own: > cisco-custom;module;myios > cisco-custom;command;myios::ShowVersion;show version > cisco-custom;command;ios::etc etc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Tue Apr 14 16:21:46 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 16:21:46 +0000 (UTC) Subject: [rancid] Cisco Banners Message-ID: <167150664.3380377.1429028506271.JavaMail.yahoo@mail.yahoo.com> I am having an issue with rancid running commands, and I think I found out why, but dont know how to correct it.? When logging into a router, there is a banner which is using ############# for the box.? Looks like this is what is interfering with Rancid. Is there any work around other than removing the banner(I dont think this will go over well). banner motd ^CC ############################################################################### blahblahblah###############################################################################^C expect: does "routerr#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Tue Apr 14 16:36:36 2015 From: heas at shrubbery.net (heasley) Date: Tue, 14 Apr 2015 16:36:36 +0000 Subject: [rancid] Cisco Banners In-Reply-To: <167150664.3380377.1429028506271.JavaMail.yahoo@mail.yahoo.com> References: <167150664.3380377.1429028506271.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150414163636.GG27717@shrubbery.net> Tue, Apr 14, 2015 at 04:21:46PM +0000, Todd Heide: > I am having an issue with rancid running commands, and I think I found out why, but dont know how to correct it.? When logging into a router, there is a banner which is using ############# for the box.? Looks like this is what is interfering with Rancid. Is there any work around other than removing the banner(I dont think this will go over well). > banner motd ^CC > ############################################################################### > blahblahblah###############################################################################^C > expect: does "routerr#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no > > see add prompt in cloginrc(5) From workwithcisco at yahoo.com Tue Apr 14 18:12:56 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 18:12:56 +0000 (UTC) Subject: [rancid] Cisco Banners In-Reply-To: <20150414163636.GG27717@shrubbery.net> References: <20150414163636.GG27717@shrubbery.net> Message-ID: <1500672574.3488978.1429035176483.JavaMail.yahoo@mail.yahoo.com> That was the first place I looked, and do not see add prompt listed.? http://www.shrubbery.net/rancid/man/cloginrc.5.html I looked through the .clogin file itself to find a way to ignore the banner. From: heasley To: Todd Heide Cc: "rancid-discuss at shrubbery.net" Sent: Tuesday, April 14, 2015 11:36 AM Subject: Re: [rancid] Cisco Banners Tue, Apr 14, 2015 at 04:21:46PM +0000, Todd Heide: > I am having an issue with rancid running commands, and I think I found out why, but dont know how to correct it.? When logging into a router, there is a banner which is using ############# for the box.? Looks like this is what is interfering with Rancid. Is there any work around other than removing the banner(I dont think this will go over well). > banner motd ^CC > ############################################################################### > blahblahblah###############################################################################^C > expect: does "routerr#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no > > see add prompt in cloginrc(5) -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Tue Apr 14 18:19:25 2015 From: heas at shrubbery.net (heasley) Date: Tue, 14 Apr 2015 18:19:25 +0000 Subject: [rancid] Cisco Banners In-Reply-To: <1500672574.3488978.1429035176483.JavaMail.yahoo@mail.yahoo.com> References: <20150414163636.GG27717@shrubbery.net> <1500672574.3488978.1429035176483.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150414181925.GD30384@shrubbery.net> Tue, Apr 14, 2015 at 06:12:56PM +0000, Todd Heide: > That was the first place I looked, and do not see add prompt listed.? http://www.shrubbery.net/rancid/man/cloginrc.5.html I looked through the .clogin file itself to find a way to ignore the banner. I need to update those manpages; sorry. I assumed you were using rancid >= 3.0. This was added in 3.0. > > From: heasley > To: Todd Heide > Cc: "rancid-discuss at shrubbery.net" > Sent: Tuesday, April 14, 2015 11:36 AM > Subject: Re: [rancid] Cisco Banners > > Tue, Apr 14, 2015 at 04:21:46PM +0000, Todd Heide: > > > > I am having an issue with rancid running commands, and I think I found out why, but dont know how to correct it.? When logging into a router, there is a banner which is using ############# for the box.? Looks like this is what is interfering with Rancid. Is there any work around other than removing the banner(I dont think this will go over well). > > banner motd ^CC > > ############################################################################### > > blahblahblah###############################################################################^C > > expect: does "routerr#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no > > > > > > see add prompt in cloginrc(5) > > > From workwithcisco at yahoo.com Tue Apr 14 19:10:30 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 14:10:30 -0500 Subject: [rancid] Cisco Banners In-Reply-To: <20150414181925.GD30384@shrubbery.net> References: <20150414163636.GG27717@shrubbery.net> <1500672574.3488978.1429035176483.JavaMail.yahoo@mail.yahoo.com> <20150414181925.GD30384@shrubbery.net> Message-ID: <8B053BC9-7855-4E25-8F5E-7B2C0794199D@yahoo.com> Yep. Could not locate an rws patch for the latest version so used 2.3.8. So far so good, this is my only hangup. Sent from my iPhone > On Apr 14, 2015, at 1:19 PM, heasley wrote: > > Tue, Apr 14, 2015 at 06:12:56PM +0000, Todd Heide: >> That was the first place I looked, and do not see add prompt listed. http://www.shrubbery.net/rancid/man/cloginrc.5.html I looked through the .clogin file itself to find a way to ignore the banner. > > I need to update those manpages; sorry. > > I assumed you were using rancid >= 3.0. This was added in 3.0. > >> >> From: heasley >> To: Todd Heide >> Cc: "rancid-discuss at shrubbery.net" >> Sent: Tuesday, April 14, 2015 11:36 AM >> Subject: Re: [rancid] Cisco Banners >> >> Tue, Apr 14, 2015 at 04:21:46PM +0000, Todd Heide: >> >> >>> I am having an issue with rancid running commands, and I think I found out why, but dont know how to correct it. When logging into a router, there is a banner which is using ############# for the box. Looks like this is what is interfering with Rancid. Is there any work around other than removing the banner(I dont think this will go over well). >>> banner motd ^CC >>> ############################################################################### >>> blahblahblah###############################################################################^C >>> expect: does "routerr#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no >> >> see add prompt in cloginrc(5) >> >> >> From heas at shrubbery.net Tue Apr 14 19:39:08 2015 From: heas at shrubbery.net (heasley) Date: Tue, 14 Apr 2015 19:39:08 +0000 Subject: [rancid] Cisco Banners In-Reply-To: <8B053BC9-7855-4E25-8F5E-7B2C0794199D@yahoo.com> References: <20150414163636.GG27717@shrubbery.net> <1500672574.3488978.1429035176483.JavaMail.yahoo@mail.yahoo.com> <20150414181925.GD30384@shrubbery.net> <8B053BC9-7855-4E25-8F5E-7B2C0794199D@yahoo.com> Message-ID: <20150414193908.GH30384@shrubbery.net> Tue, Apr 14, 2015 at 02:10:30PM -0500, Todd Heide: > Yep. Could not locate an rws patch for the latest version so used 2.3.8. So far so good, this is my only hangup. > i do not know what an rws patch is. but, you can use clogin from 3.x. From workwithcisco at yahoo.com Tue Apr 14 20:05:30 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 20:05:30 +0000 (UTC) Subject: [rancid] Cisco Banners In-Reply-To: <20150414193908.GH30384@shrubbery.net> References: <20150414193908.GH30384@shrubbery.net> Message-ID: <389038707.3596144.1429041930581.JavaMail.yahoo@mail.yahoo.com> That's the patch used to add Restful web service for Opennms.? It partially works, and other than this problem with connecting to certain routers with MOTD banners, Rancid is working fine. It has been about 7 years since I setup my last instance of Rancid and it is slowly coming back to me. From: heasley To: Todd Heide Cc: heasley ; "rancid-discuss at shrubbery.net" Sent: Tuesday, April 14, 2015 2:39 PM Subject: Re: [rancid] Cisco Banners Tue, Apr 14, 2015 at 02:10:30PM -0500, Todd Heide: > Yep. Could not locate an rws patch for the latest version so used 2.3.8. So far so good, this is my only hangup. > i do not know what an rws patch is.? but, you can use clogin from 3.x. -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Tue Apr 14 20:19:18 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 20:19:18 +0000 (UTC) Subject: [rancid] Cisco Banners In-Reply-To: <20150414193908.GH30384@shrubbery.net> References: <20150414193908.GH30384@shrubbery.net> Message-ID: <64490804.3680045.1429042758273.JavaMail.yahoo@mail.yahoo.com> OK Found it. ?add prompt {} Match login prompt, or initial login prompt in the case of some of the login contain forbidden characters that conflict with CLI prompt markers. should use if or when prompted for one. OY REGEX, I hate Regex!? Now to figure this part out! From: heasley To: Todd Heide Cc: heasley ; "rancid-discuss at shrubbery.net" Sent: Tuesday, April 14, 2015 2:39 PM Subject: Re: [rancid] Cisco Banners Tue, Apr 14, 2015 at 02:10:30PM -0500, Todd Heide: > Yep. Could not locate an rws patch for the latest version so used 2.3.8. So far so good, this is my only hangup. > i do not know what an rws patch is.? but, you can use clogin from 3.x. -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Tue Apr 14 20:32:58 2015 From: heas at shrubbery.net (heasley) Date: Tue, 14 Apr 2015 20:32:58 +0000 Subject: [rancid] Cisco Banners In-Reply-To: <64490804.3680045.1429042758273.JavaMail.yahoo@mail.yahoo.com> References: <20150414193908.GH30384@shrubbery.net> <64490804.3680045.1429042758273.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150414203258.GO30384@shrubbery.net> Tue, Apr 14, 2015 at 08:19:18PM +0000, Todd Heide: > OK Found it. > ?add prompt {} > Match login prompt, or initial login prompt in the case of some of the login > contain forbidden characters that conflict with CLI prompt markers. > should use if or when prompted for one. > > > OY REGEX, I hate Regex!? Now to figure this part out! its not that difficult. it will set you free. sth like {\[^ ]\[#>]+} might do it. i've updated the html manpages too. From workwithcisco at yahoo.com Tue Apr 14 21:31:27 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 21:31:27 +0000 (UTC) Subject: [rancid] Cisco Banners In-Reply-To: <20150414203258.GO30384@shrubbery.net> References: <20150414203258.GO30384@shrubbery.net> Message-ID: <1209696916.3681707.1429047087914.JavaMail.yahoo@mail.yahoo.com> Tried a few different things, including a direct match for the expression and still errors. expect: does "\r\nrouter#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no What I am seeing though, and wonder if this is why,? terminal length 0? For several lines down I am seeing ter, termin, terminal, etc. until the last line above then is gives up.?? I dont know why terminal length 0 is coming up at the prompt, but when I turn debug off I am seeing it every time I clogin to this router.? If this was the only router that has a MOTD, I would push to have it removed, but they want it on all devices. From: heasley To: Todd Heide Cc: heasley ; "rancid-discuss at shrubbery.net" Sent: Tuesday, April 14, 2015 3:32 PM Subject: Re: [rancid] Cisco Banners Tue, Apr 14, 2015 at 08:19:18PM +0000, Todd Heide: > OK Found it. > ?add prompt {} > Match login prompt, or initial login prompt in the case of some of the login > contain forbidden characters that conflict with CLI prompt markers. > should use if or when prompted for one. > > > OY REGEX, I hate Regex!? Now to figure this part out! its not that difficult.? it will set you free. sth like {\[^ ]\[#>]+} might do it. i've updated the html manpages too. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob.Brunette at cdw.com Tue Apr 14 21:41:00 2015 From: Bob.Brunette at cdw.com (Bob Brunette) Date: Tue, 14 Apr 2015 21:41:00 +0000 Subject: [rancid] Cisco Banners In-Reply-To: <1209696916.3681707.1429047087914.JavaMail.yahoo@mail.yahoo.com> References: <20150414203258.GO30384@shrubbery.net> <1209696916.3681707.1429047087914.JavaMail.yahoo@mail.yahoo.com> Message-ID: Would it be difficult to change the ?#??s to ?*??s or ?=??s? RANCID doesn?t choke on those, and it?s what we normally do. Bob From: Todd Heide > Reply-To: Todd Heide > Date: Tuesday, April 14, 2015 at 4:31 PM To: heasley > Cc: "rancid-discuss at shrubbery.net" > Subject: Re: [rancid] Cisco Banners Tried a few different things, including a direct match for the expression and still errors. expect: does "\r\nrouter#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no What I am seeing though, and wonder if this is why, terminal length 0 For several lines down I am seeing ter, termin, terminal, etc. until the last line above then is gives up. I dont know why terminal length 0 is coming up at the prompt, but when I turn debug off I am seeing it every time I clogin to this router. If this was the only router that has a MOTD, I would push to have it removed, but they want it on all devices. ________________________________ From: heasley > To: Todd Heide > Cc: heasley >; "rancid-discuss at shrubbery.net" > Sent: Tuesday, April 14, 2015 3:32 PM Subject: Re: [rancid] Cisco Banners Tue, Apr 14, 2015 at 08:19:18PM +0000, Todd Heide: > OK Found it. > add prompt {} > Match login prompt, or initial login prompt in the case of some of the login > contain forbidden characters that conflict with CLI prompt markers. > should use if or when prompted for one. > > > OY REGEX, I hate Regex! Now to figure this part out! its not that difficult. it will set you free. sth like {\[^ ]\[#>]+} might do it. i've updated the html manpages too. -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Wed Apr 15 00:41:39 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 14 Apr 2015 19:41:39 -0500 Subject: [rancid] Cisco Banners In-Reply-To: References: <20150414203258.GO30384@shrubbery.net> <1209696916.3681707.1429047087914.JavaMail.yahoo@mail.yahoo.com> Message-ID: <15B9325E-287F-48C6-A498-CFC633E434AD@yahoo.com> That's probably where I will go. Wasted enough time already. Sent from my iPhone > On Apr 14, 2015, at 4:41 PM, Bob Brunette wrote: > > Would it be difficult to change the ?#??s to ?*??s or ?=??s? RANCID doesn?t choke on those, and it?s what we normally do. > > Bob > > > From: Todd Heide > Reply-To: Todd Heide > Date: Tuesday, April 14, 2015 at 4:31 PM > To: heasley > Cc: "rancid-discuss at shrubbery.net" > Subject: Re: [rancid] Cisco Banners > > Tried a few different things, including a direct match for the expression and still errors. > > expect: does "\r\nrouter#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no > > What I am seeing though, and wonder if this is why, terminal length 0 For several lines down I am seeing ter, termin, terminal, etc. until the last line above then is gives up. I dont know why terminal length 0 is coming up at the prompt, but when I turn debug off I am seeing it every time I clogin to this router. If this was the only router that has a MOTD, I would push to have it removed, but they want it on all devices. > > From: heasley > To: Todd Heide > Cc: heasley ; "rancid-discuss at shrubbery.net" > Sent: Tuesday, April 14, 2015 3:32 PM > Subject: Re: [rancid] Cisco Banners > > Tue, Apr 14, 2015 at 08:19:18PM +0000, Todd Heide: > > > > > OK Found it. > > add prompt {} > > Match login prompt, or initial login prompt in the case of some of the login > > contain forbidden characters that conflict with CLI prompt markers. > > should use if or when prompted for one. > > > > > > OY REGEX, I hate Regex! Now to figure this part out! > > > its not that difficult. it will set you free. > > sth like {\[^ ]\[#>]+} might do it. > > i've updated the html manpages too. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Wed Apr 15 00:59:11 2015 From: heas at shrubbery.net (heasley) Date: Wed, 15 Apr 2015 00:59:11 +0000 Subject: [rancid] Cisco Banners In-Reply-To: <1209696916.3681707.1429047087914.JavaMail.yahoo@mail.yahoo.com> References: <20150414203258.GO30384@shrubbery.net> <1209696916.3681707.1429047087914.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150415005911.GN40041@shrubbery.net> Tue, Apr 14, 2015 at 09:31:27PM +0000, Todd Heide: > Tried a few different things, including a direct match for the expression and still errors. > > expect: does "\r\nrouter#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no > > What I am seeing though, and wonder if this is why,? terminal length 0? For several lines down I am seeing ter, termin, terminal, etc. until the last line above then is gives up.?? I dont know why terminal length 0 is coming up at the prompt, but when I turn debug off I am seeing it every time I clogin to this router.? If this was the only router that has a MOTD, I would push to have it removed, but they want it on all devices. > > where did that regex come from? "########### etc etc" you may also try anchoring it: {^\[^ #]+\[#>]+} the last regex in the login procedure should eat the o/p one line at a time, so it can be anchored. From workwithcisco at yahoo.com Wed Apr 15 01:06:39 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Wed, 15 Apr 2015 01:06:39 +0000 (UTC) Subject: [rancid] Cisco Banners In-Reply-To: <20150415005911.GN40041@shrubbery.net> References: <20150415005911.GN40041@shrubbery.net> Message-ID: <203084800.3822721.1429059999534.JavaMail.yahoo@mail.yahoo.com> I'll give it a try tomorrow before submitting a change order to redo all the MOTD. From: heasley To: Todd Heide Cc: heasley ; "rancid-discuss at shrubbery.net" Sent: Tuesday, April 14, 2015 7:59 PM Subject: Re: [rancid] Cisco Banners Tue, Apr 14, 2015 at 09:31:27PM +0000, Todd Heide: > Tried a few different things, including a direct match for the expression and still errors. > > expect: does "\r\nrouter#\r\nrouter#terminal length 0\r\nrouter#" (spawn_id exp6) match regular expression "###############################################################################"? Gate "###############################################################################"? gate=no > > What I am seeing though, and wonder if this is why,? terminal length 0? For several lines down I am seeing ter, termin, terminal, etc. until the last line above then is gives up.?? I dont know why terminal length 0 is coming up at the prompt, but when I turn debug off I am seeing it every time I clogin to this router.? If this was the only router that has a MOTD, I would push to have it removed, but they want it on all devices. > >? where did that regex come from?? "########### etc etc" you may also try anchoring it: {^\[^ #]+\[#>]+} the last regex in the login procedure should eat the o/p one line at a time, so it can be anchored. -------------- next part -------------- An HTML attachment was scrubbed... URL: From howie at thingy.com Wed Apr 15 13:55:35 2015 From: howie at thingy.com (Howard Jones) Date: Wed, 15 Apr 2015 14:55:35 +0100 Subject: [rancid] wraprancid on RANCID 3.x Message-ID: <552E6DD7.8090104@thingy.com> Late last year I was asking on the mailing list about this, and I've finally had a chance to play with it in the last couple of weeks. I wrote a quick blog post on how to use wraprancid with RANCID 3.x: http://lesser-evil.com/2015/04/wraprancid-and-rancid-3-x/ It's pretty simple, once you know how :-) Howie From jeffrey.dambly at jasper.com Fri Apr 17 22:41:54 2015 From: jeffrey.dambly at jasper.com (Jeffrey d'Ambly) Date: Fri, 17 Apr 2015 22:41:54 +0000 Subject: [rancid] new rancid install not working Message-ID: I cannot for the life of me figure out what I?m doing wrong here. When I run /usr/bin/rancid-run it seems like nothing happens. When I run rancid manually I get the following qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1 loadtype: device type cisco loadtype: found device type cisco in /etc/rancid/rancid.types.base executing clogin -t 90 -c"show version;show redundancy;show idprom backplane;show install active;show env all;show rsp chassis-info;show gsr chassis;show diag chassis-info;show boot;show bootvar;show variables boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all sec-disk2:;show controllers;show controllers cbus;show diagbus;show diag;show capture;show module;show spe version;show c7200;show inventory raw;show vtp status;show vlan;show vlan-switch;show switch detail;show sdm prefer;show system mtu;show debug;show shun;more system:running-config;show running-config view full;show running-config;write term" sjc-vpe1 sh: clogin: command not found sjc-vpe1: missed cmd(s): all commands sjc-vpe1: End of run not found sjc-vpe1: End of run not found But if I can clogin manually it works qa-scl009-005:/var/log/rancid# /usr/libexec/rancid/clogin -t 90 -c"show version" sjc-vpe1 sjc-vpe1 spawn ssh -c 3des -x -l confbackup sjc-vpe1 Password: sjc-vpe1# sjc-vpe1#terminal length 0 sjc-vpe1#terminal width 132 sjc-vpe1#show version Cisco IOS Software, C3900e Software (C3900e-UNIVERSALK9-M), Version 15.2(4)M7, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2014 by Cisco Systems, Inc. Compiled Thu 25-Sep-14 10:09 by prod_rel_team ROM: System Bootstrap, Version 15.1(1r)T5, RELEASE SOFTWARE (fc1) I have no idea what the hell I am doing wrong here, if someone could point me in the right direction here that would be awesome. ?Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckinnon at gmail.com Fri Apr 17 23:05:14 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Sat, 18 Apr 2015 01:05:14 +0200 Subject: [rancid] new rancid install not working In-Reply-To: References: Message-ID: <553191AA.3080408@gmail.com> On 18/04/2015 00:41, Jeffrey d'Ambly wrote: > I cannot for the life of me figure out what I?m doing wrong here. > > When I run /usr/bin/rancid-run it seems like nothing happens. When I run > rancid manually I get the following > > qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1 > > loadtype: device type cisco > > loadtype: found device type cisco in /etc/rancid/rancid.types.base > > executing clogin -t 90 -c"show version;show redundancy;show idprom > backplane;show install active;show env all;show rsp chassis-info;show > gsr chassis;show diag chassis-info;show boot;show bootvar;show variables > boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir > /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all > disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir > /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir > /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all > slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all > slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all > sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all > sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all > sec-slot2:;dir /all sec-disk2:;show controllers;show controllers > cbus;show diagbus;show diag;show capture;show module;show spe > version;show c7200;show inventory raw;show vtp status;show vlan;show > vlan-switch;show switch detail;show sdm prefer;show system mtu;show > debug;show shun;more system:running-config;show running-config view > full;show running-config;write term" sjc-vpe1 > > sh: clogin: command not found This is your problem. When you run rancid manually you provided the full path. When you ran clogin manually, you provided the full path. When rancid-run calls rancid which calls clogin, it does not provide the full path. What you need to do is define $PATH to include the location of the *login scripts (/usr/libexec/rancid apparently) in the login shell of the user rancid runs as. Incidentally, you are doing your tests as root. You should not run rancid as root, rather run it as a rancid user -- Alan McKinnon alan.mckinnon at gmail.com From jeffrey.dambly at jasper.com Fri Apr 17 23:11:31 2015 From: jeffrey.dambly at jasper.com (Jeffrey d'Ambly) Date: Fri, 17 Apr 2015 23:11:31 +0000 Subject: [rancid] new rancid install not working In-Reply-To: <20150417224322.GG54669@shrubbery.net> References: <20150417224322.GG54669@shrubbery.net> Message-ID: Ok so I got that sorted out qa-scl009-005:/var/log/rancid# whoami rancid qa-scl009-005:/var/log/rancid# which clogin /usr/libexec/rancid/clogin qa-scl009-005:/var/log/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1 Gives me what I think should happen at least. It creates a file sjc-vpe1.new in the local dir I?m in. But when I run /usr/bin/rancid-run I just get what looks like an empty file qa-scl009-005:/var/rancid/routers/configs# cat sjc-core01.new !RANCID-CONTENT-TYPE: cisco ! ! ! ! ! ?jeff On 4/17/15, 3:43 PM, "heasley" wrote: >Fri, Apr 17, 2015 at 10:41:54PM +0000, Jeffrey d'Ambly: >> I cannot for the life of me figure out what I?m doing wrong here. >> >> When I run /usr/bin/rancid-run it seems like nothing happens. When I >>run rancid manually I get the following >> >> >> qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1 >> >> loadtype: device type cisco >> >> loadtype: found device type cisco in /etc/rancid/rancid.types.base >> >> executing clogin -t 90 -c"show version;show redundancy;show idprom >>backplane;show install active;show env all;show rsp chassis-info;show >>gsr chassis;show diag chassis-info;show boot;show bootvar;show variables >>boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir >>/all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all >>disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir >>/all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir >>/all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all >>slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all >>slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all >>sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all >>sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all >>sec-slot2:;dir /all sec-disk2:;show controllers;show controllers >>cbus;show diagbus;show diag;show capture;show module;show spe >>version;show c7200;show inventory raw;show vtp status;show vlan;show >>vlan-switch;show switch detail;show sdm prefer;show system mtu;show >>debug;show shun;more system:running-config;show running-config view >>full;show running-config;write term" sjc-vpe1 >> >> sh: clogin: command not found > >set your PATH correctly > >> sjc-vpe1: missed cmd(s): all commands >> >> sjc-vpe1: End of run not found >> >> sjc-vpe1: End of run not found >> >> But if I can clogin manually it works >> >> >> qa-scl009-005:/var/log/rancid# /usr/libexec/rancid/clogin -t 90 -c"show >>version" sjc-vpe1 >> >> sjc-vpe1 >> >> spawn ssh -c 3des -x -l confbackup sjc-vpe1 >> >> Password: >> >> sjc-vpe1# >> >> sjc-vpe1#terminal length 0 >> >> sjc-vpe1#terminal width 132 >> >> sjc-vpe1#show version >> >> Cisco IOS Software, C3900e Software (C3900e-UNIVERSALK9-M), Version >>15.2(4)M7, RELEASE SOFTWARE (fc2) >> >> Technical Support: http://www.cisco.com/techsupport >> >> Copyright (c) 1986-2014 by Cisco Systems, Inc. >> >> Compiled Thu 25-Sep-14 10:09 by prod_rel_team >> >> >> ROM: System Bootstrap, Version 15.1(1r)T5, RELEASE SOFTWARE (fc1) >> >> I have no idea what the hell I am doing wrong here, if someone could >>point me in the right direction here that would be awesome. >> >> ?Jeff > >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss > From alan.mckinnon at gmail.com Fri Apr 17 23:36:04 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Sat, 18 Apr 2015 01:36:04 +0200 Subject: [rancid] new rancid install not working In-Reply-To: References: <20150417224322.GG54669@shrubbery.net> Message-ID: <553198E4.4050101@gmail.com> On 18/04/2015 01:11, Jeffrey d'Ambly wrote: > Ok so I got that sorted out > qa-scl009-005:/var/log/rancid# whoami > rancid > qa-scl009-005:/var/log/rancid# which clogin > /usr/libexec/rancid/clogin > qa-scl009-005:/var/log/rancid# > > /usr/bin/rancid -d -t cisco sjc-vpe1 > Gives me what I think should happen at least. It creates a file > sjc-vpe1.new in the local dir I?m in. Examine that file closely, there is something about the results of clogin in there that the rancid script cannot deal with. Unfortunately there is no single cause for this, the error messages you have posted really just say "something went wrong". This isn't rancid's fault really, it's a consequence of trying to infer structured data from unstructured output from the router. Look first for the important stuff. Does the script announce that it found the prompt? Does it find an initial list of commands output correctly, then get confused and claim it cannot find any commands thereafter? Sometimes you have to look closely. A common problem is "#" and ">" characters in the router's shell prompt, (and once I had a Nexus that didn't end a "show admin something" with a proper EOL character. Took hours to find that :-) ) > > > But when I run /usr/bin/rancid-run I just get what looks like an empty file > > qa-scl009-005:/var/rancid/routers/configs# cat sjc-core01.new > !RANCID-CONTENT-TYPE: cisco > ! > ! > ! > ! > ! > > > > > ?jeff > > > > On 4/17/15, 3:43 PM, "heasley" wrote: > >> Fri, Apr 17, 2015 at 10:41:54PM +0000, Jeffrey d'Ambly: >>> I cannot for the life of me figure out what I?m doing wrong here. >>> >>> When I run /usr/bin/rancid-run it seems like nothing happens. When I >>> run rancid manually I get the following >>> >>> >>> qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1 >>> >>> loadtype: device type cisco >>> >>> loadtype: found device type cisco in /etc/rancid/rancid.types.base >>> >>> executing clogin -t 90 -c"show version;show redundancy;show idprom >>> backplane;show install active;show env all;show rsp chassis-info;show >>> gsr chassis;show diag chassis-info;show boot;show bootvar;show variables >>> boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir >>> /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all >>> disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir >>> /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir >>> /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all >>> slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all >>> slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all >>> sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all >>> sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all >>> sec-slot2:;dir /all sec-disk2:;show controllers;show controllers >>> cbus;show diagbus;show diag;show capture;show module;show spe >>> version;show c7200;show inventory raw;show vtp status;show vlan;show >>> vlan-switch;show switch detail;show sdm prefer;show system mtu;show >>> debug;show shun;more system:running-config;show running-config view >>> full;show running-config;write term" sjc-vpe1 >>> >>> sh: clogin: command not found >> >> set your PATH correctly >> >>> sjc-vpe1: missed cmd(s): all commands >>> >>> sjc-vpe1: End of run not found >>> >>> sjc-vpe1: End of run not found >>> >>> But if I can clogin manually it works >>> >>> >>> qa-scl009-005:/var/log/rancid# /usr/libexec/rancid/clogin -t 90 -c"show >>> version" sjc-vpe1 >>> >>> sjc-vpe1 >>> >>> spawn ssh -c 3des -x -l confbackup sjc-vpe1 >>> >>> Password: >>> >>> sjc-vpe1# >>> >>> sjc-vpe1#terminal length 0 >>> >>> sjc-vpe1#terminal width 132 >>> >>> sjc-vpe1#show version >>> >>> Cisco IOS Software, C3900e Software (C3900e-UNIVERSALK9-M), Version >>> 15.2(4)M7, RELEASE SOFTWARE (fc2) >>> >>> Technical Support: http://www.cisco.com/techsupport >>> >>> Copyright (c) 1986-2014 by Cisco Systems, Inc. >>> >>> Compiled Thu 25-Sep-14 10:09 by prod_rel_team >>> >>> >>> ROM: System Bootstrap, Version 15.1(1r)T5, RELEASE SOFTWARE (fc1) >>> >>> I have no idea what the hell I am doing wrong here, if someone could >>> point me in the right direction here that would be awesome. >>> >>> ?Jeff >> >>> _______________________________________________ >>> Rancid-discuss mailing list >>> Rancid-discuss at shrubbery.net >>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -- Alan McKinnon alan.mckinnon at gmail.com From jeffrey.dambly at jasper.com Fri Apr 17 23:41:49 2015 From: jeffrey.dambly at jasper.com (Jeffrey d'Ambly) Date: Fri, 17 Apr 2015 23:41:49 +0000 Subject: [rancid] new rancid install not working In-Reply-To: <553198E4.4050101@gmail.com> References: <20150417224322.GG54669@shrubbery.net> <553198E4.4050101@gmail.com> Message-ID: Here is my manual run, it looks like it worked right? Also is it expected for routers.down to look like this? [rancid at qa-scl009-005 routers]$ cat routers.down sjc-core01:cisco:up sjc-vpe1:cisco:up [rancid at qa-scl009-005 tmp]$ /usr/bin/rancid -d -t cisco sjc-vpe1 loadtype: device type cisco loadtype: found device type cisco in /etc/rancid/rancid.types.base executing clogin -t 90 -c"show version;show redundancy;show idprom backplane;show install active;show env all;show rsp chassis-info;show gsr chassis;show diag chassis-info;show boot;show bootvar;show variables boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all sec-disk2:;show controllers;show controllers cbus;show diagbus;show diag;show capture;show module;show spe version;show c7200;show inventory raw;show vtp status;show vlan;show vlan-switch;show switch detail;show sdm prefer;show system mtu;show debug;show shun;more system:running-config;show running-config view full;show running-config;write term" sjc-vpe1 PROMPT MATCH: sjc-vpe1# HIT COMMAND:sjc-vpe1#show version In ShowVersion: sjc-vpe1#show version TYPE = CISCO3925-CHASSIS HIT COMMAND:sjc-vpe1#show redundancy In ShowRedundancy: sjc-vpe1#show redundancy HIT COMMAND:sjc-vpe1#show idprom backplane In ShowIDprom: sjc-vpe1#show idprom backplane HIT COMMAND:sjc-vpe1#show install active In ShowInstallActive: sjc-vpe1#show install active HIT COMMAND:sjc-vpe1#show env all In ShowEnv: sjc-vpe1#show env all HIT COMMAND:sjc-vpe1#show rsp chassis-info In ShowRSP: sjc-vpe1#show rsp chassis-info HIT COMMAND:sjc-vpe1#show gsr chassis In ShowGSR: sjc-vpe1#show gsr chassis HIT COMMAND:sjc-vpe1#show diag chassis-info In ShowGSR: sjc-vpe1#show diag chassis-info HIT COMMAND:sjc-vpe1#show boot In ShowBoot: sjc-vpe1#show boot HIT COMMAND:sjc-vpe1#show bootvar In ShowBoot: sjc-vpe1#show bootvar HIT COMMAND:sjc-vpe1#show variables boot In ShowBoot: sjc-vpe1#show variables boot HIT COMMAND:sjc-vpe1#show flash In ShowFlash: sjc-vpe1#show flash HIT COMMAND:sjc-vpe1#dir /all nvram: In DirSlotN: sjc-vpe1#dir /all nvram: HIT COMMAND:sjc-vpe1#dir /all bootflash: In DirSlotN: sjc-vpe1#dir /all bootflash: HIT COMMAND:sjc-vpe1#dir /all slot0: In DirSlotN: sjc-vpe1#dir /all slot0: HIT COMMAND:sjc-vpe1#dir /all disk0: In DirSlotN: sjc-vpe1#dir /all disk0: HIT COMMAND:sjc-vpe1#dir /all slot1: In DirSlotN: sjc-vpe1#dir /all slot1: HIT COMMAND:sjc-vpe1#dir /all disk1: In DirSlotN: sjc-vpe1#dir /all disk1: HIT COMMAND:sjc-vpe1#dir /all slot2: In DirSlotN: sjc-vpe1#dir /all slot2: HIT COMMAND:sjc-vpe1#dir /all disk2: In DirSlotN: sjc-vpe1#dir /all disk2: HIT COMMAND:sjc-vpe1#dir /all harddisk: In DirSlotN: sjc-vpe1#dir /all harddisk: HIT COMMAND:sjc-vpe1#dir /all harddiska: In DirSlotN: sjc-vpe1#dir /all harddiska: HIT COMMAND:sjc-vpe1#dir /all harddiskb: In DirSlotN: sjc-vpe1#dir /all harddiskb: HIT COMMAND:sjc-vpe1#dir /all sup-bootdisk: In DirSlotN: sjc-vpe1#dir /all sup-bootdisk: HIT COMMAND:sjc-vpe1#dir /all sup-bootflash: In DirSlotN: sjc-vpe1#dir /all sup-bootflash: HIT COMMAND:sjc-vpe1#dir /all sup-microcode: In DirSlotN: sjc-vpe1#dir /all sup-microcode: HIT COMMAND:sjc-vpe1#dir /all slavenvram: In DirSlotN: sjc-vpe1#dir /all slavenvram: HIT COMMAND:sjc-vpe1#dir /all slavebootflash: In DirSlotN: sjc-vpe1#dir /all slavebootflash: HIT COMMAND:sjc-vpe1#dir /all slaveslot0: In DirSlotN: sjc-vpe1#dir /all slaveslot0: HIT COMMAND:sjc-vpe1#dir /all slavedisk0: In DirSlotN: sjc-vpe1#dir /all slavedisk0: HIT COMMAND:sjc-vpe1#dir /all slaveslot1: In DirSlotN: sjc-vpe1#dir /all slaveslot1: HIT COMMAND:sjc-vpe1#dir /all slavedisk1: In DirSlotN: sjc-vpe1#dir /all slavedisk1: HIT COMMAND:sjc-vpe1#dir /all slaveslot2: In DirSlotN: sjc-vpe1#dir /all slaveslot2: HIT COMMAND:sjc-vpe1#dir /all slavedisk2: In DirSlotN: sjc-vpe1#dir /all slavedisk2: HIT COMMAND:sjc-vpe1#dir /all slavesup-bootflash: In DirSlotN: sjc-vpe1#dir /all slavesup-bootflash: HIT COMMAND:sjc-vpe1#dir /all sec-nvram: In DirSlotN: sjc-vpe1#dir /all sec-nvram: HIT COMMAND:sjc-vpe1#dir /all sec-bootflash: In DirSlotN: sjc-vpe1#dir /all sec-bootflash: HIT COMMAND:sjc-vpe1#dir /all sec-slot0: In DirSlotN: sjc-vpe1#dir /all sec-slot0: HIT COMMAND:sjc-vpe1#dir /all sec-disk0: In DirSlotN: sjc-vpe1#dir /all sec-disk0: HIT COMMAND:sjc-vpe1#dir /all sec-slot1: In DirSlotN: sjc-vpe1#dir /all sec-slot1: HIT COMMAND:sjc-vpe1#dir /all sec-disk1: In DirSlotN: sjc-vpe1#dir /all sec-disk1: HIT COMMAND:sjc-vpe1#dir /all sec-slot2: In DirSlotN: sjc-vpe1#dir /all sec-slot2: HIT COMMAND:sjc-vpe1#dir /all sec-disk2: In DirSlotN: sjc-vpe1#dir /all sec-disk2: HIT COMMAND:sjc-vpe1#show controllers In ShowContAll: sjc-vpe1#show controllers HIT COMMAND:sjc-vpe1#show controllers cbus In ShowContCbus: sjc-vpe1#show controllers cbus HIT COMMAND:sjc-vpe1#show diagbus In ShowDiagbus: sjc-vpe1#show diagbus HIT COMMAND:sjc-vpe1#show diag In ShowDiag: sjc-vpe1#show diag HIT COMMAND:sjc-vpe1#show capture In ShowCapture: sjc-vpe1#show capture HIT COMMAND:sjc-vpe1#show module In ShowModule: sjc-vpe1#show module HIT COMMAND:sjc-vpe1#show spe version In ShowSpeVersion: sjc-vpe1#show spe version HIT COMMAND:sjc-vpe1#show c7200 In ShowC7200: sjc-vpe1#show c7200 HIT COMMAND:sjc-vpe1#show inventory raw In ShowInventory: sjc-vpe1#show inventory raw HIT COMMAND:sjc-vpe1#show vtp status In ShowVTP: sjc-vpe1#show vtp status HIT COMMAND:sjc-vpe1#show vlan In ShowVLAN: sjc-vpe1#show vlan HIT COMMAND:sjc-vpe1#show vlan-switch In ShowVLAN: sjc-vpe1#show vlan-switch HIT COMMAND:sjc-vpe1#show switch detail In ShowDetail: sjc-vpe1#show switch detail HIT COMMAND:sjc-vpe1#show sdm prefer In ShowSDM: sjc-vpe1#show sdm prefer HIT COMMAND:sjc-vpe1#show system mtu In ShowMTU: sjc-vpe1#show system mtu HIT COMMAND:sjc-vpe1#show debug In ShowDebug: sjc-vpe1#show debug HIT COMMAND:sjc-vpe1#show shun In ShowShun: sjc-vpe1#show shun HIT COMMAND:sjc-vpe1#more system:running-config In WriteTerm: sjc-vpe1#more system:running-config HIT COMMAND:sjc-vpe1#show running-config view full In WriteTerm: sjc-vpe1#show running-config view full HIT COMMAND:sjc-vpe1#show running-config In WriteTerm: sjc-vpe1#show running-config HIT COMMAND:sjc-vpe1#write term In WriteTerm: sjc-vpe1#write term On 4/17/15, 4:36 PM, "Alan McKinnon" wrote: >On 18/04/2015 01:11, Jeffrey d'Ambly wrote: >> Ok so I got that sorted out >> qa-scl009-005:/var/log/rancid# whoami >> rancid >> qa-scl009-005:/var/log/rancid# which clogin >> /usr/libexec/rancid/clogin >> qa-scl009-005:/var/log/rancid# >> >> /usr/bin/rancid -d -t cisco sjc-vpe1 >> Gives me what I think should happen at least. It creates a file >> sjc-vpe1.new in the local dir I?m in. > > >Examine that file closely, there is something about the results of >clogin in there that the rancid script cannot deal with. > >Unfortunately there is no single cause for this, the error messages you >have posted really just say "something went wrong". This isn't rancid's >fault really, it's a consequence of trying to infer structured data from >unstructured output from the router. > >Look first for the important stuff. Does the script announce that it >found the prompt? Does it find an initial list of commands output >correctly, then get confused and claim it cannot find any commands >thereafter? > >Sometimes you have to look closely. A common problem is "#" and ">" >characters in the router's shell prompt, (and once I had a Nexus that >didn't end a "show admin something" with a proper EOL character. Took >hours to find that :-) ) > > > > >> >> >> But when I run /usr/bin/rancid-run I just get what looks like an empty >>file >> >> qa-scl009-005:/var/rancid/routers/configs# cat sjc-core01.new >> !RANCID-CONTENT-TYPE: cisco >> ! >> ! >> ! >> ! >> ! >> >> >> >> >> ?jeff >> >> >> >> On 4/17/15, 3:43 PM, "heasley" wrote: >> >>> Fri, Apr 17, 2015 at 10:41:54PM +0000, Jeffrey d'Ambly: >>>> I cannot for the life of me figure out what I?m doing wrong here. >>>> >>>> When I run /usr/bin/rancid-run it seems like nothing happens. When I >>>> run rancid manually I get the following >>>> >>>> >>>> qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1 >>>> >>>> loadtype: device type cisco >>>> >>>> loadtype: found device type cisco in /etc/rancid/rancid.types.base >>>> >>>> executing clogin -t 90 -c"show version;show redundancy;show idprom >>>> backplane;show install active;show env all;show rsp chassis-info;show >>>> gsr chassis;show diag chassis-info;show boot;show bootvar;show >>>>variables >>>> boot;show flash;dir /all nvram:;dir /all bootflash:;dir /all >>>>slot0:;dir >>>> /all disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all >>>> disk2:;dir /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir >>>> /all sup-bootdisk:;dir /all sup-bootflash:;dir /all sup-microcode:;dir >>>> /all slavenvram:;dir /all slavebootflash:;dir /all slaveslot0:;dir >>>>/all >>>> slavedisk0:;dir /all slaveslot1:;dir /all slavedisk1:;dir /all >>>> slaveslot2:;dir /all slavedisk2:;dir /all slavesup-bootflash:;dir /all >>>> sec-nvram:;dir /all sec-bootflash:;dir /all sec-slot0:;dir /all >>>> sec-disk0:;dir /all sec-slot1:;dir /all sec-disk1:;dir /all >>>> sec-slot2:;dir /all sec-disk2:;show controllers;show controllers >>>> cbus;show diagbus;show diag;show capture;show module;show spe >>>> version;show c7200;show inventory raw;show vtp status;show vlan;show >>>> vlan-switch;show switch detail;show sdm prefer;show system mtu;show >>>> debug;show shun;more system:running-config;show running-config view >>>> full;show running-config;write term" sjc-vpe1 >>>> >>>> sh: clogin: command not found >>> >>> set your PATH correctly >>> >>>> sjc-vpe1: missed cmd(s): all commands >>>> >>>> sjc-vpe1: End of run not found >>>> >>>> sjc-vpe1: End of run not found >>>> >>>> But if I can clogin manually it works >>>> >>>> >>>> qa-scl009-005:/var/log/rancid# /usr/libexec/rancid/clogin -t 90 >>>>-c"show >>>> version" sjc-vpe1 >>>> >>>> sjc-vpe1 >>>> >>>> spawn ssh -c 3des -x -l confbackup sjc-vpe1 >>>> >>>> Password: >>>> >>>> sjc-vpe1# >>>> >>>> sjc-vpe1#terminal length 0 >>>> >>>> sjc-vpe1#terminal width 132 >>>> >>>> sjc-vpe1#show version >>>> >>>> Cisco IOS Software, C3900e Software (C3900e-UNIVERSALK9-M), Version >>>> 15.2(4)M7, RELEASE SOFTWARE (fc2) >>>> >>>> Technical Support: http://www.cisco.com/techsupport >>>> >>>> Copyright (c) 1986-2014 by Cisco Systems, Inc. >>>> >>>> Compiled Thu 25-Sep-14 10:09 by prod_rel_team >>>> >>>> >>>> ROM: System Bootstrap, Version 15.1(1r)T5, RELEASE SOFTWARE (fc1) >>>> >>>> I have no idea what the hell I am doing wrong here, if someone could >>>> point me in the right direction here that would be awesome. >>>> >>>> ?Jeff >>> >>>> _______________________________________________ >>>> Rancid-discuss mailing list >>>> Rancid-discuss at shrubbery.net >>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>> >> >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> > > >-- >Alan McKinnon >alan.mckinnon at gmail.com > >_______________________________________________ >Rancid-discuss mailing list >Rancid-discuss at shrubbery.net >http://www.shrubbery.net/mailman/listinfo/rancid-discuss From jeffrey.dambly at jasper.com Fri Apr 17 23:49:53 2015 From: jeffrey.dambly at jasper.com (Jeffrey d'Ambly) Date: Fri, 17 Apr 2015 23:49:53 +0000 Subject: [rancid] FW: new rancid install not working In-Reply-To: <20150417234503.GI54669@shrubbery.net> References: <20150417224322.GG54669@shrubbery.net> <553198E4.4050101@gmail.com> <20150417234503.GI54669@shrubbery.net> Message-ID: Thanks that did it! ?jeff On 4/17/15, 4:45 PM, "heasley" wrote: >Fri, Apr 17, 2015 at 11:41:49PM +0000, Jeffrey d'Ambly: >> Here is my manual run, it looks like it worked right? >> Also is it expected for routers.down to look like this? >> >> [rancid at qa-scl009-005 routers]$ cat routers.down >> sjc-core01:cisco:up >> sjc-vpe1:cisco:up > >if youre using 3.x, the FS is ;. From brian.cuttler at health.ny.gov Fri Apr 17 18:08:42 2015 From: brian.cuttler at health.ny.gov (Cuttler, Brian (HEALTH)) Date: Fri, 17 Apr 2015 18:08:42 +0000 Subject: [rancid] rancid failing login to cisco switches Message-ID: I'm replacing the HUP switches with Cisco and I've found that only switches that have established local user accounts (seems against new policy) are succeeding at login, were as my TACACS login is failing. I have added the "add user" and "add password" entries for each switch to the .cloginrc file, but I think its ignoring those lines in favor of the "add user * joe" record in the .cloginrc file. Now quite sure what I'm seeing and don't see sufficient detail in the racid-run log files to verify my suspicion, or work around it. Open to suggestions, that in advance. Not sure what version of rancid I'm running, the clogin binary is in the 2.3.8 tree, I'm running on Ubuntu 14.04 LTS. Thanks in advance, Brian From alan.mckinnon at gmail.com Sat Apr 18 11:52:52 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Sat, 18 Apr 2015 13:52:52 +0200 Subject: [rancid] rancid failing login to cisco switches In-Reply-To: References: Message-ID: <55324594.9000806@gmail.com> On 17/04/2015 20:08, Cuttler, Brian (HEALTH) wrote: > I'm replacing the HUP switches with Cisco and I've found that only switches that have established local user accounts (seems against new policy) are succeeding at login, were as my TACACS login is failing. > > I have added the "add user" and "add password" entries for each switch to the .cloginrc file, but I think its ignoring those lines in favor of the > "add user * joe" record in the .cloginrc file. > > Now quite sure what I'm seeing and don't see sufficient detail in the racid-run log files to verify my suspicion, or work around it. > > Open to suggestions, that in advance. > > Not sure what version of rancid I'm running, the clogin binary is in the 2.3.8 tree, I'm running on Ubuntu 14.04 LTS. .cloginrc is read strictly in order so if you have "add user * joe" at the very top, it will be used everywhere. Check the ordering of .loginrc as step one. Step 2 is to run clogin manually and check the output -- Alan McKinnon alan.mckinnon at gmail.com From heas at shrubbery.net Sat Apr 18 14:40:06 2015 From: heas at shrubbery.net (heasley) Date: Sat, 18 Apr 2015 14:40:06 +0000 Subject: [rancid] cloginrc order Message-ID: <20150418144006.GB74378@shrubbery.net> Sat, Apr 18, 2015 at 01:52:52PM +0200, Alan McKinnon: > .cloginrc is read strictly in order so if you have "add user * joe" at > the very top, it will be used everywhere. > > Check the ordering of .loginrc as step one. > > Step 2 is to run clogin manually and check the output Would it be useful if clogin et al with an option printed the cloginrc line that matched? From alligator94 at laposte.net Sun Apr 19 07:35:30 2015 From: alligator94 at laposte.net (alligator94) Date: Sun, 19 Apr 2015 09:35:30 +0200 Subject: [rancid] rancid : how to filter clogin -x or -c outcome Message-ID: <000501d07a73$6a8fefb0$3fafcf10$@laposte.net> Hi, I very often use clogin -x or clogin -c to perform mass configuration updates. My concern is that clogin doesn't analyze the outcome of the command passed with -x or -d, so there is no easy way to know if the command has been successfully accepted by the device . For instance, some old cisco ios don't accept some commands. I have tried to use the clogin debug (-d) option, but it generates a huge amount of lines. I have also tested to open a log file (I am using teraterm) before running clogin, then to do a search but, it is not really easy because each time that you find an error condition, you need to look backward in the file to know which host the error message reports to. I have also looked at the -s option but it looks complex to me. What would be nice to have is a way to pass a file to clogin as a parameter which would contain a list of keyword that you want to be extracted from the outcome. I am thinking to some words like : "Invalid" "Error" "timeout" If some of them are trapped during the clogin run, then they could be stored in a file $hostname_date_time.err.log Maybe there is an easy way to do it but I am not skilled with expect. Any help or comment is welcomed. Thanks Regards, Gilles -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckinnon at gmail.com Sun Apr 19 08:16:05 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Sun, 19 Apr 2015 10:16:05 +0200 Subject: [rancid] cloginrc order In-Reply-To: <20150418144006.GB74378@shrubbery.net> References: <20150418144006.GB74378@shrubbery.net> Message-ID: <55336445.3000001@gmail.com> On 18/04/2015 16:40, heasley wrote: > Sat, Apr 18, 2015 at 01:52:52PM +0200, Alan McKinnon: >> .cloginrc is read strictly in order so if you have "add user * joe" at >> the very top, it will be used everywhere. >> >> Check the ordering of .loginrc as step one. >> >> Step 2 is to run clogin manually and check the output > > Would it be useful if clogin et al with an option printed the cloginrc line > that matched? I think that would be very useful indeed. I've had to rationalize very large .cloginrc files in the past, it wasn't fun when I got the order wrong :-) -- Alan McKinnon alan.mckinnon at gmail.com From howie at thingy.com Mon Apr 20 09:21:07 2015 From: howie at thingy.com (Howard Jones) Date: Mon, 20 Apr 2015 10:21:07 +0100 Subject: [rancid] cloginrc order In-Reply-To: <55336445.3000001@gmail.com> References: <20150418144006.GB74378@shrubbery.net> <55336445.3000001@gmail.com> Message-ID: <5534C503.5070909@thingy.com> On 19/04/2015 09:16, Alan McKinnon wrote: > I think that would be very useful indeed. I've had to rationalize very > large .cloginrc files in the past, it wasn't fun when I got the order > wrong :-) Also something to list all the possible hits (not just the one used) for a given device would be handy, so you can see where something is unintentionally masking your (for example) ACS credentials at the bottom of the last included file. Howie From heas at shrubbery.net Mon Apr 20 16:12:54 2015 From: heas at shrubbery.net (heasley) Date: Mon, 20 Apr 2015 16:12:54 +0000 Subject: [rancid] rancid : how to filter clogin -x or -c outcome In-Reply-To: <000501d07a73$6a8fefb0$3fafcf10$@laposte.net> References: <000501d07a73$6a8fefb0$3fafcf10$@laposte.net> Message-ID: <20150420161254.GS88638@shrubbery.net> Sun, Apr 19, 2015 at 09:35:30AM +0200, alligator94: > Hi, > > > > I very often use clogin -x or clogin -c to perform mass configuration > updates. My concern is that clogin doesn't analyze the outcome of the > command passed with -x or -d, so there is no easy way to know if the command > has been successfully accepted by the device . For instance, some old cisco > ios don't accept some commands. > > I have tried to use the clogin debug (-d) option, but it generates a huge > amount of lines. I have also tested to open a log file (I am using teraterm) > before running clogin, then to do a search but, it is not really easy > because each time that you find an error condition, you need to look > backward in the file to know which host the error message reports to. Would par(1) help? > I have also looked at the -s option but it looks complex to me. > > > > What would be nice to have is a way to pass a file to clogin as a parameter > which would contain a list of keyword that you want to be extracted from the > outcome. > > I am thinking to some words like : > > "Invalid" > > "Error" > > "timeout" extracted from the rest of the o/p in what manner? > If some of them are trapped during the clogin run, then they could be stored > in a file $hostname_date_time.err.log I think par(1) would indeed help you here. you could egrep the stuff you want to extract (or awk, etc). > > > Maybe there is an easy way to do it but I am not skilled with expect. > > Any help or comment is welcomed. > > > > Thanks > > Regards, > > Gilles > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From howie at thingy.com Mon Apr 20 16:31:52 2015 From: howie at thingy.com (Howard Jones) Date: Mon, 20 Apr 2015 17:31:52 +0100 Subject: [rancid] ExtremeXOS 12.6 vs RANCID 3.1 - login out of step? Message-ID: <553529F8.9050105@thingy.com> We have some Extreme X480 switches running XOS 12.6 which RANCID seems to dislike. The basic symptom is that clogin enters a username, then does then enters the password at the next username prompt. I've tried fiddling with the passprompt setting, to make it exactly as seen in the output from the switch, but as far as I can see the default should have worked anyway. This appears to be the same issue, but without any particular resolution: http://www.shrubbery.net/pipermail/rancid-discuss/2011-September/005869.html Does anyone have Summit X480s working in RANCID? Thanks, Howie (looking forward to suffering from the various other problems folks seem to have once the login has actually worked! The couple of ours with SSH (and therefore no login script) seem to come and go from polling) From brian.cuttler at health.ny.gov Mon Apr 20 20:36:07 2015 From: brian.cuttler at health.ny.gov (Cuttler, Brian (HEALTH)) Date: Mon, 20 Apr 2015 20:36:07 +0000 Subject: [rancid] rancid failing login to cisco switches In-Reply-To: <55324594.9000806@gmail.com> References: <55324594.9000806@gmail.com> Message-ID: Thank you. It was a couple of things, the add user *, and the add password *. Also, since we had (mandated to) a change of switch names and IP numbers, I copied the new switch names out of the scripts that updated the switches and they were all in uppercase, and where not found by the clogin script when it scanned the .cloginrc file. Those problems have all been corrected. I did try to add a new group, unsuccessfully. I added the new group to the /etc/rancid/rancid.conf file, created a new directory, a new router.db, but I'm not finding the information via CVSWEB nor do I have CVS archives of the data. CVS home is /home/rancid/CVS, where I do see directories for my groups. I also see CVS directories in each group directory as well as the configs/CVS directories. These are not links (well, not softlinks). I'm missing something basic here, but not quite certain what. Thank you, Brian -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Alan McKinnon Sent: Saturday, April 18, 2015 7:53 AM To: rancid-discuss at shrubbery.net Subject: Re: [rancid] rancid failing login to cisco switches On 17/04/2015 20:08, Cuttler, Brian (HEALTH) wrote: > I'm replacing the HUP switches with Cisco and I've found that only switches that have established local user accounts (seems against new policy) are succeeding at login, were as my TACACS login is failing. > > I have added the "add user" and "add password" entries for each switch > to the .cloginrc file, but I think its ignoring those lines in favor of the "add user * joe" record in the .cloginrc file. > > Now quite sure what I'm seeing and don't see sufficient detail in the racid-run log files to verify my suspicion, or work around it. > > Open to suggestions, that in advance. > > Not sure what version of rancid I'm running, the clogin binary is in the 2.3.8 tree, I'm running on Ubuntu 14.04 LTS. .cloginrc is read strictly in order so if you have "add user * joe" at the very top, it will be used everywhere. Check the ordering of .loginrc as step one. Step 2 is to run clogin manually and check the output -- Alan McKinnon alan.mckinnon at gmail.com _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss From heas at shrubbery.net Mon Apr 20 21:07:53 2015 From: heas at shrubbery.net (heasley) Date: Mon, 20 Apr 2015 21:07:53 +0000 Subject: [rancid] rancid failing login to cisco switches In-Reply-To: References: <55324594.9000806@gmail.com> Message-ID: <20150420210753.GD95953@shrubbery.net> Mon, Apr 20, 2015 at 08:36:07PM +0000, Cuttler, Brian (HEALTH): > Thank you. > > It was a couple of things, the add user *, and the add password *. > > Also, since we had (mandated to) a change of switch names and IP numbers, I copied the new switch names out of the scripts that updated the switches and they were all in uppercase, and where not found by the clogin script when it scanned the .cloginrc file. the match is case-insensitive in v 3.2. > I did try to add a new group, unsuccessfully. > > I added the new group to the /etc/rancid/rancid.conf file, created a new directory, a new router.db, but I'm not finding the information via CVSWEB nor do I have CVS archives of the data. you must use rancid-cvs to create the dir. From workwithcisco at yahoo.com Tue Apr 21 00:29:57 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Tue, 21 Apr 2015 00:29:57 +0000 (UTC) Subject: [rancid] Rancid user home Message-ID: <633479676.992471.1429576197488.JavaMail.yahoo@mail.yahoo.com> Been going nuts trying to figure this out, Google has been useless. When I created the user rancid, it set the $HOME as /home/rancid, and no matter what I try it never sticks to /usr/local/rancid. ?I can change the variable and make it work, but on reboot it goes back to /home/rancid and breaks rancid-run and RWS.? I need it to permanently change it to /usr/local/rancid. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Wiethoff at tfh-bochum.de Tue Apr 21 11:06:23 2015 From: Wiethoff at tfh-bochum.de (Wiethoff, Helge) Date: Tue, 21 Apr 2015 11:06:23 +0000 Subject: [rancid] Update from 2.3.8 to 3.2 all routers went to routers.down Message-ID: <194290040642FB4D952083D79F7F7D1D40D53EBC@BOHEMSX2010.rbbk.de> Hello everyone! I hope this is not a common issue and was already discussed a thousand times. After updating from 2.3.8 to 3.2 all my routers are marked as down. Unfortunately I don't have the log files anymore when this happened. I double checked spelling issues in my router.db. I checked the control_rancid script because I didn't get a mail from the system when the routers went to down state: X-AS01:/srv/rancid/logs # cat TFH.20150421.114636 starting: Tue Apr 21 11:46:36 CEST 2015 /usr/lib64/rancid/bin/control_rancid: line 363: -t: command not found Don't know if this is an issue?! When I tested the part (line 281) in control_rancid where the list of all, up, & down routers is generated, I figured out - in my newbie-eyes - a strange behaviour. I created a test router.db named tests: X-AS01:/srv/rancid/TFH # cat tests foo:hp:down bar:hp:up X-AS01:/srv/rancid/TFH # perl -F\; -ane '{$F[2] =~ s/\s*\$//; ($F[0] =~ tr at A-Z@a-z@, print $_) if ($F[2] !~ /^up$/i);}' tests foo:hp:down bar:hp:up shoudn't this give me just the line without "up"? and: X-AS01:/srv/rancid/TFH # perl -F\; -ane '{$F[2] =~ s/\s*\$//; ($F[0] =~ tr at A-Z@a-z@, print "$F[0];$F[1]\n") if ($F[2] =~ /^up$/i);}' tests X-AS01:/srv/rancid/TFH # I guess I misunderstood something... :-( Thanks for all support, Helge ________________________________ Helge Wiethoff Medienzentrum Telefon: +49 (234) 968 8717 Fax: +49 (234) 968 3453 E-Mail: Wiethoff at tfh-bochum.de Technische Fachhochschule Georg Agricola f?r Rohstoff, Energie und Umwelt zu Bochum Staatlich anerkannte Fachhochschule der DMT-Gesellschaft f?r Lehre und Bildung mbH Herner Stra?e 45 44787 Bochum http://www.tfh-bochum.de ________________________________ Tr?ger: DMT-Gesellschaft f?r Lehre und Bildung mbH Sitz der Gesellschaft: Bochum Registergericht: Amtsgericht Bochum Handelsregister: B 4052 Gesch?ftsf?hrung: Prof. Dr. J?rgen Kretschmann (Vorsitzender) Manfred Freitag From tony at lavanauts.org Tue Apr 21 11:16:18 2015 From: tony at lavanauts.org (Antonio Querubin) Date: Tue, 21 Apr 2015 01:16:18 -1000 (HST) Subject: [rancid] Update from 2.3.8 to 3.2 all routers went to routers.down In-Reply-To: <194290040642FB4D952083D79F7F7D1D40D53EBC@BOHEMSX2010.rbbk.de> References: <194290040642FB4D952083D79F7F7D1D40D53EBC@BOHEMSX2010.rbbk.de> Message-ID: On Tue, 21 Apr 2015, Wiethoff, Helge wrote: > I hope this is not a common issue and was already discussed a thousand > times. After updating from 2.3.8 to 3.2 all my routers are marked as > down. Unfortunately I don't have the log files anymore when this > happened. Make sure you change the field separators in your router.db from : to ; This change was to accomodate IPv6 addresses in router.db. Antonio Querubin e-mail: tony at lavanauts.org xmpp: antonioquerubin at gmail.com From Wiethoff at tfh-bochum.de Tue Apr 21 11:27:36 2015 From: Wiethoff at tfh-bochum.de (Wiethoff, Helge) Date: Tue, 21 Apr 2015 11:27:36 +0000 Subject: [rancid] Update from 2.3.8 to 3.2 all routers went to routers.down In-Reply-To: References: <194290040642FB4D952083D79F7F7D1D40D53EBC@BOHEMSX2010.rbbk.de> Message-ID: <194290040642FB4D952083D79F7F7D1D40D53EE0@BOHEMSX2010.rbbk.de> D'oh! Thanks... > -----Original Message----- > From: Antonio Querubin [mailto:tony at lavanauts.org] > Sent: Tuesday, April 21, 2015 1:16 PM > To: Wiethoff, Helge > Cc: rancid-discuss at shrubbery.net > Subject: Re: [rancid] Update from 2.3.8 to 3.2 all routers went to > routers.down > > On Tue, 21 Apr 2015, Wiethoff, Helge wrote: > > > I hope this is not a common issue and was already discussed a thousand > > times. After updating from 2.3.8 to 3.2 all my routers are marked as > > down. Unfortunately I don't have the log files anymore when this > > happened. > > Make sure you change the field separators in your router.db from : to ; > > This change was to accomodate IPv6 addresses in router.db. > > Antonio Querubin > e-mail: tony at lavanauts.org > xmpp: antonioquerubin at gmail.com ________________________________ Helge Wiethoff Medienzentrum Telefon: +49 (234) 968 8717 Fax: +49 (234) 968 3453 E-Mail: Wiethoff at tfh-bochum.de Technische Fachhochschule Georg Agricola f?r Rohstoff, Energie und Umwelt zu Bochum Staatlich anerkannte Fachhochschule der DMT-Gesellschaft f?r Lehre und Bildung mbH Herner Stra?e 45 44787 Bochum http://www.tfh-bochum.de ________________________________ Tr?ger: DMT-Gesellschaft f?r Lehre und Bildung mbH Sitz der Gesellschaft: Bochum Registergericht: Amtsgericht Bochum Handelsregister: B 4052 Gesch?ftsf?hrung: Prof. Dr. J?rgen Kretschmann (Vorsitzender) Manfred Freitag From dan.w.anderson at gmail.com Tue Apr 21 12:54:08 2015 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Tue, 21 Apr 2015 08:54:08 -0400 Subject: [rancid] Rancid user home In-Reply-To: <633479676.992471.1429576197488.JavaMail.yahoo@mail.yahoo.com> References: <633479676.992471.1429576197488.JavaMail.yahoo@mail.yahoo.com> Message-ID: You need to use the "usermod" command (as root) to change the user's home directory (I'm assuming you're running on some flavor of Linux) usermod -d /usr/local/rancid rancid On Mon, Apr 20, 2015 at 8:29 PM, Todd Heide wrote: > Been going nuts trying to figure this out, Google has been useless. When I > created the user rancid, it set the $HOME as /home/rancid, and no matter > what I try it never sticks to /usr/local/rancid. I can change the variable > and make it work, but on reboot it goes back to /home/rancid and breaks > rancid-run and RWS. > > > I need it to permanently change it to /usr/local/rancid. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -- Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Davis at prin.edu Tue Apr 21 21:59:26 2015 From: Chris.Davis at prin.edu (Chris Davis) Date: Tue, 21 Apr 2015 21:59:26 +0000 Subject: [rancid] Fortinet Fortigate problem. Message-ID: A few weeks ago I posted the following. A couple of very helpful folks pointed me at the fnlogin script and why it might be failing. I had just upgraded one of my Fortinet firewall clusters to 5.0.9 firmware and when I upgraded the other cluster, I had the same problem. One of the answers was to disable the strong encryption on the firewall. Not my favorite thing to do... So, I had a look at the fnlogin code. Now, I'm no expect programmer, but it was straight enough to follow. I found that the cypher was set to 3des. I spoke with a Fortinet engineer that I was working with on another issue, and he indeed confirmed that 3des-cbc was not supported in strong encryption mode moving forward. He said I should choose something else. This afternoon I tinkered with swapping aes256-ctr where it had said 3des before, and turned back on strong encryption on the clusters. And amazingly, it worked! I'll know for sure when my hourly rancid runs kick off, but I have a small job running every fifteen minutes grabbing some data for the other problem I was working on, and it has successfully grabbed 2 iterations of data for that project. So, how hard is it to jump from 2.3.8 to 3.2? (since I'm feeling flush with success) I will remember the router file change from : to ; for separators. Any other gotchas? On 30/03/2015 19:03, Chris Davis wrote: > I?ve been using Rancid 2.3.8 for some time now without any problems. > (once I got all the patches installed for it) > > > > This past week, we upgraded a unit from 5.0.7 firmware to 5.0.9. This > had the negative effect of making it impossible for Rancid to log into > the unit. I have checked all the normal things. I deleted and > recreated the ssh Known_hosts entry. I?ve even manually logged in > from the Rancid server using my own credentials and the rancid > credentials and not had any problems. From scott.granados at gmail.com Wed Apr 22 18:34:12 2015 From: scott.granados at gmail.com (Scott Granados) Date: Wed, 22 Apr 2015 14:34:12 -0400 Subject: [rancid] Backing up F5 BigIP LTM with rancid? Message-ID: <87F3481B-B0A4-4306-99D0-95C9F29F482C@gmail.com> Hi, I recently have installed some F5 BigIPS in my network and wish to back these up with RANCID like I do my other network elements. I have tried to play with the included files but these seem out of date. (I?m running 11.60.0 firmware) While googling I found some mention of using TMSH instead of the older BigPipe command but the patch I found to f5rancid.in didn?t apply cleanly and seem to fail. Has anyone else got this configuration working and having success dealing with F5 devices using rancid? If so could you post some details on how you accomplished this or a pointer to a current f5rancid and f5login that works? Any help would be most appreciated. Thanks Scott From workwithcisco at yahoo.com Wed Apr 22 20:46:24 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Wed, 22 Apr 2015 20:46:24 +0000 (UTC) Subject: [rancid] ACE Appliance Message-ID: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> Does Rancid back up ACE and WLC? From brian.cuttler at health.ny.gov Wed Apr 22 20:54:33 2015 From: brian.cuttler at health.ny.gov (Cuttler, Brian (HEALTH)) Date: Wed, 22 Apr 2015 20:54:33 +0000 Subject: [rancid] rancid failing login to cisco switches In-Reply-To: <20150420210753.GD95953@shrubbery.net> References: <55324594.9000806@gmail.com> <20150420210753.GD95953@shrubbery.net> Message-ID: I had found that in the info, but had created the directories first and then tried to run it. I destroyed the directory for the new group, ran $ rancid-cvs and all is fine now. Thank you again! Brian -----Original Message----- From: heasley [mailto:heas at shrubbery.net] Sent: Monday, April 20, 2015 5:08 PM To: Cuttler, Brian (HEALTH) Cc: Alan McKinnon; rancid-discuss at shrubbery.net Subject: Re: [rancid] rancid failing login to cisco switches Mon, Apr 20, 2015 at 08:36:07PM +0000, Cuttler, Brian (HEALTH): > Thank you. > > It was a couple of things, the add user *, and the add password *. > > Also, since we had (mandated to) a change of switch names and IP numbers, I copied the new switch names out of the scripts that updated the switches and they were all in uppercase, and where not found by the clogin script when it scanned the .cloginrc file. the match is case-insensitive in v 3.2. > I did try to add a new group, unsuccessfully. > > I added the new group to the /etc/rancid/rancid.conf file, created a new directory, a new router.db, but I'm not finding the information via CVSWEB nor do I have CVS archives of the data. you must use rancid-cvs to create the dir. From alligator94 at laposte.net Thu Apr 23 08:20:21 2015 From: alligator94 at laposte.net (alligator94) Date: Thu, 23 Apr 2015 10:20:21 +0200 Subject: [rancid] rancid : how to filter clogin -x or -c outcome In-Reply-To: <20150420161254.GS88638@shrubbery.net> References: <000501d07a73$6a8fefb0$3fafcf10$@laposte.net> <20150420161254.GS88638@shrubbery.net> Message-ID: <003901d07d9e$57e38e20$07aaaa60$@laposte.net> Thanks for the info. I would need some help as I am unable to make par(1) work. My tests run on a test system. In the same directory as clogin, I have created a file named "infile" which contains the command to run. It contains 2 lines # ( to indicate that the next one is a command) clogin -c "show users" hostname Then I run ./par infile. Nothing happens but 3 empty log files are created(par.log....) I have tried different combinations without success. I have not found any sample except the one coming with the man page which doesn't help me. Regards, Gilles -----Original Message----- From: heasley [mailto:heas at shrubbery.net] Sent: lundi 20 avril 2015 18:13 To: alligator94 Cc: rancid-discuss at shrubbery.net Subject: Re: [rancid] rancid : how to filter clogin -x or -c outcome Sun, Apr 19, 2015 at 09:35:30AM +0200, alligator94: > Hi, > > > > I very often use clogin -x or clogin -c to perform mass configuration > updates. My concern is that clogin doesn't analyze the outcome of the > command passed with -x or -d, so there is no easy way to know if the > command has been successfully accepted by the device . For instance, > some old cisco ios don't accept some commands. > > I have tried to use the clogin debug (-d) option, but it generates a > huge amount of lines. I have also tested to open a log file (I am > using teraterm) before running clogin, then to do a search but, it is > not really easy because each time that you find an error condition, > you need to look backward in the file to know which host the error message reports to. Would par(1) help? > I have also looked at the -s option but it looks complex to me. > > > > What would be nice to have is a way to pass a file to clogin as a > parameter which would contain a list of keyword that you want to be > extracted from the outcome. > > I am thinking to some words like : > > "Invalid" > > "Error" > > "timeout" extracted from the rest of the o/p in what manner? > If some of them are trapped during the clogin run, then they could be > stored in a file $hostname_date_time.err.log I think par(1) would indeed help you here. you could egrep the stuff you want to extract (or awk, etc). > > > Maybe there is an easy way to do it but I am not skilled with expect. > > Any help or comment is welcomed. > > > > Thanks > > Regards, > > Gilles > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From heas at shrubbery.net Thu Apr 23 15:51:59 2015 From: heas at shrubbery.net (heasley) Date: Thu, 23 Apr 2015 15:51:59 +0000 Subject: [rancid] cloginrc order In-Reply-To: <5534C503.5070909@thingy.com> References: <20150418144006.GB74378@shrubbery.net> <55336445.3000001@gmail.com> <5534C503.5070909@thingy.com> Message-ID: <20150423155159.GM10805@shrubbery.net> Mon, Apr 20, 2015 at 10:21:07AM +0100, Howard Jones: > On 19/04/2015 09:16, Alan McKinnon wrote: > > I think that would be very useful indeed. I've had to rationalize very > > large .cloginrc files in the past, it wasn't fun when I got the order > > wrong :-) > > Also something to list all the possible hits (not just the one used) for > a given device would be handy, so you can see where something is > unintentionally masking your (for example) ACS credentials at the bottom > of the last included file. > > Howie You can try ftp://ftp.shrubbery.net/pub/rancid/alpha/rancid-3.2.99.tar.gz which adds the -m and -M options: unix% ./clogin -m router router autoenable:/home/heas/.cloginrc:375: * password:/home/heas/.cloginrc:363: router* user:/home/heas/.cloginrc:360: router* userpassword:/home/heas/.cloginrc:362: router* method:/home/heas/.cl:1: router unix% unix% ./clogin -M router router autoenable:/home/heas/.cloginrc:375: * password:/home/heas/.cloginrc:363: router* password:/home/heas/.cloginrc:378: * user:/home/heas/.cloginrc:360: router* user:/home/heas/.cloginrc:373: * userpassword:/home/heas/.cloginrc:362: router* method:/home/heas/.cl:1: router method:/home/heas/.cloginrc:376: * unix% its only supported by clogin ATM and may yet change. suggestions welcome. From andrew.brennan+rancid at drexel.edu Thu Apr 23 16:55:08 2015 From: andrew.brennan+rancid at drexel.edu (Andrew Brennan) Date: Thu, 23 Apr 2015 12:55:08 -0400 (EDT) Subject: [rancid] ACE Appliance In-Reply-To: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> References: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> Message-ID: I cobbled together a wrapper that is little more than an autoexpect script that was dropped into my RANCID environment to backup my ACE configs. I'm guessing that it would also work for WLCs, but don't have any here to test with to be sure. Expect script logs into the ACE, grabs a list of context names and loops thru using "invoke context $CTXT show running-config" and appending the output to a single file. My code isn't pretty, but it's been running for a couple years without me needing to go back and fix anything (yet). You're welcome to use it, reference it, print it out and throw darts, etc. andrew. On Wed, 22 Apr 2015, Todd Heide wrote: > Does Rancid back up ACE and WLC? > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- #!/usr/local/bin/expect -f # # ACEBKUP v0.2 20120906 (andrew.brennan at pobox.com) still ugly, RANCIDified. # ACEBKUP v0.1 20120815 (andrew.brennan at pobox.com) ugly, but it does the job. # # *REQ* check if RANCID cloginrc files exists/readable. # *REQ* parse RANCID cloginrc files to find creds to login to matching ACEs. # # *REC* no Xrancid/Xlogin, so doesn't handle SSH warning about keys. # *REC* output context configs as separate files - ACE-$IP-$CTXT.txt ? # *REC* parse the prompt string correctly. # # DONE # *FIN* output needs to be buffered(?) and written to IP.new(RANCID plugin). # # Expect and autoexpect were both written by Don Libes, NIST. set force_conservative 0 ;# set to 1 to force conservative mode. if {$force_conservative} { set send_slow {1 .1} proc send {ignore arg} { sleep .1 exp_send -s -- $arg } } # RANCID is where? Still need to parse .cloginrc and 'include {}' lines. set R "~rancid" set F "cloginrc" #if [ file exists $R/$F ] # Variables passed in CLI set H [lindex $argv 0] set U [lindex $argv 1] set P [lindex $argv 2] # IP addresses should come from the router.db file, so ... # Read user/pass from $R/$F if H+U+P are missing. if {[llength $argv] != 3 } { # If they're still MISSING after reading, something is wrong. set U "MISSING" set P "MISSING" set f [open $R/$F r] # fileread bits from testing ... while {[gets $f line] >= 0} { # skip comments lines that start with # character. if {[string index $line 0] eq "#" } { continue } set lvals [regexp -all -inline {\S+} $line] # only exact IP matching for now. if {[lindex $lvals 2] eq $H} { if {[lindex $lvals 1] eq "user"} { set U [lindex $lvals 3]} if {[lindex $lvals 1] eq "password"} { set P [lindex $lvals 3]} } } close $f } set timeout 30 set send_slow {1 .1} spawn ssh -l $U $H match_max 100000 #expect -exact "Username:" #sleep .1 #send -s -- "$U\r" expect -exact "Password:" sleep .1 send -s -- "$P\r" # # Acquire the prompt for later reuse sleep .1 send -s -- "\r" expect -re ".*# " set PR $expect_out(0,string) sleep .1 send -s -- "\r" expect -re ".*# " #expect -exact $PR sleep .1 # Get the list of contexts send -s -- " show context \| include Name: \r" sleep 3 expect -re ".*# " set EO $expect_out(buffer) # Flush the buffer now that we have the contexts. expect "*" # Open output file for following commands (single file for now). set rancout [open "$H.new" "a+"] # Write the list of contexts. puts $rancout $EO foreach line [ split $EO \n ] { if [ regexp {Name: (.*) , Id:} $line match CTXT ] { # Loop through output buffer from above command, use context names. send -s -- " invoke context $CTXT show running-config\r" sleep .1 expect -re ".*# " set cliout $expect_out(buffer) puts $rancout $cliout } } #expect -exact $PR #expect -re ".*# " #set cliout $expect_out(buffer) #puts $rancout $cliout sleep .1 send -s -- " \r" expect -re ".*# " sleep .1 send -s -- " exit\r" From heas at shrubbery.net Thu Apr 23 18:17:16 2015 From: heas at shrubbery.net (heasley) Date: Thu, 23 Apr 2015 18:17:16 +0000 Subject: [rancid] ACE Appliance In-Reply-To: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> References: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150423181716.GW10805@shrubbery.net> Wed, Apr 22, 2015 at 08:46:24PM +0000, Todd Heide: > Does Rancid back up ACE and WLC? the wlc support was pulled into rancid 3.2 & some improvements are in alpha/3.2.99. From heas at shrubbery.net Thu Apr 23 18:20:28 2015 From: heas at shrubbery.net (heasley) Date: Thu, 23 Apr 2015 18:20:28 +0000 Subject: [rancid] ACE Appliance In-Reply-To: References: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20150423182028.GX10805@shrubbery.net> Thu, Apr 23, 2015 at 12:55:08PM -0400, Andrew Brennan: > I cobbled together a wrapper that is little more than an autoexpect script > that was dropped into my RANCID environment to backup my ACE configs. I'm > guessing that it would also work for WLCs, but don't have any here to test > with to be sure. Expect script logs into the ACE, grabs a list of context > names and loops thru using "invoke context $CTXT show running-config" and > appending the output to a single file. i have no ACEs, but looking at the cisco propoganda, it smells like an AGM. perhaps that works (see router.db(5))? From dan.w.anderson at gmail.com Thu Apr 23 20:09:24 2015 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Thu, 23 Apr 2015 16:09:24 -0400 Subject: [rancid] ACE Appliance In-Reply-To: <20150423182028.GX10805@shrubbery.net> References: <684373656.2846477.1429735584358.JavaMail.yahoo@mail.yahoo.com> <20150423182028.GX10805@shrubbery.net> Message-ID: They're fairly similar to the CSSs, so those were the scripts that I used back in the day. On Thu, Apr 23, 2015 at 2:20 PM, heasley wrote: > Thu, Apr 23, 2015 at 12:55:08PM -0400, Andrew Brennan: > > I cobbled together a wrapper that is little more than an autoexpect > script > > that was dropped into my RANCID environment to backup my ACE configs. > I'm > > guessing that it would also work for WLCs, but don't have any here to > test > > with to be sure. Expect script logs into the ACE, grabs a list of > context > > names and loops thru using "invoke context $CTXT show running-config" and > > appending the output to a single file. > > i have no ACEs, but looking at the cisco propoganda, it smells like an AGM. > perhaps that works (see router.db(5))? > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -- Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Fri Apr 24 14:28:20 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Fri, 24 Apr 2015 14:28:20 +0000 (UTC) Subject: [rancid] CGI front end Message-ID: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> Years ago someone on this list sent me a script to use to make a web front. It worked great but that was with my old job, and I looked everywhere in my backups and cannot find a copy of that script, or who sent it to me. Might have been Lance, or John. It was nothing more than a bunch of boxes to put in the Group, hostname, a dropdown of what it is(Cisco,Juniper,HP, etc) and a button for up or down. From JHumes at acs.on.ca Fri Apr 24 14:36:46 2015 From: JHumes at acs.on.ca (Jason Humes) Date: Fri, 24 Apr 2015 14:36:46 +0000 Subject: [rancid] CGI front end In-Reply-To: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> References: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> Message-ID: <5524604a94be46e6abfa8f51ae3ac025@ACSMAIL.acs.local> If you do find something, PLEASE share it...we had to cobble together some brute force scripts to get a basic web interface for management of devices, etc. Thanks Jason -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Todd Heide Sent: Friday, April 24, 2015 10:28 AM To: Rancid-discuss at shrubbery.net Subject: [rancid] CGI front end Years ago someone on this list sent me a script to use to make a web front. It worked great but that was with my old job, and I looked everywhere in my backups and cannot find a copy of that script, or who sent it to me. Might have been Lance, or John. It was nothing more than a bunch of boxes to put in the Group, hostname, a dropdown of what it is(Cisco,Juniper,HP, etc) and a button for up or down. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss From JHumes at acs.on.ca Fri Apr 24 15:34:34 2015 From: JHumes at acs.on.ca (Jason Humes) Date: Fri, 24 Apr 2015 15:34:34 +0000 Subject: [rancid] CGI front end In-Reply-To: References: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> <5524604a94be46e6abfa8f51ae3ac025@ACSMAIL.acs.local> Message-ID: <59c3b38eda9e44568901a5638203297f@ACSMAIL.acs.local> Hi Were you referring to me? We?ve only been using RANCID for a couple years?so it probably wasn?t me ? Cheers Jason From: lavermil at gheek.net [mailto:lavermil at gheek.net] On Behalf Of Lance Vermilion Sent: Friday, April 24, 2015 11:32 AM To: Jason Humes Cc: Todd Heide; rancid-discuss at shrubbery.net Subject: Re: [rancid] CGI front end Yep I know I sent you one. I was only to add/remove devices to rancid. That was probably 8 years ago now. I think I sent it to you directly. I might have sent it via the list too. I will have a quick look. If I find it I will send again (likely will require updating) On Apr 24, 2015 7:37 AM, "Jason Humes" > wrote: If you do find something, PLEASE share it...we had to cobble together some brute force scripts to get a basic web interface for management of devices, etc. Thanks Jason -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Todd Heide Sent: Friday, April 24, 2015 10:28 AM To: Rancid-discuss at shrubbery.net Subject: [rancid] CGI front end Years ago someone on this list sent me a script to use to make a web front. It worked great but that was with my old job, and I looked everywhere in my backups and cannot find a copy of that script, or who sent it to me. Might have been Lance, or John. It was nothing more than a bunch of boxes to put in the Group, hostname, a dropdown of what it is(Cisco,Juniper,HP, etc) and a button for up or down. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From rancid at gheek.net Fri Apr 24 15:50:03 2015 From: rancid at gheek.net (Lance Vermilion) Date: Fri, 24 Apr 2015 08:50:03 -0700 Subject: [rancid] CGI front end In-Reply-To: References: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> <5524604a94be46e6abfa8f51ae3ac025@ACSMAIL.acs.local> <59c3b38eda9e44568901a5638203297f@ACSMAIL.acs.local> Message-ID: I think I found it. On Apr 24, 2015 8:43 AM, "Lance Vermilion" wrote: > No to Todd > On Apr 24, 2015 8:35 AM, "Jason Humes" wrote: > >> Hi >> >> Were you referring to me? We?ve only been using RANCID for a couple >> years?so it probably wasn?t me J >> >> >> >> Cheers >> >> >> >> Jason >> >> >> >> *From:* lavermil at gheek.net [mailto:lavermil at gheek.net] *On Behalf Of *Lance >> Vermilion >> *Sent:* Friday, April 24, 2015 11:32 AM >> *To:* Jason Humes >> *Cc:* Todd Heide; rancid-discuss at shrubbery.net >> *Subject:* Re: [rancid] CGI front end >> >> >> >> Yep I know I sent you one. I was only to add/remove devices to rancid. >> That was probably 8 years ago now. I think I sent it to you directly. I >> might have sent it via the list too. I will have a quick look. If I find it >> I will send again (likely will require updating) >> >> On Apr 24, 2015 7:37 AM, "Jason Humes" wrote: >> >> If you do find something, PLEASE share it...we had to cobble together >> some brute force scripts to get a basic web interface for management of >> devices, etc. >> >> Thanks >> >> Jason >> >> -----Original Message----- >> From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On >> Behalf Of Todd Heide >> Sent: Friday, April 24, 2015 10:28 AM >> To: Rancid-discuss at shrubbery.net >> Subject: [rancid] CGI front end >> >> Years ago someone on this list sent me a script to use to make a web >> front. It worked great but that was with my old job, and I looked >> everywhere in my backups and cannot find a copy of that script, or who sent >> it to me. Might have been Lance, or John. It was nothing more than a bunch >> of boxes to put in the Group, hostname, a dropdown of what it >> is(Cisco,Juniper,HP, etc) and a button for up or down. >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at shrubbery.net >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rancidmod.zip Type: application/zip Size: 4246 bytes Desc: not available URL: From rancid at gheek.net Fri Apr 24 15:43:04 2015 From: rancid at gheek.net (Lance Vermilion) Date: Fri, 24 Apr 2015 08:43:04 -0700 Subject: [rancid] CGI front end In-Reply-To: <59c3b38eda9e44568901a5638203297f@ACSMAIL.acs.local> References: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> <5524604a94be46e6abfa8f51ae3ac025@ACSMAIL.acs.local> <59c3b38eda9e44568901a5638203297f@ACSMAIL.acs.local> Message-ID: No to Todd On Apr 24, 2015 8:35 AM, "Jason Humes" wrote: > Hi > > Were you referring to me? We?ve only been using RANCID for a couple > years?so it probably wasn?t me J > > > > Cheers > > > > Jason > > > > *From:* lavermil at gheek.net [mailto:lavermil at gheek.net] *On Behalf Of *Lance > Vermilion > *Sent:* Friday, April 24, 2015 11:32 AM > *To:* Jason Humes > *Cc:* Todd Heide; rancid-discuss at shrubbery.net > *Subject:* Re: [rancid] CGI front end > > > > Yep I know I sent you one. I was only to add/remove devices to rancid. > That was probably 8 years ago now. I think I sent it to you directly. I > might have sent it via the list too. I will have a quick look. If I find it > I will send again (likely will require updating) > > On Apr 24, 2015 7:37 AM, "Jason Humes" wrote: > > If you do find something, PLEASE share it...we had to cobble together some > brute force scripts to get a basic web interface for management of devices, > etc. > > Thanks > > Jason > > -----Original Message----- > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On > Behalf Of Todd Heide > Sent: Friday, April 24, 2015 10:28 AM > To: Rancid-discuss at shrubbery.net > Subject: [rancid] CGI front end > > Years ago someone on this list sent me a script to use to make a web > front. It worked great but that was with my old job, and I looked > everywhere in my backups and cannot find a copy of that script, or who sent > it to me. Might have been Lance, or John. It was nothing more than a bunch > of boxes to put in the Group, hostname, a dropdown of what it > is(Cisco,Juniper,HP, etc) and a button for up or down. > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From workwithcisco at yahoo.com Fri Apr 24 20:10:53 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Fri, 24 Apr 2015 20:10:53 +0000 (UTC) Subject: [rancid] CGI front end In-Reply-To: References: Message-ID: <1732095671.4665696.1429906253811.JavaMail.yahoo@mail.yahoo.com> Thats the one! Thanks Lance! Yep it was about 8 years ago, just shows how well Rancid works, once running, set it and forget it. >________________________________ > From: Lance Vermilion >To: Jason Humes >Cc: rancid-discuss at shrubbery.net; Todd Heide >Sent: Friday, April 24, 2015 10:50 AM >Subject: RE: [rancid] CGI front end > > > >I think I found it. > > > >On Apr 24, 2015 8:43 AM, "Lance Vermilion" wrote: > >No to Todd >>On Apr 24, 2015 8:35 AM, "Jason Humes" wrote: >> >>Hi >>>Were you referring to me? We?ve only been using RANCID for a couple years?so it probably wasn?t me J >>> >>>Cheers >>> >>>Jason >>> >>>From:lavermil at gheek.net [mailto:lavermil at gheek.net] On Behalf Of Lance Vermilion >>>Sent: Friday, April 24, 2015 11:32 AM >>>To: Jason Humes >>>Cc: Todd Heide; rancid-discuss at shrubbery.net >>>Subject: Re: [rancid] CGI front end >>> >>>Yep I know I sent you one. I was only to add/remove devices to rancid. That was probably 8 years ago now. I think I sent it to you directly. I might have sent it via the list too. I will have a quick look. If I find it I will send again (likely will require updating) >>>On Apr 24, 2015 7:37 AM, "Jason Humes" wrote: >>>If you do find something, PLEASE share it...we had to cobble together some brute force scripts to get a basic web interface for management of devices, etc. >>> >>>Thanks >>> >>>Jason >>> >>>-----Original Message----- >>>From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Todd Heide >>>Sent: Friday, April 24, 2015 10:28 AM >>>To: Rancid-discuss at shrubbery.net >>>Subject: [rancid] CGI front end >>> >>>Years ago someone on this list sent me a script to use to make a web front. It worked great but that was with my old job, and I looked everywhere in my backups and cannot find a copy of that script, or who sent it to me. Might have been Lance, or John. It was nothing more than a bunch of boxes to put in the Group, hostname, a dropdown of what it is(Cisco,Juniper,HP, etc) and a button for up or down. >>>_______________________________________________ >>>Rancid-discuss mailing list >>>Rancid-discuss at shrubbery.net >>>http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>>_______________________________________________ >>>Rancid-discuss mailing list >>>Rancid-discuss at shrubbery.net >>>http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > From workwithcisco at yahoo.com Fri Apr 24 22:27:53 2015 From: workwithcisco at yahoo.com (Todd Heide) Date: Fri, 24 Apr 2015 22:27:53 +0000 (UTC) Subject: [rancid] CGI front end In-Reply-To: References: Message-ID: <95082325.4763714.1429914473394.JavaMail.yahoo@mail.yahoo.com> I have some debugging to do on this. I have Debian 7 with Perl5. Its not liking it, lol. Error Variables not defined completely. The following fields must be defined. Device: "" Type: "" Status: "" Do What: "" Uninitialized content, so probably looking for something and can't find the path to it. I added my list of groups to the CGI, but still no go. (sure wish I had access to my old server where I got this working so many moons ago) I forgot all I learned regarding CGI, Perl, etc. >________________________________ > From: Lance Vermilion >To: Jason Humes >Cc: rancid-discuss at shrubbery.net; Todd Heide >Sent: Friday, April 24, 2015 10:50 AM >Subject: RE: [rancid] CGI front end > > > >I think I found it. > > > >On Apr 24, 2015 8:43 AM, "Lance Vermilion" wrote: > >No to Todd >>On Apr 24, 2015 8:35 AM, "Jason Humes" wrote: >> >>Hi >>>Were you referring to me? We?ve only been using RANCID for a couple years?so it probably wasn?t me J >>> >>>Cheers >>> >>>Jason >>> >>>From:lavermil at gheek.net [mailto:lavermil at gheek.net] On Behalf Of Lance Vermilion >>>Sent: Friday, April 24, 2015 11:32 AM >>>To: Jason Humes >>>Cc: Todd Heide; rancid-discuss at shrubbery.net >>>Subject: Re: [rancid] CGI front end >>> >>>Yep I know I sent you one. I was only to add/remove devices to rancid. That was probably 8 years ago now. I think I sent it to you directly. I might have sent it via the list too. I will have a quick look. If I find it I will send again (likely will require updating) >>>On Apr 24, 2015 7:37 AM, "Jason Humes" wrote: >>>If you do find something, PLEASE share it...we had to cobble together some brute force scripts to get a basic web interface for management of devices, etc. >>> >>>Thanks >>> >>>Jason >>> >>>-----Original Message----- >>>From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Todd Heide >>>Sent: Friday, April 24, 2015 10:28 AM >>>To: Rancid-discuss at shrubbery.net >>>Subject: [rancid] CGI front end >>> >>>Years ago someone on this list sent me a script to use to make a web front. It worked great but that was with my old job, and I looked everywhere in my backups and cannot find a copy of that script, or who sent it to me. Might have been Lance, or John. It was nothing more than a bunch of boxes to put in the Group, hostname, a dropdown of what it is(Cisco,Juniper,HP, etc) and a button for up or down. >>>_______________________________________________ >>>Rancid-discuss mailing list >>>Rancid-discuss at shrubbery.net >>>http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>>_______________________________________________ >>>Rancid-discuss mailing list >>>Rancid-discuss at shrubbery.net >>>http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > From rancid at gheek.net Fri Apr 24 15:32:09 2015 From: rancid at gheek.net (Lance Vermilion) Date: Fri, 24 Apr 2015 08:32:09 -0700 Subject: [rancid] CGI front end In-Reply-To: <5524604a94be46e6abfa8f51ae3ac025@ACSMAIL.acs.local> References: <1951499726.4411023.1429885700321.JavaMail.yahoo@mail.yahoo.com> <5524604a94be46e6abfa8f51ae3ac025@ACSMAIL.acs.local> Message-ID: Yep I know I sent you one. I was only to add/remove devices to rancid. That was probably 8 years ago now. I think I sent it to you directly. I might have sent it via the list too. I will have a quick look. If I find it I will send again (likely will require updating) On Apr 24, 2015 7:37 AM, "Jason Humes" wrote: > If you do find something, PLEASE share it...we had to cobble together some > brute force scripts to get a basic web interface for management of devices, > etc. > > Thanks > > Jason > > -----Original Message----- > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On > Behalf Of Todd Heide > Sent: Friday, April 24, 2015 10:28 AM > To: Rancid-discuss at shrubbery.net > Subject: [rancid] CGI front end > > Years ago someone on this list sent me a script to use to make a web > front. It worked great but that was with my old job, and I looked > everywhere in my backups and cannot find a copy of that script, or who sent > it to me. Might have been Lance, or John. It was nothing more than a bunch > of boxes to put in the Group, hostname, a dropdown of what it > is(Cisco,Juniper,HP, etc) and a button for up or down. > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.nauwelaerts at aquafin.be Mon Apr 27 09:54:39 2015 From: nick.nauwelaerts at aquafin.be (Nick Nauwelaerts) Date: Mon, 27 Apr 2015 09:54:39 +0000 Subject: [rancid] Fortinet Fortigate problem. In-Reply-To: References: Message-ID: <361E14917FBECC43A4359C9B977FC4DB11DBFBD7@MBX2.aquafinad.aquafin.be> heya, i had a few issues on my fortinet running "v5.0,build0292,140801 (GA Patch 9)". the fnlogin bundled with rancid 3.2 didnt like the pager prompt "--More--" and fnrancid did some funky reformatting of whitespace when the "--More--" prompt was involved. Here are my diffs (read: fiddled until it worked) for both. disclaimer: only tested with 2 devices running the before mentioned fortios version, your experience may differ. // nick -----Original Message----- From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Chris Davis Sent: Tuesday, April 21, 2015 23:59 To: 'rancid-discuss at shrubbery.net' Subject: Re: [rancid] Fortinet Fortigate problem. A few weeks ago I posted the following. A couple of very helpful folks pointed me at the fnlogin script and why it might be failing. I had just upgraded one of my Fortinet firewall clusters to 5.0.9 firmware and when I upgraded the other cluster, I had the same problem. One of the answers was to disable the strong encryption on the firewall. Not my favorite thing to do... So, I had a look at the fnlogin code. Now, I'm no expect programmer, but it was straight enough to follow. I found that the cypher was set to 3des. I spoke with a Fortinet engineer that I was working with on another issue, and he indeed confirmed that 3des-cbc was not supported in strong encryption mode moving forward. He said I should choose something else. This afternoon I tinkered with swapping aes256-ctr where it had said 3des before, and turned back on strong encryption on the clusters. And amazingly, it worked! I'll know for sure when my hourly rancid runs kick off, but I have a small job running every fifteen minutes grabbing some data for the other problem I was working on, and it has successfully grabbed 2 iterations of data for that project. So, how hard is it to jump from 2.3.8 to 3.2? (since I'm feeling flush with success) I will remember the router file change from : to ; for separators. Any other gotchas? On 30/03/2015 19:03, Chris Davis wrote: > I?ve been using Rancid 2.3.8 for some time now without any problems. > (once I got all the patches installed for it) > > > > This past week, we upgraded a unit from 5.0.7 firmware to 5.0.9. This > had the negative effect of making it impossible for Rancid to log into > the unit. I have checked all the normal things. I deleted and > recreated the ssh Known_hosts entry. I?ve even manually logged in > from the Rancid server using my own credentials and the rancid > credentials and not had any problems. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss ________________________________ Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN Disclaimer: zie www.aquafin.be P Denk aan het milieu. Druk deze mail niet onnodig af. -------------- next part -------------- A non-text attachment was scrubbed... Name: fnlogin.diff Type: application/octet-stream Size: 377 bytes Desc: fnlogin.diff URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fnrancid.diff Type: application/octet-stream Size: 429 bytes Desc: fnrancid.diff URL: From spedersen.lists at gmail.com Wed Apr 29 13:34:28 2015 From: spedersen.lists at gmail.com (Sean) Date: Wed, 29 Apr 2015 06:34:28 -0700 Subject: [rancid] Cisco WAP VLAN packets/bytes not being filtered, triggering diff In-Reply-To: <08AA9899-97D2-489F-AB7B-50AF6F708EA5@io.com> References: <08AA9899-97D2-489F-AB7B-50AF6F708EA5@io.com> Message-ID: <7EA8133F-318B-457B-A489-A5A3BE457739@io.com> Hi all, New to the list, and more or less new to diggint into rancid deeper than the occasional device add. I recently moved to 3.2 and noticed that our Cisco WAPs started to report VLAN packet/byte counts on every configuration sync. Example: - !VLAN: 0 packets, 0 bytes input - !VLAN: 7944 packets, 3010776 bytes output - !VLAN: Other 0 79426 - !VLAN: 0 packets, 0 bytes input - !VLAN: 7944 packets, 3010776 bytes output - !VLAN: Other 0 79426 - !VLAN: 7939 packets, 6224176 bytes input - !VLAN: 63538 packets, 7157376 bytes output I found this post (http://www.shrubbery.net/pipermail/rancid-discuss/2014-June/007703.html) that discusses the same issue, but for 3.1. I tried to apply the patch directly but it failed, presumably because of changes made between 3.1 and 3.2. A manual application of the modified code did not work, either. $device is apparently undefined and throws an error in my rancid logs. Otherwise, it doesn't seem to have any effect. Is there another update or patch available that might address this problem? Does the patch above still work, and I should re-apply it, stop being an idiot, and ignore the $device-related errors? Any assistance would be appreciated. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From list at mass-distortion.net Wed Apr 29 18:06:50 2015 From: list at mass-distortion.net (waz0wski) Date: Wed, 29 Apr 2015 12:06:50 -0600 Subject: [rancid] Fortinet Fortigate problem. In-Reply-To: <361E14917FBECC43A4359C9B977FC4DB11DBFBD7@MBX2.aquafinad.aquafin.be> References: <361E14917FBECC43A4359C9B977FC4DB11DBFBD7@MBX2.aquafinad.aquafin.be> Message-ID: <3FA59B5D-6E4B-4DC1-9584-61E53E039742@mass-distortion.net> Hey Nick, Thanks for posting this - I just ran into a similar issue, and your patches to fnlogin/fnrancid are working fine for me with rancid-3.1-2.el6.x86_64 against fortigates running v5.2.3,build670 > On Apr 27, 2015, at 3:54 AM, Nick Nauwelaerts wrote: > > heya, > i had a few issues on my fortinet running "v5.0,build0292,140801 (GA Patch 9)". the fnlogin bundled with rancid 3.2 didnt like the pager prompt "--More--" and fnrancid did some funky reformatting of whitespace when the "--More--" prompt was involved. Here are my diffs (read: fiddled until it worked) for both. disclaimer: only tested with 2 devices running the before mentioned fortios version, your experience may differ. > > // nick > > -----Original Message----- > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Chris Davis > Sent: Tuesday, April 21, 2015 23:59 > To: 'rancid-discuss at shrubbery.net' > Subject: Re: [rancid] Fortinet Fortigate problem. > > A few weeks ago I posted the following. A couple of very helpful folks pointed me at the fnlogin script and why it might be failing. I had just upgraded one of my Fortinet firewall clusters to 5.0.9 firmware and when I upgraded the other cluster, I had the same problem. One of the answers was to disable the strong encryption on the firewall. Not my favorite thing to do... So, I had a look at the fnlogin code. Now, I'm no expect programmer, but it was straight enough to follow. I found that the cypher was set to 3des. I spoke with a Fortinet engineer that I was working with on another issue, and he indeed confirmed that 3des-cbc was not supported in strong encryption mode moving forward. He said I should choose something else. > > This afternoon I tinkered with swapping aes256-ctr where it had said 3des before, and turned back on strong encryption on the clusters. And amazingly, it worked! I'll know for sure when my hourly rancid runs kick off, but I have a small job running every fifteen minutes grabbing some data for the other problem I was working on, and it has successfully grabbed 2 iterations of data for that project. > > So, how hard is it to jump from 2.3.8 to 3.2? (since I'm feeling flush with success) I will remember the router file change from : to ; for separators. Any other gotchas? > > On 30/03/2015 19:03, Chris Davis wrote: >> I?ve been using Rancid 2.3.8 for some time now without any problems. >> (once I got all the patches installed for it) >> >> >> >> This past week, we upgraded a unit from 5.0.7 firmware to 5.0.9. This >> had the negative effect of making it impossible for Rancid to log into >> the unit. I have checked all the normal things. I deleted and >> recreated the ssh Known_hosts entry. I?ve even manually logged in >> from the Rancid server using my own credentials and the rancid >> credentials and not had any problems. > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > ________________________________ > > Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN > > Disclaimer: zie www.aquafin.be P Denk aan het milieu. Druk deze mail niet onnodig af. > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From roberto at nead.unesp.br Thu Apr 30 17:54:25 2015 From: roberto at nead.unesp.br (Roberto Greiner) Date: Thu, 30 Apr 2015 14:54:25 -0300 Subject: [rancid] "End of run not found" when running with a DLink switch Message-ID: <55426C51.6080301@nead.unesp.br> Hi, I'm trying to set rancid to read the configuration for a D-Link DGS-3420 switch, but I'm hitting on an error where rancid fails to get the switch configurations with an "End of run not found" message. I'm running rancid 3.2 in a Debian 7 box, with cvsweb for reading the cvs. Rancid is working properly, as I'm getting the all the configs for some 3Com switches (3Com 4500 and 3Com 4800). I added the following line do router.db: dlink-poe-datacenter1.;dell;up Running "rancid -t dell -C dlink-poe-datacenter1." I get the following output: dllogin -t 300 -c 'show switch;show config current_config' dlink-poe-datacenter1. Running "time dllogin -t 300 -c 'show switch;show config current_config' dlink-poe-datacenter1." (notice 'time' at the beginning), I get all the configs for the switch, and a running time of ~19 seconds. So, the switch is answering and sending all the config quickly, indicating also that there is no timeout problem. Running "rancid -t dell -d dlink-poe-datacenter1.", returns the following output (also after ~19 seconds): HIT COMMAND:DGS-3420-28PC:admin#show switch In GetSystem: DGS-3420-28PC:admin#show switch HIT COMMAND:DGS-3420-28PC:admin#show config current_config In GetConf: DGS-3420-28PC:admin#show config current_config dlink-poe-datacenter1.: End of run not found dlink-poe-datacenter1.: End of run not found #------------------------------------------------------------------- I've used 'NOPIPE=yes;export NOPIPE' to generate the output from the switch, and rancid does indeed read everything from the dlink switch. The .raw file ends with the following: DGS-3420-28PC:admin#logoutConnection to dlink-poe-datacenter1. closed by remote host. Connection to dlink-poe-datacenter1. closed. My .cloginrc has the following entries: add cyphertype * {aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc} add method * ssh add user dlink* admin add password dlink* add autoenable dlink* 1 Could somebody help me out? I don't know what else I should do. I think it' probably some simple setting, but I don't know what else is missing. Thank you, Roberto Greiner -- ----------------------------------------------------- Marcos Roberto Greiner Os otimistas acham que estamos no melhor dos mundos Os pessimistas tem medo de que isto seja verdade James Branch Cabell ----------------------------------------------------- From heas at shrubbery.net Thu Apr 30 18:20:59 2015 From: heas at shrubbery.net (heasley) Date: Thu, 30 Apr 2015 18:20:59 +0000 Subject: [rancid] "End of run not found" when running with a DLink switch In-Reply-To: <20150430181948.8469690667@sea.shrubbery.net> <55426C51.6080301@nead.unesp.br> Message-ID: <20150430182059.GK9903@shrubbery.net> Thu, Apr 30, 2015 at 02:54:25PM -0300, Roberto Greiner: > Hi, > > I'm trying to set rancid to read the configuration for a D-Link DGS-3420 > switch, but I'm hitting on an error where rancid fails to get the switch > configurations with an "End of run not found" message. > > I'm running rancid 3.2 in a Debian 7 box, with cvsweb for reading the > cvs. Rancid is working properly, as I'm getting the all the configs for > some 3Com switches (3Com 4500 and 3Com 4800). > > I added the following line do router.db: > dlink-poe-datacenter1.;dell;up > > Running "rancid -t dell -C dlink-poe-datacenter1." I get the > following output: > dllogin -t 300 -c 'show switch;show config current_config' > dlink-poe-datacenter1. > > Running "time dllogin -t 300 -c 'show switch;show config current_config' > dlink-poe-datacenter1." (notice 'time' at the beginning), I > get all the configs for the switch, and a running time of ~19 seconds. > So, the switch is answering and sending all the config quickly, > indicating also that there is no timeout problem. > > Running "rancid -t dell -d dlink-poe-datacenter1.", returns > the following output (also after ~19 seconds): > HIT COMMAND:DGS-3420-28PC:admin#show switch > In GetSystem: DGS-3420-28PC:admin#show switch > HIT COMMAND:DGS-3420-28PC:admin#show config current_config > In GetConf: DGS-3420-28PC:admin#show config current_config > dlink-poe-datacenter1.: End of run not found > dlink-poe-datacenter1.: End of run not found > #------------------------------------------------------------------- > > I've used 'NOPIPE=yes;export NOPIPE' to generate the output from the > switch, and rancid does indeed read everything from the dlink switch. > The .raw file ends with the following: > DGS-3420-28PC:admin#logoutConnection to dlink-poe-datacenter1. > closed by remote host. > Connection to dlink-poe-datacenter1. closed. > > My .cloginrc has the following entries: > add cyphertype * > {aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc} > add method * ssh > add user dlink* admin > add password dlink* > add autoenable dlink* 1 > > Could somebody help me out? I don't know what else I should do. I think > it' probably some simple setting, but I don't know what else is missing. > > Thank you, > > Roberto Greiner Try this patch and let us know if it fixes the issue: Index: dllogin.in =================================================================== --- dllogin.in (revision 3088) +++ dllogin.in (working copy) @@ -506,6 +506,14 @@ source_password_file $password_file set in_proc 0 set exitval 0 +# if we have dont have a tty, we need some additional terminal settings +if [catch {open /dev/tty w} ttyid] { + # no tty, ie: cron + set spawnopts "-nottycopy" + set stty_init "cols 132" +} else { + catch {close ttyid} reason +} foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" From roberto at nead.unesp.br Thu Apr 30 18:47:41 2015 From: roberto at nead.unesp.br (Roberto Greiner) Date: Thu, 30 Apr 2015 15:47:41 -0300 Subject: [rancid] "End of run not found" when running with a DLink switch In-Reply-To: <20150430182059.GK9903@shrubbery.net> References: <20150430182059.GK9903@shrubbery.net> Message-ID: <554278CD.1060902@nead.unesp.br> On 30/04/2015 15:20, heasley wrote: > Thu, Apr 30, 2015 at 02:54:25PM -0300, Roberto Greiner: >> Hi, >> >> I'm trying to set rancid to read the configuration for a D-Link DGS-3420 >> switch, but I'm hitting on an error where rancid fails to get the switch >> configurations with an "End of run not found" message. >> >> I'm running rancid 3.2 in a Debian 7 box, with cvsweb for reading the >> cvs. Rancid is working properly, as I'm getting the all the configs for >> some 3Com switches (3Com 4500 and 3Com 4800). >> >> I added the following line do router.db: >> dlink-poe-datacenter1.;dell;up >> >> Running "rancid -t dell -C dlink-poe-datacenter1." I get the >> following output: >> dllogin -t 300 -c 'show switch;show config current_config' >> dlink-poe-datacenter1. >> >> Running "time dllogin -t 300 -c 'show switch;show config current_config' >> dlink-poe-datacenter1." (notice 'time' at the beginning), I >> get all the configs for the switch, and a running time of ~19 seconds. >> So, the switch is answering and sending all the config quickly, >> indicating also that there is no timeout problem. >> >> Running "rancid -t dell -d dlink-poe-datacenter1.", returns >> the following output (also after ~19 seconds): >> HIT COMMAND:DGS-3420-28PC:admin#show switch >> In GetSystem: DGS-3420-28PC:admin#show switch >> HIT COMMAND:DGS-3420-28PC:admin#show config current_config >> In GetConf: DGS-3420-28PC:admin#show config current_config >> dlink-poe-datacenter1.: End of run not found >> dlink-poe-datacenter1.: End of run not found >> #------------------------------------------------------------------- >> >> I've used 'NOPIPE=yes;export NOPIPE' to generate the output from the >> switch, and rancid does indeed read everything from the dlink switch. >> The .raw file ends with the following: >> DGS-3420-28PC:admin#logoutConnection to dlink-poe-datacenter1. >> closed by remote host. >> Connection to dlink-poe-datacenter1. closed. >> >> My .cloginrc has the following entries: >> add cyphertype * >> {aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc} >> add method * ssh >> add user dlink* admin >> add password dlink* >> add autoenable dlink* 1 >> >> Could somebody help me out? I don't know what else I should do. I think >> it' probably some simple setting, but I don't know what else is missing. >> >> Thank you, >> >> Roberto Greiner > Try this patch and let us know if it fixes the issue: > > Index: dllogin.in > =================================================================== > --- dllogin.in (revision 3088) > +++ dllogin.in (working copy) > @@ -506,6 +506,14 @@ > source_password_file $password_file > set in_proc 0 > set exitval 0 > +# if we have dont have a tty, we need some additional terminal settings > +if [catch {open /dev/tty w} ttyid] { > + # no tty, ie: cron > + set spawnopts "-nottycopy" > + set stty_init "cols 132" > +} else { > + catch {close ttyid} reason > +} > foreach router [lrange $argv $i end] { > set router [string tolower $router] > send_user "$router\n" > > No, it didn't help: rancid at server:/etc/rancid/bin$ rancid -t dell -d dlink-poe-datacenter1. loadtype: device type dell loadtype: found device type dell in /etc/rancid/etc/rancid.types.base executing dllogin -t 300 -c"show switch;show config current_config" dlink-poe-datacenter1. HIT COMMAND:DGS-3420-28PC:admin#show switch In GetSystem: DGS-3420-28PC:admin#show switch HIT COMMAND:DGS-3420-28PC:admin#show config current_config In GetConf: DGS-3420-28PC:admin#show config current_config dlink-poe-datacenter1.: End of run not found dlink-poe-datacenter1.: End of run not found #------------------------------------------------------------------- Roberto Greiner -- ----------------------------------------------------- Marcos Roberto Greiner Os otimistas acham que estamos no melhor dos mundos Os pessimistas tem medo de que isto seja verdade James Branch Cabell -----------------------------------------------------