From harsha.s.aryan at gmail.com Wed Dec 2 11:31:44 2015 From: harsha.s.aryan at gmail.com (Harsha S Aryan) Date: Wed, 2 Dec 2015 17:01:44 +0530 Subject: [rancid] (no subject) Message-ID: hi, i have some doubts in rancid can any one explane what is the below things status for root@[server]:/# vi /var/lib/rancid/switches/router.db switch1.your-domainname.xyz:hp:up switch2.your-domainname.xyz:hp:up 1.2.3.4:hp:up 1.2.3.5:hp:down -- Rehards, Harsha -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckinnon at gmail.com Wed Dec 2 18:41:04 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Wed, 2 Dec 2015 20:41:04 +0200 Subject: [rancid] (no subject) In-Reply-To: References: Message-ID: <565F3B40.7010105@gmail.com> On 02/12/2015 13:31, Harsha S Aryan wrote: > hi, > > i have some doubts in rancid can any one explane what is the below > things status for > > root@[server]:/# vi /var/lib/rancid/switches/router.db > switch1.your-domainname.xyz:hp:up > switch2.your-domainname.xyz:hp:up > 1.2.3.4:hp:up > 1.2.3.5:hp:down This is all in the man pages somewhere, but here goes: That's a config file from the rancid 2.3 series; the 3.x series uses a semicolon ";" as a field separator and not a colon ":" as was used in 2.3. This is to avoid issues with IPv6 addresses; otherwise the format is the same. Each line has 3 fields: device name: this can be it's fqdn or an IP address device type: a device type as defined in rancid (see [1] below) status: "up" means the device is working and rancid will poll it. Any other value means down and rancid will not poll it [1] A device type of "cisco" or "hp" does not have to mean the device was made by Cisco or Hewlett Packard. If Acme Inc made a device that copies Cisco IOS config closely, then the cisco type would probably work for it. On the other hand, recent Cisco OSes (eg GSR, Nexus and XR) are a lot different from classic IOS so the cisco type doesn't work for them, you use types like cisco-gsr, cisco-nx and cisco-xr. HP kit (liek Dell) has a reputation for being badge engineered and sometimes it feels like every model is completely different. Usually you have to find out what the actual OEM device is, and use that type. Confusing? you betcha. [2] There a possible optional fourth field in that file, it is treated as a comment. I used it a lot to document the date and reason I marked something down, and it shows up in the daily status emails. Useful tip! -- Alan McKinnon alan.mckinnon at gmail.com From heas at shrubbery.net Wed Dec 2 21:56:56 2015 From: heas at shrubbery.net (heasley) Date: Wed, 2 Dec 2015 21:56:56 +0000 Subject: [rancid] Cant enable , privileged user with "#" pronpot In-Reply-To: References: Message-ID: <20151202215656.GG10132@shrubbery.net> Wed, Oct 28, 2015 at 07:55:56AM -0500, Jason Biel: > Piarres, > > Look here: http://www.shrubbery.net/rancid/man/cloginrc.5.html > > Directives: > *add enableprompt {""}* > > You may be able to modify the enableprompt to suit your needs. that will not work; clogin will believe it is already enabled give the # prompt. > On Wed, Oct 28, 2015 at 5:12 AM, Piarres Beobide wrote: > > > Hello > > > > first greet everyone and apologize for my low English > > > > > > I want use rancid to manage large site configuration backups but I have a > > problem with some Cisco devices. > > > > To log in this devices we use a little privileged user an then we need to > > enable to get configuration but the prompt for this user is "#" , I cant > > change this log procedure and I think rancid not enable because the program > > assumes that you already are enabled. > > > > > > Searching the web I fount this solution [1], but I cant find the code to > > change in clogin script. > > > > Can any help me ? i can offer two suggestions, 1) if it hurts, stop doing that. use a different user that either is not enabled or is automatically fully enabled. 2) fully enable that user you have and use aaa authorization to limit what it can do to include the stuff racnid runs. From rytaluv at gmail.com Fri Dec 11 09:35:24 2015 From: rytaluv at gmail.com (Ryta Kashemire) Date: Fri, 11 Dec 2015 12:35:24 +0300 Subject: [rancid] Email doesnt show which user made the changes Message-ID: Hello I have managed to configure rancid to send me an email when any changes are made on my router...However it doesn?t show which user made the change...How can i get that done Ritah -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckinnon at gmail.com Fri Dec 11 10:18:07 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Fri, 11 Dec 2015 12:18:07 +0200 Subject: [rancid] Email doesnt show which user made the changes In-Reply-To: References: Message-ID: <566AA2DF.2020208@gmail.com> On 11/12/2015 11:35, Ryta Kashemire wrote: > Hello > > I have managed to configure rancid to send me an email when any changes > are made on my router...However it doesn?t show which user made the > change...How can i get that done You can't do it in rancid, because that information is not present in "show run" or equivalent for your devices. Typically once you have a change that you want to investigate, you'd look further in syslog or the tacacs accounting logs. /alanm From rytaluv at gmail.com Fri Dec 11 10:55:51 2015 From: rytaluv at gmail.com (Ryta Kashemire) Date: Fri, 11 Dec 2015 13:55:51 +0300 Subject: [rancid] Email doesnt show which user made the changes In-Reply-To: <566AA2DF.2020208@gmail.com> References: <566AA2DF.2020208@gmail.com> Message-ID: Thank you... On Fri, Dec 11, 2015 at 1:18 PM, Alan McKinnon wrote: > On 11/12/2015 11:35, Ryta Kashemire wrote: > >> Hello >> >> I have managed to configure rancid to send me an email when any changes >> are made on my router...However it doesn?t show which user made the >> change...How can i get that done >> > > > > You can't do it in rancid, because that information is not present in > "show run" or equivalent for your devices. > > Typically once you have a change that you want to investigate, you'd look > further in syslog or the tacacs accounting logs. > > /alanm > > _______________________________________________ > 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 santosht at mercantile.com.np Mon Dec 14 03:32:18 2015 From: santosht at mercantile.com.np (Santosh Kant Thakur) Date: Mon, 14 Dec 2015 09:17:18 +0545 Subject: [rancid] rancid configuration help for last configuration changed by xxxx Message-ID: <7D21639976D45C478759CED8C5072DEC01321023D3B1@ex.mercantile.com.np> Hi, I need your help, I have configured my rancid with viewvc. Branch: MAIN CVS Tags: HEAD Changes since 1.918: +1 -1 lines Diff to previous 1.918 Updates Last configuration change at 13:19:17 NST Wed Jul 8 2015 by bishwas ! Last configuration change at 14:10:06 NST Wed Jul 15 2015 by bishwas There is no name seen like above. While in my previous server it works well. Please can you help me to suggest this. Where I have to to change configuration: rancid.conf or viewvc.conf or somewhere else. Thanks in advance. Regards, santosh While clicking on "diff to previous" -------------- next part -------------- An HTML attachment was scrubbed... URL: From heas at shrubbery.net Mon Dec 14 04:27:15 2015 From: heas at shrubbery.net (heasley) Date: Mon, 14 Dec 2015 04:27:15 +0000 Subject: [rancid] rancid configuration help for last configuration changed by xxxx In-Reply-To: <7D21639976D45C478759CED8C5072DEC01321023D3B1@ex.mercantile.com.np> References: <7D21639976D45C478759CED8C5072DEC01321023D3B1@ex.mercantile.com.np> Message-ID: <20151214042715.GB74372@shrubbery.net> Mon, Dec 14, 2015 at 09:17:18AM +0545, Santosh Kant Thakur: > Hi, > > I need your help, I have configured my rancid with viewvc. > > > Branch: MAIN > CVS Tags: HEAD > Changes since 1.918: +1 -1 lines > Diff to previous 1.918 > Updates > Last configuration change at 13:19:17 NST Wed Jul 8 2015 by bishwas > > ! Last configuration change at 14:10:06 NST Wed Jul 15 2015 by bishwas > > > There is no name seen like above. While in my previous server it works well. Rancid strips this line. If your previous rancid installation saved this line, it had been modified. Note that its not possible to ensure that this line is accurate in the rancid repository. From b.candler at pobox.com Mon Dec 14 15:01:11 2015 From: b.candler at pobox.com (Brian Candler) Date: Mon, 14 Dec 2015 15:01:11 +0000 Subject: [rancid] Fix for hpuifilter (HP Procurve) Message-ID: <566ED9B7.8060706@pobox.com> Rancid wasn't working with HP Procurve switches - a problem which I have found mentioned by other people, e.g. http://www.shrubbery.net/pipermail/rancid-discuss/2012-April/006317.html http://louwrentius.com/creating-configuration-backups-of-hp-procurve-switches.html I believe I have found and fixed the underlying cause of this problem. It's in hpuifilter. In the case where tbuf contains both a complete escape sequence and a partial escape sequence, the function expectmore() was returning zero to say "complete" when in fact there could have been a partial sequence following it. As a result, some escape sequences were getting mangled. The attached patch changes this so only a complete escape sequence is accepted, and now hrancid/hlogin appear to work happily, at least with the J9775A (2530-48G) that I'm using here. I'm sure this could be done in a cleaner way, and also it could amortise several escape sequences into a single call, although I didn't do this as the existing code currently stops after a newline sequence and this appears to be intentional. I also took the liberty of changing memcpy() calls to memmove(), since the former has undefined behaviour when the destination and source memory areas overlap. Regards, Brian Candler. -------------- next part -------------- A non-text attachment was scrubbed... Name: hpuifilter.diff.gz Type: application/gzip Size: 1012 bytes Desc: not available URL: From b.candler at pobox.com Mon Dec 14 16:00:11 2015 From: b.candler at pobox.com (Brian Candler) Date: Mon, 14 Dec 2015 16:00:11 +0000 Subject: [rancid] Fix for hpuifilter (HP Procurve) In-Reply-To: <566ED9B7.8060706@pobox.com> References: <566ED9B7.8060706@pobox.com> Message-ID: <566EE78B.8080204@pobox.com> On 14/12/2015 15:01, Brian Candler wrote: > I also took the liberty of changing memcpy() calls to memmove(), since > the former has undefined behaviour when the destination and source > memory areas overlap. I should have said: my patch is to rancid-2.3.6 from Ubuntu 14.04. Looking at the CHANGES file from a later version, it looks like the memcpy() issue was fixed in 2.3.9 (It sure would be nice if there were a public repository for the rancid source, but I've not been able to find an official one) Regards, Brian Candler. From rod.hendricks at graduate.uwa.edu.au Wed Dec 16 10:49:46 2015 From: rod.hendricks at graduate.uwa.edu.au (Rod Hendricks) Date: Wed, 16 Dec 2015 18:49:46 +0800 Subject: [rancid] New device type Message-ID: Hi. I am really struggling with getting a new device type up and running. Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have an installation that is currently working against a test Cisco router, so I know the base install is all good. I have created a login script hmlogin (based off complogin, with session paginate commented out) I have created a perl script hirschmann.pm (based on ciscowlc.om). rancid.types.conf: hirschmann;script;rancid -t hirschmann hirschmann;login;hmlogin hirschmann;module;hirschmann hirschmann;inloop;hirschmann::inloop hirschmann;command;hirschmann::WriteTerm;show running-config I can run it directly with hmlogin -c"show running-config" 192.168.254.103 I get no errors running this, and I get the output expected. However, when I run the following: rancid -d -thirschmann 192.168.254.103 I get: loadtype: device type hirschmann loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf executing hmlogin -t 90 -c"show running-config" 192.168.254.103 PROMPT MATCH: HIT COMMAND:(Hirschmann Railswitch) #show running-config HIT COMMAND:(Hirschmann Railswitch) #show running-config 192.168.254.103: missed cmd(s): all commands 192.168.254.103: End of run not found 192.168.254.103: End of run not found ! -bash-4.2$ The .raw file has the full correct output of the show running-config. The .new file only has: !RANCID-CONTENT-TYPE: hirschmann ! I feel oh so close to getting this running! Appreciate any help that can be offered. Cheers, Rod. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rod.hendricks at graduate.uwa.edu.au Wed Dec 16 14:50:12 2015 From: rod.hendricks at graduate.uwa.edu.au (Rod Hendricks) Date: Wed, 16 Dec 2015 22:50:12 +0800 Subject: [rancid] New device type In-Reply-To: References: Message-ID: Thanks Dan. Your explanation makes sense. Which script normally defines this delimiter? I would be happy to settle for the moment in just short-circuiting this delimiter check so I can I can get the job running. Have included device config below. Don't worry about the passwords - its a test unit with factory default config. Escape character is '^]'. Copyright (c) 2004-2015 Hirschmann Automation and Control GmbH All rights reserved Railswitch Release L2E-08.0.09 (Build date 2015-04-06 21:32) System Name: RS-F602F7 Mgmt-IP : 192.168.254.103 Base-MAC : 00:80:63:F6:02:F7 System Time: 2015-01-02 10:11:52 (Hirschmann Railswitch) User:admin Password:******* NOTE: Enter '?' for Command Help. Command help displays all options that are valid for the 'normal' command forms of that particular mode. For a list of valid 'no' command forms for that mode, enter the help command 'no ?'. For the syntax of a particular command form, please consult the documentation. (Hirschmann Railswitch) >enable (Hirschmann Railswitch) # (Hirschmann Railswitch) #show running-config !Current Configuration: ! !Parameter string escape handling \, 1 !Characters to be preceded with escape char (\): \, !, ", ', ? !System Description "Hirschmann Railswitch" !System Version L2E-08.0.09 Build: 2015-04-06 21:32 vlan database exit configure ! interface 1/1 no auto-negotiate exit interface 1/2 no auto-negotiate exit interface 1/3 exit interface 1/4 exit interface 1/5 exit interface 1/6 exit interface 1/7 exit interface 1/8 exit !Address Conflict Detection !Bridge Address Learning !Bridge Fast Link Detection !Maximum size of frame (packet size) !Bridge Address Relearn Detection !Bridge Address Relearn Threshold !Bridge Duplex Mismatch Detection !Bridge Hash Optimizing !Service Mode !VLAN Learning !Hirschmann DHCP Relay !Hirschmann Device Status !DIP Switch Admin State !Ethernet/IP !Power over Ethernet (IEEE 802.3af) !Selftest !Skip ACA on boot !Hirschmann HIPER Ring ! configuration determined by DIP switch hiper-ring mode ring-switch hiper-ring port primary 1/1 hiper-ring port secondary 1/2 !LLDP (IEEE802.1AB Link Layer Discovery Protocol) !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) !No MRP domains exist. !MAC/IP Based Port Security !ProfinetIO !Hirschmann Precision Time Protocol (PTP, IEEE 1588) !Hirschmann Ring Coupling !Note: master/slave (also for single) part of configuration determined by ! DIP switch (cannot be overridden by management) ring-coupling operation on !Hirschmann Signal Contacts !Hirschmann SNMP Access Control !SNTP !Hirschmann Broadcast Limiter !Hirschmann Temperature Limit Settings users passwd admin :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: users snmpv3 authentication admin md5 users passwd user :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: users snmpv3 authentication user md5 lineconfig exit no spanning-tree !IGMP Snooping exit (Hirschmann Railswitch) #logoutConnection closed by foreign host. -bash-4.2$ Cheers, Rod. On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson wrote: > It sounds like it's not finding an end-of-configuration delimiter. I'm not > familiar with the device type, but for Cisco devices, it usually looks for > the keyword "end" by itself at the end of "show run" to determine whether > or not it has successfully pulled the configuration. Other device types > sometimes look for more than 5 lines of config, etc. Without knowing more > about the configuration file format, I can't say which method (if either) > would work for your situation. > > On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks < > rod.hendricks at graduate.uwa.edu.au> wrote: > >> Hi. >> >> I am really struggling with getting a new device type up and running. >> >> Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have an >> installation that is currently working against a test Cisco router, so I >> know the base install is all good. >> >> I have created a login script hmlogin (based off complogin, with session >> paginate commented out) >> I have created a perl script hirschmann.pm (based on ciscowlc.om). >> >> rancid.types.conf: >> hirschmann;script;rancid -t hirschmann >> hirschmann;login;hmlogin >> hirschmann;module;hirschmann >> hirschmann;inloop;hirschmann::inloop >> hirschmann;command;hirschmann::WriteTerm;show running-config >> >> I can run it directly with hmlogin -c"show running-config" 192.168.254.103 >> I get no errors running this, and I get the output expected. >> >> However, when I run the following: rancid -d -thirschmann 192.168.254.103 >> I get: >> loadtype: device type hirschmann >> loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf >> executing hmlogin -t 90 -c"show running-config" 192.168.254.103 >> PROMPT MATCH: >> HIT COMMAND:(Hirschmann Railswitch) #show running-config >> HIT COMMAND:(Hirschmann Railswitch) #show running-config >> 192.168.254.103: missed cmd(s): all commands >> 192.168.254.103: End of run not found >> 192.168.254.103: End of run not found >> ! >> -bash-4.2$ >> >> The .raw file has the full correct output of the show running-config. >> The .new file only has: >> !RANCID-CONTENT-TYPE: hirschmann >> ! >> >> I feel oh so close to getting this running! Appreciate any help that can >> be offered. >> >> Cheers, >> Rod. >> >> _______________________________________________ >> 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 harsha.s.aryan at gmail.com Wed Dec 16 07:50:12 2015 From: harsha.s.aryan at gmail.com (Harsha S Aryan) Date: Wed, 16 Dec 2015 13:20:12 +0530 Subject: [rancid] error in log file Message-ID: hi i am getting error while running rancid rancid at Nagios:/var/log/rancid$ /usr/bin/rancid-run rancid at Nagios:/var/log/rancid$ cat routers.20151216.131929 starting: Wed Dec 16 13:19:29 IST 2015 cvs [status aborted]: cannot open file 10.172.60.10 for comparing: Permission denied Trying to get all of the configs. 10.172.60.10 jlogin error: Error: password file (/var/lib/rancid/.cloginrc) does not exist 10.172.60.10: missed cmd(s): show system boot-messages,show version detail,show system core-dumps,show configuration,show chassis hardware detail,show chassis environment,show chassis cfeb,show chassis scb,show chassis firmware,show chassis feb,show chassis feb detail,show chassis clocks,show chassis alarms,show chassis ssb,show chassis routing-engine,show chassis fpc detail,show chassis sfm detail,show system license 10.172.60.10: End of run not found # ===================================== Getting missed routers: round 1. 10.172.60.10 jlogin error: Error: password file (/var/lib/rancid/.cloginrc) does not exist 10.172.60.10: missed cmd(s): show chassis feb,show chassis clocks,show configuration,show system core-dumps,show chassis sfm detail,show chassis environment,show chassis feb detail,show version detail,show chassis routing-engine,show chassis cfeb,show chassis ssb,show chassis hardware detail,show system license,show chassis fpc detail,show chassis alarms,show chassis firmware,show chassis scb,show system boot-messages 10.172.60.10: End of run not found # ===================================== Getting missed routers: round 2. 10.172.60.10 jlogin error: Error: password file (/var/lib/rancid/.cloginrc) does not exist 10.172.60.10: missed cmd(s): show chassis cfeb,show system core-dumps,show version detail,show chassis sfm detail,show chassis routing-engine,show chassis environment,show chassis fpc detail,show chassis scb,show chassis ssb,show chassis feb detail,show system boot-messages,show chassis firmware,show configuration,show chassis hardware detail,show chassis clocks,show system license,show chassis alarms,show chassis feb 10.172.60.10: End of run not found # ===================================== Getting missed routers: round 3. 10.172.60.10 jlogin error: Error: password file (/var/lib/rancid/.cloginrc) does not exist 10.172.60.10: missed cmd(s): show system license,show system boot-messages,show version detail,show chassis scb,show configuration,show system core-dumps,show chassis firmware,show chassis alarms,show chassis routing-engine,show chassis feb detail,show chassis ssb,show chassis feb,show chassis hardware detail,show chassis sfm detail,show chassis cfeb,show chassis clocks,show chassis environment,show chassis fpc detail 10.172.60.10: End of run not found # ===================================== Getting missed routers: round 4. 10.172.60.10 jlogin error: Error: password file (/var/lib/rancid/.cloginrc) does not exist 10.172.60.10: missed cmd(s): show chassis hardware detail,show chassis environment,show version detail,show system boot-messages,show chassis scb,show chassis routing-engine,show system license,show chassis firmware,show chassis feb detail,show chassis fpc detail,show chassis alarms,show chassis sfm detail,show chassis clocks,show chassis feb,show chassis ssb,show configuration,show chassis cfeb,show system core-dumps 10.172.60.10: End of run not found # cvs diff: Diffing . cvs diff: Diffing configs cvs commit: Examining . cvs commit: Examining configs ending: Wed Dec 16 13:19:30 IST 2015 can any one help me -- Rehards, Harsha -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.w.anderson at gmail.com Wed Dec 16 15:07:29 2015 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Wed, 16 Dec 2015 10:07:29 -0500 Subject: [rancid] New device type In-Reply-To: References: Message-ID: ShowConfig in ciscowlc.pm uses the line counting method. while (<$INPUT>) { <---SNIP---> $linecnt++; <---SNIP---> # WLC lacks a definitive "end of config" marker. if ($linecnt > 5) { $found_end = 1; return(1); } return(0); WriteTerm in ios.pm looks for the "end" keyword. On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks < rod.hendricks at graduate.uwa.edu.au> wrote: > Thanks Dan. > > Your explanation makes sense. Which script normally defines this > delimiter? I would be happy to settle for the moment in just > short-circuiting this delimiter check so I can I can get the job running. > Have included device config below. Don't worry about the passwords - its a > test unit with factory default config. > > Escape character is '^]'. > > > > Copyright (c) 2004-2015 Hirschmann Automation and Control GmbH > > All rights reserved > > Railswitch Release L2E-08.0.09 > > (Build date 2015-04-06 21:32) > > > > System Name: RS-F602F7 > Mgmt-IP : 192.168.254.103 > Base-MAC : 00:80:63:F6:02:F7 > System Time: 2015-01-02 10:11:52 > > > > (Hirschmann Railswitch) > User:admin > Password:******* > > NOTE: Enter '?' for Command Help. Command help displays all options > that are valid for the 'normal' command forms of that particular > mode. > For a list of valid 'no' command forms for that mode, enter the help > command 'no ?'. For the syntax of a particular command form, please > consult the documentation. > > > (Hirschmann Railswitch) >enable > > (Hirschmann Railswitch) # > (Hirschmann Railswitch) #show running-config > > !Current Configuration: > ! > !Parameter string escape handling \, 1 > !Characters to be preceded with escape char (\): \, !, ", ', ? > > !System Description "Hirschmann Railswitch" > !System Version L2E-08.0.09 Build: 2015-04-06 21:32 > > vlan database > exit > > > configure > > ! > > > interface 1/1 > no auto-negotiate > > exit > > > interface 1/2 > no auto-negotiate > > exit > > > interface 1/3 > > exit > > > interface 1/4 > > exit > > > interface 1/5 > > exit > > > interface 1/6 > > exit > > > interface 1/7 > > exit > > > interface 1/8 > > exit > > > !Address Conflict Detection > > !Bridge Address Learning > > !Bridge Fast Link Detection > > !Maximum size of frame (packet size) > > !Bridge Address Relearn Detection > > !Bridge Address Relearn Threshold > > !Bridge Duplex Mismatch Detection > > !Bridge Hash Optimizing > > !Service Mode > > !VLAN Learning > > > !Hirschmann DHCP Relay > > !Hirschmann Device Status > > > !DIP Switch Admin State > > > !Ethernet/IP > > !Power over Ethernet (IEEE 802.3af) > !Selftest > > !Skip ACA on boot > > > !Hirschmann HIPER Ring > ! configuration determined by DIP switch > hiper-ring mode ring-switch > hiper-ring port primary 1/1 > hiper-ring port secondary 1/2 > > !LLDP (IEEE802.1AB Link Layer Discovery Protocol) > > !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) > !No MRP domains exist. > > !MAC/IP Based Port Security > > > !ProfinetIO > > > !Hirschmann Precision Time Protocol (PTP, IEEE 1588) > > !Hirschmann Ring Coupling > !Note: master/slave (also for single) part of configuration determined by > ! DIP switch (cannot be overridden by management) > ring-coupling operation on > > !Hirschmann Signal Contacts > > > !Hirschmann SNMP Access Control > > > !SNTP > > > !Hirschmann Broadcast Limiter > > > !Hirschmann Temperature Limit Settings > > users passwd admin > :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: > users snmpv3 authentication admin md5 > users passwd user > :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: > users snmpv3 authentication user md5 > > lineconfig > exit > > no spanning-tree > > !IGMP Snooping > exit > > > (Hirschmann Railswitch) #logoutConnection closed by foreign host. > -bash-4.2$ > > Cheers, > Rod. > > On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson > wrote: > >> It sounds like it's not finding an end-of-configuration delimiter. I'm >> not familiar with the device type, but for Cisco devices, it usually looks >> for the keyword "end" by itself at the end of "show run" to determine >> whether or not it has successfully pulled the configuration. Other device >> types sometimes look for more than 5 lines of config, etc. Without knowing >> more about the configuration file format, I can't say which method (if >> either) would work for your situation. >> >> On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks < >> rod.hendricks at graduate.uwa.edu.au> wrote: >> >>> Hi. >>> >>> I am really struggling with getting a new device type up and running. >>> >>> Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have an >>> installation that is currently working against a test Cisco router, so I >>> know the base install is all good. >>> >>> I have created a login script hmlogin (based off complogin, with session >>> paginate commented out) >>> I have created a perl script hirschmann.pm (based on ciscowlc.om). >>> >>> rancid.types.conf: >>> hirschmann;script;rancid -t hirschmann >>> hirschmann;login;hmlogin >>> hirschmann;module;hirschmann >>> hirschmann;inloop;hirschmann::inloop >>> hirschmann;command;hirschmann::WriteTerm;show running-config >>> >>> I can run it directly with hmlogin -c"show running-config" >>> 192.168.254.103 >>> I get no errors running this, and I get the output expected. >>> >>> However, when I run the following: rancid -d -thirschmann 192.168.254.103 >>> I get: >>> loadtype: device type hirschmann >>> loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf >>> executing hmlogin -t 90 -c"show running-config" 192.168.254.103 >>> PROMPT MATCH: >>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>> 192.168.254.103: missed cmd(s): all commands >>> 192.168.254.103: End of run not found >>> 192.168.254.103: End of run not found >>> ! >>> -bash-4.2$ >>> >>> The .raw file has the full correct output of the show running-config. >>> The .new file only has: >>> !RANCID-CONTENT-TYPE: hirschmann >>> ! >>> >>> I feel oh so close to getting this running! Appreciate any help that >>> can be offered. >>> >>> Cheers, >>> Rod. >>> >>> _______________________________________________ >>> Rancid-discuss mailing list >>> Rancid-discuss at shrubbery.net >>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>> >> >> >> >> -- >> Dan >> > > > _______________________________________________ > 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 dan.w.anderson at gmail.com Wed Dec 16 15:10:21 2015 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Wed, 16 Dec 2015 10:10:21 -0500 Subject: [rancid] error in log file In-Reply-To: References: Message-ID: It appears that your .cloginrc file isn't correct or you're not running RANCID as the correct user. I suggest reading the README file that comes with the distribution. The relevant portion: 4) Put .cloginrc in the home directory of the user who will run rancid. .cloginrc must be not be readable/writable/executable by "others", i.e.: .cloginrc must be mode 0600 or 0640. 5) Modify .cloginrc. Test to make sure that you can log into every router. Note: the juniper user you use *must* log into a cli shell (which is the default on a juniper). See the file cloginrc.sample, located in (/share/rancid), for examples and good starting point. Also take a look at the cloginrc manual page, 'man -M /man cloginrc'. On Wed, Dec 16, 2015 at 2:50 AM, Harsha S Aryan wrote: > > hi i am getting error while running rancid > > rancid at Nagios:/var/log/rancid$ /usr/bin/rancid-run > rancid at Nagios:/var/log/rancid$ cat routers.20151216.131929 > starting: Wed Dec 16 13:19:29 IST 2015 > > cvs [status aborted]: cannot open file 10.172.60.10 for comparing: > Permission denied > > > Trying to get all of the configs. > 10.172.60.10 jlogin error: Error: password file > (/var/lib/rancid/.cloginrc) does not exist > 10.172.60.10: missed cmd(s): show system boot-messages,show version > detail,show system core-dumps,show configuration,show chassis hardware > detail,show chassis environment,show chassis cfeb,show chassis scb,show > chassis firmware,show chassis feb,show chassis feb detail,show chassis > clocks,show chassis alarms,show chassis ssb,show chassis > routing-engine,show chassis fpc detail,show chassis sfm detail,show system > license > 10.172.60.10: End of run not found > # > ===================================== > Getting missed routers: round 1. > 10.172.60.10 jlogin error: Error: password file > (/var/lib/rancid/.cloginrc) does not exist > 10.172.60.10: missed cmd(s): show chassis feb,show chassis clocks,show > configuration,show system core-dumps,show chassis sfm detail,show chassis > environment,show chassis feb detail,show version detail,show chassis > routing-engine,show chassis cfeb,show chassis ssb,show chassis hardware > detail,show system license,show chassis fpc detail,show chassis alarms,show > chassis firmware,show chassis scb,show system boot-messages > 10.172.60.10: End of run not found > # > ===================================== > Getting missed routers: round 2. > 10.172.60.10 jlogin error: Error: password file > (/var/lib/rancid/.cloginrc) does not exist > 10.172.60.10: missed cmd(s): show chassis cfeb,show system > core-dumps,show version detail,show chassis sfm detail,show chassis > routing-engine,show chassis environment,show chassis fpc detail,show > chassis scb,show chassis ssb,show chassis feb detail,show system > boot-messages,show chassis firmware,show configuration,show chassis > hardware detail,show chassis clocks,show system license,show chassis > alarms,show chassis feb > 10.172.60.10: End of run not found > # > ===================================== > Getting missed routers: round 3. > 10.172.60.10 jlogin error: Error: password file > (/var/lib/rancid/.cloginrc) does not exist > 10.172.60.10: missed cmd(s): show system license,show system > boot-messages,show version detail,show chassis scb,show configuration,show > system core-dumps,show chassis firmware,show chassis alarms,show chassis > routing-engine,show chassis feb detail,show chassis ssb,show chassis > feb,show chassis hardware detail,show chassis sfm detail,show chassis > cfeb,show chassis clocks,show chassis environment,show chassis fpc detail > 10.172.60.10: End of run not found > # > ===================================== > Getting missed routers: round 4. > 10.172.60.10 jlogin error: Error: password file > (/var/lib/rancid/.cloginrc) does not exist > 10.172.60.10: missed cmd(s): show chassis hardware detail,show chassis > environment,show version detail,show system boot-messages,show chassis > scb,show chassis routing-engine,show system license,show chassis > firmware,show chassis feb detail,show chassis fpc detail,show chassis > alarms,show chassis sfm detail,show chassis clocks,show chassis feb,show > chassis ssb,show configuration,show chassis cfeb,show system core-dumps > 10.172.60.10: End of run not found > # > > cvs diff: Diffing . > cvs diff: Diffing configs > cvs commit: Examining . > cvs commit: Examining configs > > ending: Wed Dec 16 13:19:30 IST 2015 > > can any one help me > > > -- > Rehards, > Harsha > > _______________________________________________ > 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 dan.w.anderson at gmail.com Wed Dec 16 14:21:36 2015 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Wed, 16 Dec 2015 09:21:36 -0500 Subject: [rancid] New device type In-Reply-To: References: Message-ID: It sounds like it's not finding an end-of-configuration delimiter. I'm not familiar with the device type, but for Cisco devices, it usually looks for the keyword "end" by itself at the end of "show run" to determine whether or not it has successfully pulled the configuration. Other device types sometimes look for more than 5 lines of config, etc. Without knowing more about the configuration file format, I can't say which method (if either) would work for your situation. On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks < rod.hendricks at graduate.uwa.edu.au> wrote: > Hi. > > I am really struggling with getting a new device type up and running. > > Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have an > installation that is currently working against a test Cisco router, so I > know the base install is all good. > > I have created a login script hmlogin (based off complogin, with session > paginate commented out) > I have created a perl script hirschmann.pm (based on ciscowlc.om). > > rancid.types.conf: > hirschmann;script;rancid -t hirschmann > hirschmann;login;hmlogin > hirschmann;module;hirschmann > hirschmann;inloop;hirschmann::inloop > hirschmann;command;hirschmann::WriteTerm;show running-config > > I can run it directly with hmlogin -c"show running-config" 192.168.254.103 > I get no errors running this, and I get the output expected. > > However, when I run the following: rancid -d -thirschmann 192.168.254.103 > I get: > loadtype: device type hirschmann > loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf > executing hmlogin -t 90 -c"show running-config" 192.168.254.103 > PROMPT MATCH: > HIT COMMAND:(Hirschmann Railswitch) #show running-config > HIT COMMAND:(Hirschmann Railswitch) #show running-config > 192.168.254.103: missed cmd(s): all commands > 192.168.254.103: End of run not found > 192.168.254.103: End of run not found > ! > -bash-4.2$ > > The .raw file has the full correct output of the show running-config. > The .new file only has: > !RANCID-CONTENT-TYPE: hirschmann > ! > > I feel oh so close to getting this running! Appreciate any help that can > be offered. > > Cheers, > Rod. > > _______________________________________________ > 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 harsha.s.aryan at gmail.com Wed Dec 16 15:51:29 2015 From: harsha.s.aryan at gmail.com (Harsha S Aryan) Date: Wed, 16 Dec 2015 21:21:29 +0530 Subject: [rancid] error in log file In-Reply-To: References: Message-ID: Hi Thanks a lot issue got fixed , I am facing other issue... When rancid trigger mail config backup is coming in mail body. How can I get it as mail attachment. On Dec 16, 2015 8:40 PM, "Dan Anderson" wrote: > It appears that your .cloginrc file isn't correct or you're not running > RANCID as the correct user. I suggest reading the README file that comes > with the distribution. > > The relevant portion: > > 4) Put .cloginrc in the home directory of the user who will run rancid. > .cloginrc must be not be readable/writable/executable by "others", > i.e.: .cloginrc must be mode 0600 or 0640. > > 5) Modify .cloginrc. > > Test to make sure that you can log into every router. > > Note: the juniper user you use *must* log into a cli shell (which > is the default on a juniper). > > See the file cloginrc.sample, located in > (/share/rancid), > for examples and good starting point. Also take a look at the cloginrc > manual page, 'man -M /man cloginrc'. > > On Wed, Dec 16, 2015 at 2:50 AM, Harsha S Aryan > wrote: > >> >> hi i am getting error while running rancid >> >> rancid at Nagios:/var/log/rancid$ /usr/bin/rancid-run >> rancid at Nagios:/var/log/rancid$ cat routers.20151216.131929 >> starting: Wed Dec 16 13:19:29 IST 2015 >> >> cvs [status aborted]: cannot open file 10.172.60.10 for comparing: >> Permission denied >> >> >> Trying to get all of the configs. >> 10.172.60.10 jlogin error: Error: password file >> (/var/lib/rancid/.cloginrc) does not exist >> 10.172.60.10: missed cmd(s): show system boot-messages,show version >> detail,show system core-dumps,show configuration,show chassis hardware >> detail,show chassis environment,show chassis cfeb,show chassis scb,show >> chassis firmware,show chassis feb,show chassis feb detail,show chassis >> clocks,show chassis alarms,show chassis ssb,show chassis >> routing-engine,show chassis fpc detail,show chassis sfm detail,show system >> license >> 10.172.60.10: End of run not found >> # >> ===================================== >> Getting missed routers: round 1. >> 10.172.60.10 jlogin error: Error: password file >> (/var/lib/rancid/.cloginrc) does not exist >> 10.172.60.10: missed cmd(s): show chassis feb,show chassis clocks,show >> configuration,show system core-dumps,show chassis sfm detail,show chassis >> environment,show chassis feb detail,show version detail,show chassis >> routing-engine,show chassis cfeb,show chassis ssb,show chassis hardware >> detail,show system license,show chassis fpc detail,show chassis alarms,show >> chassis firmware,show chassis scb,show system boot-messages >> 10.172.60.10: End of run not found >> # >> ===================================== >> Getting missed routers: round 2. >> 10.172.60.10 jlogin error: Error: password file >> (/var/lib/rancid/.cloginrc) does not exist >> 10.172.60.10: missed cmd(s): show chassis cfeb,show system >> core-dumps,show version detail,show chassis sfm detail,show chassis >> routing-engine,show chassis environment,show chassis fpc detail,show >> chassis scb,show chassis ssb,show chassis feb detail,show system >> boot-messages,show chassis firmware,show configuration,show chassis >> hardware detail,show chassis clocks,show system license,show chassis >> alarms,show chassis feb >> 10.172.60.10: End of run not found >> # >> ===================================== >> Getting missed routers: round 3. >> 10.172.60.10 jlogin error: Error: password file >> (/var/lib/rancid/.cloginrc) does not exist >> 10.172.60.10: missed cmd(s): show system license,show system >> boot-messages,show version detail,show chassis scb,show configuration,show >> system core-dumps,show chassis firmware,show chassis alarms,show chassis >> routing-engine,show chassis feb detail,show chassis ssb,show chassis >> feb,show chassis hardware detail,show chassis sfm detail,show chassis >> cfeb,show chassis clocks,show chassis environment,show chassis fpc detail >> 10.172.60.10: End of run not found >> # >> ===================================== >> Getting missed routers: round 4. >> 10.172.60.10 jlogin error: Error: password file >> (/var/lib/rancid/.cloginrc) does not exist >> 10.172.60.10: missed cmd(s): show chassis hardware detail,show chassis >> environment,show version detail,show system boot-messages,show chassis >> scb,show chassis routing-engine,show system license,show chassis >> firmware,show chassis feb detail,show chassis fpc detail,show chassis >> alarms,show chassis sfm detail,show chassis clocks,show chassis feb,show >> chassis ssb,show configuration,show chassis cfeb,show system core-dumps >> 10.172.60.10: End of run not found >> # >> >> cvs diff: Diffing . >> cvs diff: Diffing configs >> cvs commit: Examining . >> cvs commit: Examining configs >> >> ending: Wed Dec 16 13:19:30 IST 2015 >> >> can any one help me >> >> >> -- >> Rehards, >> Harsha >> >> _______________________________________________ >> 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 rod.hendricks at graduate.uwa.edu.au Wed Dec 16 15:26:11 2015 From: rod.hendricks at graduate.uwa.edu.au (Rod Hendricks) Date: Wed, 16 Dec 2015 23:26:11 +0800 Subject: [rancid] New device type In-Reply-To: References: Message-ID: I don't fully understand the purpose of WriteTerm. But from what you are saying above, is my rancid.types.conf in my original post wrong? Should hirschmann;command;hirschmann::WriteTerm;show running-config in fact look like hirschmann;command;hirschmann::ShowConfig;show running-config ? If so, I guess I've messed that up by not understanding the significance of that keyword. Rancid server is on my work dev box - will try this out in 12hrs when i get back to the office. Thanks again. Cheers, Rod. On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson wrote: > ShowConfig in ciscowlc.pm uses the line counting method. > > while (<$INPUT>) { > <---SNIP---> > > $linecnt++; > <---SNIP---> > > # WLC lacks a definitive "end of config" marker. > if ($linecnt > 5) { > $found_end = 1; > return(1); > } > return(0); > > > WriteTerm in ios.pm looks for the "end" keyword. > > On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks < > rod.hendricks at graduate.uwa.edu.au> wrote: > >> Thanks Dan. >> >> Your explanation makes sense. Which script normally defines this >> delimiter? I would be happy to settle for the moment in just >> short-circuiting this delimiter check so I can I can get the job running. >> Have included device config below. Don't worry about the passwords - its a >> test unit with factory default config. >> >> Escape character is '^]'. >> >> >> >> Copyright (c) 2004-2015 Hirschmann Automation and Control GmbH >> >> All rights reserved >> >> Railswitch Release L2E-08.0.09 >> >> (Build date 2015-04-06 21:32) >> >> >> >> System Name: RS-F602F7 >> Mgmt-IP : 192.168.254.103 >> Base-MAC : 00:80:63:F6:02:F7 >> System Time: 2015-01-02 10:11:52 >> >> >> >> (Hirschmann Railswitch) >> User:admin >> Password:******* >> >> NOTE: Enter '?' for Command Help. Command help displays all options >> that are valid for the 'normal' command forms of that particular >> mode. >> For a list of valid 'no' command forms for that mode, enter the help >> command 'no ?'. For the syntax of a particular command form, please >> consult the documentation. >> >> >> (Hirschmann Railswitch) >enable >> >> (Hirschmann Railswitch) # >> (Hirschmann Railswitch) #show running-config >> >> !Current Configuration: >> ! >> !Parameter string escape handling \, 1 >> !Characters to be preceded with escape char (\): \, !, ", ', ? >> >> !System Description "Hirschmann Railswitch" >> !System Version L2E-08.0.09 Build: 2015-04-06 21:32 >> >> vlan database >> exit >> >> >> configure >> >> ! >> >> >> interface 1/1 >> no auto-negotiate >> >> exit >> >> >> interface 1/2 >> no auto-negotiate >> >> exit >> >> >> interface 1/3 >> >> exit >> >> >> interface 1/4 >> >> exit >> >> >> interface 1/5 >> >> exit >> >> >> interface 1/6 >> >> exit >> >> >> interface 1/7 >> >> exit >> >> >> interface 1/8 >> >> exit >> >> >> !Address Conflict Detection >> >> !Bridge Address Learning >> >> !Bridge Fast Link Detection >> >> !Maximum size of frame (packet size) >> >> !Bridge Address Relearn Detection >> >> !Bridge Address Relearn Threshold >> >> !Bridge Duplex Mismatch Detection >> >> !Bridge Hash Optimizing >> >> !Service Mode >> >> !VLAN Learning >> >> >> !Hirschmann DHCP Relay >> >> !Hirschmann Device Status >> >> >> !DIP Switch Admin State >> >> >> !Ethernet/IP >> >> !Power over Ethernet (IEEE 802.3af) >> !Selftest >> >> !Skip ACA on boot >> >> >> !Hirschmann HIPER Ring >> ! configuration determined by DIP switch >> hiper-ring mode ring-switch >> hiper-ring port primary 1/1 >> hiper-ring port secondary 1/2 >> >> !LLDP (IEEE802.1AB Link Layer Discovery Protocol) >> >> !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) >> !No MRP domains exist. >> >> !MAC/IP Based Port Security >> >> >> !ProfinetIO >> >> >> !Hirschmann Precision Time Protocol (PTP, IEEE 1588) >> >> !Hirschmann Ring Coupling >> !Note: master/slave (also for single) part of configuration determined by >> ! DIP switch (cannot be overridden by management) >> ring-coupling operation on >> >> !Hirschmann Signal Contacts >> >> >> !Hirschmann SNMP Access Control >> >> >> !SNTP >> >> >> !Hirschmann Broadcast Limiter >> >> >> !Hirschmann Temperature Limit Settings >> >> users passwd admin >> :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: >> users snmpv3 authentication admin md5 >> users passwd user >> :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: >> users snmpv3 authentication user md5 >> >> lineconfig >> exit >> >> no spanning-tree >> >> !IGMP Snooping >> exit >> >> >> (Hirschmann Railswitch) #logoutConnection closed by foreign host. >> -bash-4.2$ >> >> Cheers, >> Rod. >> >> On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson >> wrote: >> >>> It sounds like it's not finding an end-of-configuration delimiter. I'm >>> not familiar with the device type, but for Cisco devices, it usually looks >>> for the keyword "end" by itself at the end of "show run" to determine >>> whether or not it has successfully pulled the configuration. Other device >>> types sometimes look for more than 5 lines of config, etc. Without knowing >>> more about the configuration file format, I can't say which method (if >>> either) would work for your situation. >>> >>> On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks < >>> rod.hendricks at graduate.uwa.edu.au> wrote: >>> >>>> Hi. >>>> >>>> I am really struggling with getting a new device type up and running. >>>> >>>> Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have >>>> an installation that is currently working against a test Cisco router, so I >>>> know the base install is all good. >>>> >>>> I have created a login script hmlogin (based off complogin, with >>>> session paginate commented out) >>>> I have created a perl script hirschmann.pm (based on ciscowlc.om). >>>> >>>> rancid.types.conf: >>>> hirschmann;script;rancid -t hirschmann >>>> hirschmann;login;hmlogin >>>> hirschmann;module;hirschmann >>>> hirschmann;inloop;hirschmann::inloop >>>> hirschmann;command;hirschmann::WriteTerm;show running-config >>>> >>>> I can run it directly with hmlogin -c"show running-config" >>>> 192.168.254.103 >>>> I get no errors running this, and I get the output expected. >>>> >>>> However, when I run the following: rancid -d -thirschmann >>>> 192.168.254.103 >>>> I get: >>>> loadtype: device type hirschmann >>>> loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf >>>> executing hmlogin -t 90 -c"show running-config" 192.168.254.103 >>>> PROMPT MATCH: >>>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>>> 192.168.254.103: missed cmd(s): all commands >>>> 192.168.254.103: End of run not found >>>> 192.168.254.103: End of run not found >>>> ! >>>> -bash-4.2$ >>>> >>>> The .raw file has the full correct output of the show running-config. >>>> The .new file only has: >>>> !RANCID-CONTENT-TYPE: hirschmann >>>> ! >>>> >>>> I feel oh so close to getting this running! Appreciate any help that >>>> can be offered. >>>> >>>> Cheers, >>>> Rod. >>>> >>>> _______________________________________________ >>>> Rancid-discuss mailing list >>>> Rancid-discuss at shrubbery.net >>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>>> >>> >>> >>> >>> -- >>> Dan >>> >> >> >> _______________________________________________ >> 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 dan.w.anderson at gmail.com Wed Dec 16 15:57:40 2015 From: dan.w.anderson at gmail.com (Dan Anderson) Date: Wed, 16 Dec 2015 10:57:40 -0500 Subject: [rancid] New device type In-Reply-To: References: Message-ID: That field is basically a call to a subroutine within the module so if you copied ciscowlc.pm, you'd need to use ShowConfig as WriteTerm doesn't exist in that module. On Wed, Dec 16, 2015 at 10:26 AM, Rod Hendricks < rod.hendricks at graduate.uwa.edu.au> wrote: > I don't fully understand the purpose of WriteTerm. But from what you are > saying above, is my rancid.types.conf in my original post wrong? Should > > hirschmann;command;hirschmann::WriteTerm;show running-config > > in fact look like > > hirschmann;command;hirschmann::ShowConfig;show running-config > > ? > If so, I guess I've messed that up by not understanding the significance > of that keyword. Rancid server is on my work dev box - will try this out > in 12hrs when i get back to the office. > > Thanks again. > > Cheers, > Rod. > > On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson > wrote: > >> ShowConfig in ciscowlc.pm uses the line counting method. >> >> while (<$INPUT>) { >> <---SNIP---> >> >> $linecnt++; >> <---SNIP---> >> >> # WLC lacks a definitive "end of config" marker. >> if ($linecnt > 5) { >> $found_end = 1; >> return(1); >> } >> return(0); >> >> >> WriteTerm in ios.pm looks for the "end" keyword. >> >> On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks < >> rod.hendricks at graduate.uwa.edu.au> wrote: >> >>> Thanks Dan. >>> >>> Your explanation makes sense. Which script normally defines this >>> delimiter? I would be happy to settle for the moment in just >>> short-circuiting this delimiter check so I can I can get the job running. >>> Have included device config below. Don't worry about the passwords - its a >>> test unit with factory default config. >>> >>> Escape character is '^]'. >>> >>> >>> >>> Copyright (c) 2004-2015 Hirschmann Automation and Control GmbH >>> >>> All rights reserved >>> >>> Railswitch Release L2E-08.0.09 >>> >>> (Build date 2015-04-06 21:32) >>> >>> >>> >>> System Name: RS-F602F7 >>> Mgmt-IP : 192.168.254.103 >>> Base-MAC : 00:80:63:F6:02:F7 >>> System Time: 2015-01-02 10:11:52 >>> >>> >>> >>> (Hirschmann Railswitch) >>> User:admin >>> Password:******* >>> >>> NOTE: Enter '?' for Command Help. Command help displays all options >>> that are valid for the 'normal' command forms of that particular >>> mode. >>> For a list of valid 'no' command forms for that mode, enter the >>> help >>> command 'no ?'. For the syntax of a particular command form, >>> please >>> consult the documentation. >>> >>> >>> (Hirschmann Railswitch) >enable >>> >>> (Hirschmann Railswitch) # >>> (Hirschmann Railswitch) #show running-config >>> >>> !Current Configuration: >>> ! >>> !Parameter string escape handling \, 1 >>> !Characters to be preceded with escape char (\): \, !, ", ', ? >>> >>> !System Description "Hirschmann Railswitch" >>> !System Version L2E-08.0.09 Build: 2015-04-06 21:32 >>> >>> vlan database >>> exit >>> >>> >>> configure >>> >>> ! >>> >>> >>> interface 1/1 >>> no auto-negotiate >>> >>> exit >>> >>> >>> interface 1/2 >>> no auto-negotiate >>> >>> exit >>> >>> >>> interface 1/3 >>> >>> exit >>> >>> >>> interface 1/4 >>> >>> exit >>> >>> >>> interface 1/5 >>> >>> exit >>> >>> >>> interface 1/6 >>> >>> exit >>> >>> >>> interface 1/7 >>> >>> exit >>> >>> >>> interface 1/8 >>> >>> exit >>> >>> >>> !Address Conflict Detection >>> >>> !Bridge Address Learning >>> >>> !Bridge Fast Link Detection >>> >>> !Maximum size of frame (packet size) >>> >>> !Bridge Address Relearn Detection >>> >>> !Bridge Address Relearn Threshold >>> >>> !Bridge Duplex Mismatch Detection >>> >>> !Bridge Hash Optimizing >>> >>> !Service Mode >>> >>> !VLAN Learning >>> >>> >>> !Hirschmann DHCP Relay >>> >>> !Hirschmann Device Status >>> >>> >>> !DIP Switch Admin State >>> >>> >>> !Ethernet/IP >>> >>> !Power over Ethernet (IEEE 802.3af) >>> !Selftest >>> >>> !Skip ACA on boot >>> >>> >>> !Hirschmann HIPER Ring >>> ! configuration determined by DIP switch >>> hiper-ring mode ring-switch >>> hiper-ring port primary 1/1 >>> hiper-ring port secondary 1/2 >>> >>> !LLDP (IEEE802.1AB Link Layer Discovery Protocol) >>> >>> !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) >>> !No MRP domains exist. >>> >>> !MAC/IP Based Port Security >>> >>> >>> !ProfinetIO >>> >>> >>> !Hirschmann Precision Time Protocol (PTP, IEEE 1588) >>> >>> !Hirschmann Ring Coupling >>> !Note: master/slave (also for single) part of configuration determined by >>> ! DIP switch (cannot be overridden by management) >>> ring-coupling operation on >>> >>> !Hirschmann Signal Contacts >>> >>> >>> !Hirschmann SNMP Access Control >>> >>> >>> !SNTP >>> >>> >>> !Hirschmann Broadcast Limiter >>> >>> >>> !Hirschmann Temperature Limit Settings >>> >>> users passwd admin >>> :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: >>> users snmpv3 authentication admin md5 >>> users passwd user >>> :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: >>> users snmpv3 authentication user md5 >>> >>> lineconfig >>> exit >>> >>> no spanning-tree >>> >>> !IGMP Snooping >>> exit >>> >>> >>> (Hirschmann Railswitch) #logoutConnection closed by foreign host. >>> -bash-4.2$ >>> >>> Cheers, >>> Rod. >>> >>> On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson >> > wrote: >>> >>>> It sounds like it's not finding an end-of-configuration delimiter. I'm >>>> not familiar with the device type, but for Cisco devices, it usually looks >>>> for the keyword "end" by itself at the end of "show run" to determine >>>> whether or not it has successfully pulled the configuration. Other device >>>> types sometimes look for more than 5 lines of config, etc. Without knowing >>>> more about the configuration file format, I can't say which method (if >>>> either) would work for your situation. >>>> >>>> On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks < >>>> rod.hendricks at graduate.uwa.edu.au> wrote: >>>> >>>>> Hi. >>>>> >>>>> I am really struggling with getting a new device type up and running. >>>>> >>>>> Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have >>>>> an installation that is currently working against a test Cisco router, so I >>>>> know the base install is all good. >>>>> >>>>> I have created a login script hmlogin (based off complogin, with >>>>> session paginate commented out) >>>>> I have created a perl script hirschmann.pm (based on ciscowlc.om). >>>>> >>>>> rancid.types.conf: >>>>> hirschmann;script;rancid -t hirschmann >>>>> hirschmann;login;hmlogin >>>>> hirschmann;module;hirschmann >>>>> hirschmann;inloop;hirschmann::inloop >>>>> hirschmann;command;hirschmann::WriteTerm;show running-config >>>>> >>>>> I can run it directly with hmlogin -c"show running-config" >>>>> 192.168.254.103 >>>>> I get no errors running this, and I get the output expected. >>>>> >>>>> However, when I run the following: rancid -d -thirschmann >>>>> 192.168.254.103 >>>>> I get: >>>>> loadtype: device type hirschmann >>>>> loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf >>>>> executing hmlogin -t 90 -c"show running-config" 192.168.254.103 >>>>> PROMPT MATCH: >>>>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>>>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>>>> 192.168.254.103: missed cmd(s): all commands >>>>> 192.168.254.103: End of run not found >>>>> 192.168.254.103: End of run not found >>>>> ! >>>>> -bash-4.2$ >>>>> >>>>> The .raw file has the full correct output of the show running-config. >>>>> The .new file only has: >>>>> !RANCID-CONTENT-TYPE: hirschmann >>>>> ! >>>>> >>>>> I feel oh so close to getting this running! Appreciate any help that >>>>> can be offered. >>>>> >>>>> Cheers, >>>>> Rod. >>>>> >>>>> _______________________________________________ >>>>> Rancid-discuss mailing list >>>>> Rancid-discuss at shrubbery.net >>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>>>> >>>> >>>> >>>> >>>> -- >>>> Dan >>>> >>> >>> >>> _______________________________________________ >>> Rancid-discuss mailing list >>> Rancid-discuss at shrubbery.net >>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>> >> >> >> >> -- >> Dan >> > > > _______________________________________________ > 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 alan.mckinnon at gmail.com Wed Dec 16 16:28:00 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Wed, 16 Dec 2015 18:28:00 +0200 Subject: [rancid] New device type In-Reply-To: References: Message-ID: <56719110.9050306@gmail.com> On 16/12/2015 17:26, Rod Hendricks wrote: > I don't fully understand the purpose of WriteTerm. But from what you > are saying above, is my rancid.types.conf in my original post wrong? Should > > hirschmann;command;hirschmann::WriteTerm;show running-config > > in fact look like > > hirschmann;command;hirschmann::ShowConfig;show running-config In ancient times, Cisco stuff had a command "write term" which, I believe, outputted the config. A bizarre name, but that's what it was. The name persists to this day and you'll still find rancid scripts that run write term and/or show run. And you will find perl subs called WriteTerm() used by both commands for processing. The name of the sub can be changed if you also change all of it's callers. Cisco kit made anytime this millenium likely uses show run to dump the config, so use the command that is valid for your equipment. > > ? > If so, I guess I've messed that up by not understanding the significance > of that keyword. Rancid server is on my work dev box - will try this > out in 12hrs when i get back to the office. > > Thanks again. > > Cheers, > Rod. > > On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson > wrote: > > ShowConfig in ciscowlc.pm uses the line > counting method. > > while (<$INPUT>) { > <---SNIP---> > > $linecnt++; > <---SNIP---> > > # WLC lacks a definitive "end of config" marker. > if ($linecnt > 5) { > $found_end = 1; > return(1); > } > return(0); > > > WriteTerm in ios.pm looks for the "end" keyword. > > On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks > > wrote: > > Thanks Dan. > > Your explanation makes sense. Which script normally defines > this delimiter? I would be happy to settle for the moment in > just short-circuiting this delimiter check so I can I can get > the job running. Have included device config below. Don't > worry about the passwords - its a test unit with factory default > config. > > Escape character is '^]'. > > > > Copyright (c) 2004-2015 Hirschmann Automation and > Control GmbH > > All rights reserved > > Railswitch Release L2E-08.0.09 > > (Build date 2015-04-06 21:32) > > > > System Name: RS-F602F7 > Mgmt-IP : 192.168.254.103 > Base-MAC : 00:80:63:F6:02:F7 > System Time: 2015-01-02 10:11:52 > > > > (Hirschmann Railswitch) > User:admin > Password:******* > > NOTE: Enter '?' for Command Help. Command help displays all options > that are valid for the 'normal' command forms of that > particular mode. > For a list of valid 'no' command forms for that mode, > enter the help > command 'no ?'. For the syntax of a particular command > form, please > consult the documentation. > > > (Hirschmann Railswitch) >enable > > (Hirschmann Railswitch) # > (Hirschmann Railswitch) #show running-config > > !Current Configuration: > ! > !Parameter string escape handling \, 1 > !Characters to be preceded with escape char (\): \, !, ", ', ? > > !System Description "Hirschmann Railswitch" > !System Version L2E-08.0.09 Build: 2015-04-06 21:32 > > vlan database > exit > > > configure > > ! > > > interface 1/1 > no auto-negotiate > > exit > > > interface 1/2 > no auto-negotiate > > exit > > > interface 1/3 > > exit > > > interface 1/4 > > exit > > > interface 1/5 > > exit > > > interface 1/6 > > exit > > > interface 1/7 > > exit > > > interface 1/8 > > exit > > > !Address Conflict Detection > > !Bridge Address Learning > > !Bridge Fast Link Detection > > !Maximum size of frame (packet size) > > !Bridge Address Relearn Detection > > !Bridge Address Relearn Threshold > > !Bridge Duplex Mismatch Detection > > !Bridge Hash Optimizing > > !Service Mode > > !VLAN Learning > > > !Hirschmann DHCP Relay > > !Hirschmann Device Status > > > !DIP Switch Admin State > > > !Ethernet/IP > > !Power over Ethernet (IEEE 802.3af) > !Selftest > > !Skip ACA on boot > > > !Hirschmann HIPER Ring > ! configuration determined by DIP switch > hiper-ring mode ring-switch > hiper-ring port primary 1/1 > hiper-ring port secondary 1/2 > > !LLDP (IEEE802.1AB Link Layer Discovery Protocol) > > !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) > !No MRP domains exist. > > !MAC/IP Based Port Security > > > !ProfinetIO > > > !Hirschmann Precision Time Protocol (PTP, IEEE 1588) > > !Hirschmann Ring Coupling > !Note: master/slave (also for single) part of configuration > determined by > ! DIP switch (cannot be overridden by management) > ring-coupling operation on > > !Hirschmann Signal Contacts > > > !Hirschmann SNMP Access Control > > > !SNTP > > > !Hirschmann Broadcast Limiter > > > !Hirschmann Temperature Limit Settings > > users passwd admin > :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: > users snmpv3 authentication admin md5 > users passwd user > :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: > users snmpv3 authentication user md5 > > lineconfig > exit > > no spanning-tree > > !IGMP Snooping > exit > > > (Hirschmann Railswitch) #logoutConnection closed by foreign host. > -bash-4.2$ > > Cheers, > Rod. > > On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson > > wrote: > > It sounds like it's not finding an end-of-configuration > delimiter. I'm not familiar with the device type, but for > Cisco devices, it usually looks for the keyword "end" by > itself at the end of "show run" to determine whether or not > it has successfully pulled the configuration. Other device > types sometimes look for more than 5 lines of config, etc. > Without knowing more about the configuration file format, I > can't say which method (if either) would work for your > situation. > > On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks > > wrote: > > Hi. > > I am really struggling with getting a new device type up > and running. > > Rancid v3.2, installed into Centos 7 with yum from EPEL > repo. I have an installation that is currently working > against a test Cisco router, so I know the base install > is all good. > > I have created a login script hmlogin (based off > complogin, with session paginate commented out) > I have created a perl script hirschmann.pm > (based on ciscowlc.om > ). > > rancid.types.conf: > hirschmann;script;rancid -t hirschmann > hirschmann;login;hmlogin > hirschmann;module;hirschmann > hirschmann;inloop;hirschmann::inloop > hirschmann;command;hirschmann::WriteTerm;show running-config > > I can run it directly with hmlogin -c"show > running-config" 192.168.254.103 > I get no errors running this, and I get the output expected. > > However, when I run the following: rancid -d > -thirschmann 192.168.254.103 > I get: > loadtype: device type hirschmann > loadtype: found device type hirschmann in > /etc/rancid/rancid.types.conf > executing hmlogin -t 90 -c"show running-config" > 192.168.254.103 > PROMPT MATCH: > HIT COMMAND:(Hirschmann Railswitch) #show running-config > HIT COMMAND:(Hirschmann Railswitch) #show running-config > 192.168.254.103 : missed cmd(s): > all commands > 192.168.254.103 : End of run not > found > 192.168.254.103 : End of run not > found > ! > -bash-4.2$ > > The .raw file has the full correct output of the show > running-config. > The .new file only has: > !RANCID-CONTENT-TYPE: hirschmann > ! > > I feel oh so close to getting this running! Appreciate > any help that can be offered. > > Cheers, > Rod. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > -- > Dan > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > -- > Dan > > > > > _______________________________________________ > 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 heas at shrubbery.net Wed Dec 16 17:30:12 2015 From: heas at shrubbery.net (heasley) Date: Wed, 16 Dec 2015 17:30:12 +0000 Subject: [rancid] error in log file In-Reply-To: References: Message-ID: <20151216173012.GE56027@shrubbery.net> Wed, Dec 16, 2015 at 09:21:29PM +0530, Harsha S Aryan: > How can I get it as mail attachment. rancid does not do this. using the current alpha version of rancid, you could change the SENDMAIL setting to a script accepting cml-line like $SENDMAIL -t $MAILOPTS that splits the headers and body and creates the attachment using mpack. good luck. From harsha.s.aryan at gmail.com Wed Dec 16 17:54:33 2015 From: harsha.s.aryan at gmail.com (Harsha S Aryan) Date: Wed, 16 Dec 2015 23:24:33 +0530 Subject: [rancid] error in log file In-Reply-To: <20151216173012.GE56027@shrubbery.net> References: <20151216173012.GE56027@shrubbery.net> Message-ID: Can you please let me know in which file I have to change it . On Dec 16, 2015 11:00 PM, "heasley" wrote: > Wed, Dec 16, 2015 at 09:21:29PM +0530, Harsha S Aryan: > > How can I get it as mail attachment. > > rancid does not do this. using the current alpha version of rancid, you > could change the SENDMAIL setting to a script accepting cml-line like > > $SENDMAIL -t $MAILOPTS > > that splits the headers and body and creates the attachment using mpack. > good luck. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rod.hendricks at graduate.uwa.edu.au Thu Dec 17 06:01:40 2015 From: rod.hendricks at graduate.uwa.edu.au (Rod Hendricks) Date: Thu, 17 Dec 2015 14:01:40 +0800 Subject: [rancid] New device type In-Reply-To: References: Message-ID: I'm getting closer. rancid.types.conf now looks like this:- hirschmann;script;rancid -t hirschmann hirschmann;login;hmlogin hirschmann;module;hirschmann hirschmann;inloop;hirschmann::inloop hirschmann;command;hirschmann::ShowConfig;show running-config Output now looks like this:- -bash-4.2$ rancid -d -thirschmann 192.168.254.103 loadtype: device type hirschmann loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf executing hmlogin -t 90 -c"show running-config" 192.168.254.103 PROMPT MATCH: HIT COMMAND:(Hirschmann Railswitch) #show running-config HIT COMMAND:(Hirschmann Railswitch) #show running-config In ShowConfig: (Hirschmann Railswitch) #show running-config Exiting ShowConfig: 192.168.254.103: End of run not found 192.168.254.103: End of run not found !--WLC End Config Data--! -bash-4.2$ .raw file still looks correct. .new file looks like:- !RANCID-CONTENT-TYPE: hirschmann ! !--WLC Begin Config Data--! !--WLC End Config Data--! Ideas? Cheers, Rod. On Wed, Dec 16, 2015 at 11:57 PM, Dan Anderson wrote: > That field is basically a call to a subroutine within the module so if you > copied ciscowlc.pm, you'd need to use ShowConfig as WriteTerm doesn't > exist in that module. > > On Wed, Dec 16, 2015 at 10:26 AM, Rod Hendricks < > rod.hendricks at graduate.uwa.edu.au> wrote: > >> I don't fully understand the purpose of WriteTerm. But from what you are >> saying above, is my rancid.types.conf in my original post wrong? Should >> >> hirschmann;command;hirschmann::WriteTerm;show running-config >> >> in fact look like >> >> hirschmann;command;hirschmann::ShowConfig;show running-config >> >> ? >> If so, I guess I've messed that up by not understanding the significance >> of that keyword. Rancid server is on my work dev box - will try this out >> in 12hrs when i get back to the office. >> >> Thanks again. >> >> Cheers, >> Rod. >> >> On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson >> wrote: >> >>> ShowConfig in ciscowlc.pm uses the line counting method. >>> >>> while (<$INPUT>) { >>> <---SNIP---> >>> >>> $linecnt++; >>> <---SNIP---> >>> >>> # WLC lacks a definitive "end of config" marker. >>> if ($linecnt > 5) { >>> $found_end = 1; >>> return(1); >>> } >>> return(0); >>> >>> >>> WriteTerm in ios.pm looks for the "end" keyword. >>> >>> On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks < >>> rod.hendricks at graduate.uwa.edu.au> wrote: >>> >>>> Thanks Dan. >>>> >>>> Your explanation makes sense. Which script normally defines this >>>> delimiter? I would be happy to settle for the moment in just >>>> short-circuiting this delimiter check so I can I can get the job running. >>>> Have included device config below. Don't worry about the passwords - its a >>>> test unit with factory default config. >>>> >>>> Escape character is '^]'. >>>> >>>> >>>> >>>> Copyright (c) 2004-2015 Hirschmann Automation and Control GmbH >>>> >>>> All rights reserved >>>> >>>> Railswitch Release L2E-08.0.09 >>>> >>>> (Build date 2015-04-06 21:32) >>>> >>>> >>>> >>>> System Name: RS-F602F7 >>>> Mgmt-IP : 192.168.254.103 >>>> Base-MAC : 00:80:63:F6:02:F7 >>>> System Time: 2015-01-02 10:11:52 >>>> >>>> >>>> >>>> (Hirschmann Railswitch) >>>> User:admin >>>> Password:******* >>>> >>>> NOTE: Enter '?' for Command Help. Command help displays all options >>>> that are valid for the 'normal' command forms of that particular >>>> mode. >>>> For a list of valid 'no' command forms for that mode, enter the >>>> help >>>> command 'no ?'. For the syntax of a particular command form, >>>> please >>>> consult the documentation. >>>> >>>> >>>> (Hirschmann Railswitch) >enable >>>> >>>> (Hirschmann Railswitch) # >>>> (Hirschmann Railswitch) #show running-config >>>> >>>> !Current Configuration: >>>> ! >>>> !Parameter string escape handling \, 1 >>>> !Characters to be preceded with escape char (\): \, !, ", ', ? >>>> >>>> !System Description "Hirschmann Railswitch" >>>> !System Version L2E-08.0.09 Build: 2015-04-06 21:32 >>>> >>>> vlan database >>>> exit >>>> >>>> >>>> configure >>>> >>>> ! >>>> >>>> >>>> interface 1/1 >>>> no auto-negotiate >>>> >>>> exit >>>> >>>> >>>> interface 1/2 >>>> no auto-negotiate >>>> >>>> exit >>>> >>>> >>>> interface 1/3 >>>> >>>> exit >>>> >>>> >>>> interface 1/4 >>>> >>>> exit >>>> >>>> >>>> interface 1/5 >>>> >>>> exit >>>> >>>> >>>> interface 1/6 >>>> >>>> exit >>>> >>>> >>>> interface 1/7 >>>> >>>> exit >>>> >>>> >>>> interface 1/8 >>>> >>>> exit >>>> >>>> >>>> !Address Conflict Detection >>>> >>>> !Bridge Address Learning >>>> >>>> !Bridge Fast Link Detection >>>> >>>> !Maximum size of frame (packet size) >>>> >>>> !Bridge Address Relearn Detection >>>> >>>> !Bridge Address Relearn Threshold >>>> >>>> !Bridge Duplex Mismatch Detection >>>> >>>> !Bridge Hash Optimizing >>>> >>>> !Service Mode >>>> >>>> !VLAN Learning >>>> >>>> >>>> !Hirschmann DHCP Relay >>>> >>>> !Hirschmann Device Status >>>> >>>> >>>> !DIP Switch Admin State >>>> >>>> >>>> !Ethernet/IP >>>> >>>> !Power over Ethernet (IEEE 802.3af) >>>> !Selftest >>>> >>>> !Skip ACA on boot >>>> >>>> >>>> !Hirschmann HIPER Ring >>>> ! configuration determined by DIP switch >>>> hiper-ring mode ring-switch >>>> hiper-ring port primary 1/1 >>>> hiper-ring port secondary 1/2 >>>> >>>> !LLDP (IEEE802.1AB Link Layer Discovery Protocol) >>>> >>>> !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) >>>> !No MRP domains exist. >>>> >>>> !MAC/IP Based Port Security >>>> >>>> >>>> !ProfinetIO >>>> >>>> >>>> !Hirschmann Precision Time Protocol (PTP, IEEE 1588) >>>> >>>> !Hirschmann Ring Coupling >>>> !Note: master/slave (also for single) part of configuration determined >>>> by >>>> ! DIP switch (cannot be overridden by management) >>>> ring-coupling operation on >>>> >>>> !Hirschmann Signal Contacts >>>> >>>> >>>> !Hirschmann SNMP Access Control >>>> >>>> >>>> !SNTP >>>> >>>> >>>> !Hirschmann Broadcast Limiter >>>> >>>> >>>> !Hirschmann Temperature Limit Settings >>>> >>>> users passwd admin >>>> :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: >>>> users snmpv3 authentication admin md5 >>>> users passwd user >>>> :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: >>>> users snmpv3 authentication user md5 >>>> >>>> lineconfig >>>> exit >>>> >>>> no spanning-tree >>>> >>>> !IGMP Snooping >>>> exit >>>> >>>> >>>> (Hirschmann Railswitch) #logoutConnection closed by foreign host. >>>> -bash-4.2$ >>>> >>>> Cheers, >>>> Rod. >>>> >>>> On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson < >>>> dan.w.anderson at gmail.com> wrote: >>>> >>>>> It sounds like it's not finding an end-of-configuration delimiter. I'm >>>>> not familiar with the device type, but for Cisco devices, it usually looks >>>>> for the keyword "end" by itself at the end of "show run" to determine >>>>> whether or not it has successfully pulled the configuration. Other device >>>>> types sometimes look for more than 5 lines of config, etc. Without knowing >>>>> more about the configuration file format, I can't say which method (if >>>>> either) would work for your situation. >>>>> >>>>> On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks < >>>>> rod.hendricks at graduate.uwa.edu.au> wrote: >>>>> >>>>>> Hi. >>>>>> >>>>>> I am really struggling with getting a new device type up and running. >>>>>> >>>>>> >>>>>> Rancid v3.2, installed into Centos 7 with yum from EPEL repo. I have >>>>>> an installation that is currently working against a test Cisco router, so I >>>>>> know the base install is all good. >>>>>> >>>>>> I have created a login script hmlogin (based off complogin, with >>>>>> session paginate commented out) >>>>>> I have created a perl script hirschmann.pm (based on ciscowlc.om). >>>>>> >>>>>> rancid.types.conf: >>>>>> hirschmann;script;rancid -t hirschmann >>>>>> hirschmann;login;hmlogin >>>>>> hirschmann;module;hirschmann >>>>>> hirschmann;inloop;hirschmann::inloop >>>>>> hirschmann;command;hirschmann::WriteTerm;show running-config >>>>>> >>>>>> I can run it directly with hmlogin -c"show running-config" >>>>>> 192.168.254.103 >>>>>> I get no errors running this, and I get the output expected. >>>>>> >>>>>> However, when I run the following: rancid -d -thirschmann >>>>>> 192.168.254.103 >>>>>> I get: >>>>>> loadtype: device type hirschmann >>>>>> loadtype: found device type hirschmann in >>>>>> /etc/rancid/rancid.types.conf >>>>>> executing hmlogin -t 90 -c"show running-config" 192.168.254.103 >>>>>> PROMPT MATCH: >>>>>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>>>>> HIT COMMAND:(Hirschmann Railswitch) #show running-config >>>>>> 192.168.254.103: missed cmd(s): all commands >>>>>> 192.168.254.103: End of run not found >>>>>> 192.168.254.103: End of run not found >>>>>> ! >>>>>> -bash-4.2$ >>>>>> >>>>>> The .raw file has the full correct output of the show running-config. >>>>>> The .new file only has: >>>>>> !RANCID-CONTENT-TYPE: hirschmann >>>>>> ! >>>>>> >>>>>> I feel oh so close to getting this running! Appreciate any help that >>>>>> can be offered. >>>>>> >>>>>> Cheers, >>>>>> Rod. >>>>>> >>>>>> _______________________________________________ >>>>>> Rancid-discuss mailing list >>>>>> Rancid-discuss at shrubbery.net >>>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Dan >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Rancid-discuss mailing list >>>> Rancid-discuss at shrubbery.net >>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss >>>> >>> >>> >>> >>> -- >>> Dan >>> >> >> >> _______________________________________________ >> 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 alan.mckinnon at gmail.com Thu Dec 17 06:16:27 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Thu, 17 Dec 2015 08:16:27 +0200 Subject: [rancid] New device type In-Reply-To: References: Message-ID: <5672533B.9000505@gmail.com> That's a fairly common error, but it never has a common solution. Basically, your script read the raw file, detected the start of "show running-config" and started to process it in sub ShowConfig() However, the script didn't find the end of that output for whatever reason and processing fell all the way through to the very end with the error "End of run not found". You will have to dig into the script and find what it uses for that. There's a main loop in ShowConfig() and it will have a regex exit condition (possibly "end" followed by a prompt or something similar). Carefully examine the raw file to see what your device put out, and make ShowConfig() match. On 17/12/2015 08:01, Rod Hendricks wrote: > I'm getting closer. > > rancid.types.conf now looks like this:- > hirschmann;script;rancid -t hirschmann > hirschmann;login;hmlogin > hirschmann;module;hirschmann > hirschmann;inloop;hirschmann::inloop > hirschmann;command;hirschmann::ShowConfig;show running-config > > Output now looks like this:- > -bash-4.2$ rancid -d -thirschmann 192.168.254.103 > loadtype: device type hirschmann > loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf > executing hmlogin -t 90 -c"show running-config" 192.168.254.103 > PROMPT MATCH: > HIT COMMAND:(Hirschmann Railswitch) #show running-config > HIT COMMAND:(Hirschmann Railswitch) #show running-config > In ShowConfig: (Hirschmann Railswitch) #show running-config > Exiting ShowConfig: > 192.168.254.103 : End of run not found > 192.168.254.103 : End of run not found > !--WLC End Config Data--! > -bash-4.2$ > > .raw file still looks correct. > > .new file looks like:- > !RANCID-CONTENT-TYPE: hirschmann > ! > > !--WLC Begin Config Data--! > > !--WLC End Config Data--! > > Ideas? > > Cheers, > Rod. > > > > On Wed, Dec 16, 2015 at 11:57 PM, Dan Anderson > wrote: > > That field is basically a call to a subroutine within the module so > if you copied ciscowlc.pm , you'd need to use > ShowConfig as WriteTerm doesn't exist in that module. > > On Wed, Dec 16, 2015 at 10:26 AM, Rod Hendricks > > wrote: > > I don't fully understand the purpose of WriteTerm. But from > what you are saying above, is my rancid.types.conf in my > original post wrong? Should > > hirschmann;command;hirschmann::WriteTerm;show running-config > > in fact look like > > hirschmann;command;hirschmann::ShowConfig;show running-config > > ? > If so, I guess I've messed that up by not understanding the > significance of that keyword. Rancid server is on my work dev > box - will try this out in 12hrs when i get back to the office. > > Thanks again. > > Cheers, > Rod. > > On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson > > wrote: > > ShowConfig in ciscowlc.pm uses the line > counting method. > > while (<$INPUT>) { > <---SNIP---> > > $linecnt++; > <---SNIP---> > > # WLC lacks a definitive "end of config" marker. > if ($linecnt > 5) { > $found_end = 1; > return(1); > } > return(0); > > > WriteTerm in ios.pm looks for the "end" keyword. > > On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks > > wrote: > > Thanks Dan. > > Your explanation makes sense. Which script normally > defines this delimiter? I would be happy to settle for > the moment in just short-circuiting this delimiter check > so I can I can get the job running. Have included > device config below. Don't worry about the passwords - > its a test unit with factory default config. > > Escape character is '^]'. > > > > Copyright (c) 2004-2015 Hirschmann Automation > and Control GmbH > > All rights reserved > > Railswitch Release L2E-08.0.09 > > (Build date 2015-04-06 21:32) > > > > System Name: RS-F602F7 > Mgmt-IP : 192.168.254.103 > Base-MAC : 00:80:63:F6:02:F7 > System Time: 2015-01-02 10:11:52 > > > > (Hirschmann Railswitch) > User:admin > Password:******* > > NOTE: Enter '?' for Command Help. Command help displays > all options > that are valid for the 'normal' command forms of > that particular mode. > For a list of valid 'no' command forms for that > mode, enter the help > command 'no ?'. For the syntax of a particular > command form, please > consult the documentation. > > > (Hirschmann Railswitch) >enable > > (Hirschmann Railswitch) # > (Hirschmann Railswitch) #show running-config > > !Current Configuration: > ! > !Parameter string escape handling \, 1 > !Characters to be preceded with escape char (\): \, !, > ", ', ? > > !System Description "Hirschmann Railswitch" > !System Version L2E-08.0.09 Build: 2015-04-06 21:32 > > vlan database > exit > > > configure > > ! > > > interface 1/1 > no auto-negotiate > > exit > > > interface 1/2 > no auto-negotiate > > exit > > > interface 1/3 > > exit > > > interface 1/4 > > exit > > > interface 1/5 > > exit > > > interface 1/6 > > exit > > > interface 1/7 > > exit > > > interface 1/8 > > exit > > > !Address Conflict Detection > > !Bridge Address Learning > > !Bridge Fast Link Detection > > !Maximum size of frame (packet size) > > !Bridge Address Relearn Detection > > !Bridge Address Relearn Threshold > > !Bridge Duplex Mismatch Detection > > !Bridge Hash Optimizing > > !Service Mode > > !VLAN Learning > > > !Hirschmann DHCP Relay > > !Hirschmann Device Status > > > !DIP Switch Admin State > > > !Ethernet/IP > > !Power over Ethernet (IEEE 802.3af) > !Selftest > > !Skip ACA on boot > > > !Hirschmann HIPER Ring > ! configuration determined by DIP switch > hiper-ring mode ring-switch > hiper-ring port primary 1/1 > hiper-ring port secondary 1/2 > > !LLDP (IEEE802.1AB Link Layer Discovery Protocol) > > !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) > !No MRP domains exist. > > !MAC/IP Based Port Security > > > !ProfinetIO > > > !Hirschmann Precision Time Protocol (PTP, IEEE 1588) > > !Hirschmann Ring Coupling > !Note: master/slave (also for single) part of > configuration determined by > ! DIP switch (cannot be overridden by management) > ring-coupling operation on > > !Hirschmann Signal Contacts > > > !Hirschmann SNMP Access Control > > > !SNTP > > > !Hirschmann Broadcast Limiter > > > !Hirschmann Temperature Limit Settings > > users passwd admin > :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: > users snmpv3 authentication admin md5 > users passwd user > :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: > users snmpv3 authentication user md5 > > lineconfig > exit > > no spanning-tree > > !IGMP Snooping > exit > > > (Hirschmann Railswitch) #logoutConnection closed by > foreign host. > -bash-4.2$ > > Cheers, > Rod. > > On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson > > wrote: > > It sounds like it's not finding an > end-of-configuration delimiter. I'm not familiar > with the device type, but for Cisco devices, it > usually looks for the keyword "end" by itself at the > end of "show run" to determine whether or not it has > successfully pulled the configuration. Other device > types sometimes look for more than 5 lines of > config, etc. Without knowing more about the > configuration file format, I can't say which method > (if either) would work for your situation. > > On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks > > wrote: > > Hi. > > I am really struggling with getting a new device > type up and running. > > Rancid v3.2, installed into Centos 7 with yum > from EPEL repo. I have an installation that is > currently working against a test Cisco router, > so I know the base install is all good. > > I have created a login script hmlogin (based off > complogin, with session paginate commented out) > I have created a perl script hirschmann.pm > (based on ciscowlc.om > ). > > rancid.types.conf: > hirschmann;script;rancid -t hirschmann > hirschmann;login;hmlogin > hirschmann;module;hirschmann > hirschmann;inloop;hirschmann::inloop > hirschmann;command;hirschmann::WriteTerm;show > running-config > > I can run it directly with hmlogin -c"show > running-config" 192.168.254.103 > I get no errors running this, and I get the > output expected. > > However, when I run the following: rancid -d > -thirschmann 192.168.254.103 > I get: > loadtype: device type hirschmann > loadtype: found device type hirschmann in > /etc/rancid/rancid.types.conf > executing hmlogin -t 90 -c"show running-config" > 192.168.254.103 > PROMPT MATCH: > HIT COMMAND:(Hirschmann Railswitch) #show > running-config > HIT COMMAND:(Hirschmann Railswitch) #show > running-config > 192.168.254.103 : missed > cmd(s): all commands > 192.168.254.103 : End of > run not found > 192.168.254.103 : End of > run not found > ! > -bash-4.2$ > > The .raw file has the full correct output of the > show running-config. > The .new file only has: > !RANCID-CONTENT-TYPE: hirschmann > ! > > I feel oh so close to getting this running! > Appreciate any help that can be offered. > > Cheers, > Rod. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > -- > Dan > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > -- > Dan > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > -- > Dan > > > > > _______________________________________________ > 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 rod.hendricks at graduate.uwa.edu.au Thu Dec 17 08:06:13 2015 From: rod.hendricks at graduate.uwa.edu.au (Rod Hendricks) Date: Thu, 17 Dec 2015 16:06:13 +0800 Subject: [rancid] New device type In-Reply-To: <5672533B.9000505@gmail.com> References: <5672533B.9000505@gmail.com> Message-ID: Thanks for the help Alan. My perl module is based on the builtin ciscowlc module. The exit condition (if I've understood you correctly) is this:- ProcessHistory("","","","\n!--WLC End Config Data--!\n"); print STDERR " Exiting ShowConfig: $_" if ($debug); # WLC lacks a definitive "end of config" marker. if ($linecnt > 5) { $found_end = 1; return(1); } It seems like the perl module is telling me the file is short, but the raw file is definitely the full show running-config output. I'm kinda lost now :/ Cheers, Rod. On Thu, Dec 17, 2015 at 2:16 PM, Alan McKinnon wrote: > That's a fairly common error, but it never has a common solution. > > Basically, your script read the raw file, detected the start of "show > running-config" and started to process it in sub ShowConfig() > > However, the script didn't find the end of that output for whatever > reason and processing fell all the way through to the very end with the > error "End of run not found". You will have to dig into the script and > find what it uses for that. There's a main loop in ShowConfig() and it > will have a regex exit condition (possibly "end" followed by a prompt or > something similar). > > Carefully examine the raw file to see what your device put out, and make > ShowConfig() match. > > > On 17/12/2015 08:01, Rod Hendricks wrote: > > I'm getting closer. > > > > rancid.types.conf now looks like this:- > > hirschmann;script;rancid -t hirschmann > > hirschmann;login;hmlogin > > hirschmann;module;hirschmann > > hirschmann;inloop;hirschmann::inloop > > hirschmann;command;hirschmann::ShowConfig;show running-config > > > > Output now looks like this:- > > -bash-4.2$ rancid -d -thirschmann 192.168.254.103 > > loadtype: device type hirschmann > > loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf > > executing hmlogin -t 90 -c"show running-config" 192.168.254.103 > > PROMPT MATCH: > > HIT COMMAND:(Hirschmann Railswitch) #show running-config > > HIT COMMAND:(Hirschmann Railswitch) #show running-config > > In ShowConfig: (Hirschmann Railswitch) #show running-config > > Exiting ShowConfig: > > 192.168.254.103 : End of run not found > > 192.168.254.103 : End of run not found > > !--WLC End Config Data--! > > -bash-4.2$ > > > > .raw file still looks correct. > > > > .new file looks like:- > > !RANCID-CONTENT-TYPE: hirschmann > > ! > > > > !--WLC Begin Config Data--! > > > > !--WLC End Config Data--! > > > > Ideas? > > > > Cheers, > > Rod. > > > > > > > > On Wed, Dec 16, 2015 at 11:57 PM, Dan Anderson > > wrote: > > > > That field is basically a call to a subroutine within the module so > > if you copied ciscowlc.pm , you'd need to use > > ShowConfig as WriteTerm doesn't exist in that module. > > > > On Wed, Dec 16, 2015 at 10:26 AM, Rod Hendricks > > > > wrote: > > > > I don't fully understand the purpose of WriteTerm. But from > > what you are saying above, is my rancid.types.conf in my > > original post wrong? Should > > > > hirschmann;command;hirschmann::WriteTerm;show running-config > > > > in fact look like > > > > hirschmann;command;hirschmann::ShowConfig;show running-config > > > > ? > > If so, I guess I've messed that up by not understanding the > > significance of that keyword. Rancid server is on my work dev > > box - will try this out in 12hrs when i get back to the office. > > > > Thanks again. > > > > Cheers, > > Rod. > > > > On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson > > > > wrote: > > > > ShowConfig in ciscowlc.pm uses the line > > counting method. > > > > while (<$INPUT>) { > > <---SNIP---> > > > > $linecnt++; > > <---SNIP---> > > > > # WLC lacks a definitive "end of config" marker. > > if ($linecnt > 5) { > > $found_end = 1; > > return(1); > > } > > return(0); > > > > > > WriteTerm in ios.pm looks for the "end" > keyword. > > > > On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks > > > > wrote: > > > > Thanks Dan. > > > > Your explanation makes sense. Which script normally > > defines this delimiter? I would be happy to settle for > > the moment in just short-circuiting this delimiter check > > so I can I can get the job running. Have included > > device config below. Don't worry about the passwords - > > its a test unit with factory default config. > > > > Escape character is '^]'. > > > > > > > > Copyright (c) 2004-2015 Hirschmann Automation > > and Control GmbH > > > > All rights reserved > > > > Railswitch Release L2E-08.0.09 > > > > (Build date 2015-04-06 21:32) > > > > > > > > System Name: RS-F602F7 > > Mgmt-IP : 192.168.254.103 > > Base-MAC : 00:80:63:F6:02:F7 > > System Time: 2015-01-02 10:11:52 > > > > > > > > (Hirschmann Railswitch) > > User:admin > > Password:******* > > > > NOTE: Enter '?' for Command Help. Command help displays > > all options > > that are valid for the 'normal' command forms of > > that particular mode. > > For a list of valid 'no' command forms for that > > mode, enter the help > > command 'no ?'. For the syntax of a particular > > command form, please > > consult the documentation. > > > > > > (Hirschmann Railswitch) >enable > > > > (Hirschmann Railswitch) # > > (Hirschmann Railswitch) #show running-config > > > > !Current Configuration: > > ! > > !Parameter string escape handling \, 1 > > !Characters to be preceded with escape char (\): \, !, > > ", ', ? > > > > !System Description "Hirschmann Railswitch" > > !System Version L2E-08.0.09 Build: 2015-04-06 21:32 > > > > vlan database > > exit > > > > > > configure > > > > ! > > > > > > interface 1/1 > > no auto-negotiate > > > > exit > > > > > > interface 1/2 > > no auto-negotiate > > > > exit > > > > > > interface 1/3 > > > > exit > > > > > > interface 1/4 > > > > exit > > > > > > interface 1/5 > > > > exit > > > > > > interface 1/6 > > > > exit > > > > > > interface 1/7 > > > > exit > > > > > > interface 1/8 > > > > exit > > > > > > !Address Conflict Detection > > > > !Bridge Address Learning > > > > !Bridge Fast Link Detection > > > > !Maximum size of frame (packet size) > > > > !Bridge Address Relearn Detection > > > > !Bridge Address Relearn Threshold > > > > !Bridge Duplex Mismatch Detection > > > > !Bridge Hash Optimizing > > > > !Service Mode > > > > !VLAN Learning > > > > > > !Hirschmann DHCP Relay > > > > !Hirschmann Device Status > > > > > > !DIP Switch Admin State > > > > > > !Ethernet/IP > > > > !Power over Ethernet (IEEE 802.3af) > > !Selftest > > > > !Skip ACA on boot > > > > > > !Hirschmann HIPER Ring > > ! configuration determined by DIP switch > > hiper-ring mode ring-switch > > hiper-ring port primary 1/1 > > hiper-ring port secondary 1/2 > > > > !LLDP (IEEE802.1AB Link Layer Discovery Protocol) > > > > !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) > > !No MRP domains exist. > > > > !MAC/IP Based Port Security > > > > > > !ProfinetIO > > > > > > !Hirschmann Precision Time Protocol (PTP, IEEE 1588) > > > > !Hirschmann Ring Coupling > > !Note: master/slave (also for single) part of > > configuration determined by > > ! DIP switch (cannot be overridden by management) > > ring-coupling operation on > > > > !Hirschmann Signal Contacts > > > > > > !Hirschmann SNMP Access Control > > > > > > !SNTP > > > > > > !Hirschmann Broadcast Limiter > > > > > > !Hirschmann Temperature Limit Settings > > > > users passwd admin > > > :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: > > users snmpv3 authentication admin md5 > > users passwd user > > > :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: > > users snmpv3 authentication user md5 > > > > lineconfig > > exit > > > > no spanning-tree > > > > !IGMP Snooping > > exit > > > > > > (Hirschmann Railswitch) #logoutConnection closed by > > foreign host. > > -bash-4.2$ > > > > Cheers, > > Rod. > > > > On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson > > > > wrote: > > > > It sounds like it's not finding an > > end-of-configuration delimiter. I'm not familiar > > with the device type, but for Cisco devices, it > > usually looks for the keyword "end" by itself at the > > end of "show run" to determine whether or not it has > > successfully pulled the configuration. Other device > > types sometimes look for more than 5 lines of > > config, etc. Without knowing more about the > > configuration file format, I can't say which method > > (if either) would work for your situation. > > > > On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks > > > > wrote: > > > > Hi. > > > > I am really struggling with getting a new device > > type up and running. > > > > Rancid v3.2, installed into Centos 7 with yum > > from EPEL repo. I have an installation that is > > currently working against a test Cisco router, > > so I know the base install is all good. > > > > I have created a login script hmlogin (based off > > complogin, with session paginate commented out) > > I have created a perl script hirschmann.pm > > (based on ciscowlc.om > > ). > > > > rancid.types.conf: > > hirschmann;script;rancid -t hirschmann > > hirschmann;login;hmlogin > > hirschmann;module;hirschmann > > hirschmann;inloop;hirschmann::inloop > > hirschmann;command;hirschmann::WriteTerm;show > > running-config > > > > I can run it directly with hmlogin -c"show > > running-config" 192.168.254.103 > > I get no errors running this, and I get the > > output expected. > > > > However, when I run the following: rancid -d > > -thirschmann 192.168.254.103 > > I get: > > loadtype: device type hirschmann > > loadtype: found device type hirschmann in > > /etc/rancid/rancid.types.conf > > executing hmlogin -t 90 -c"show running-config" > > 192.168.254.103 > > PROMPT MATCH: > > HIT COMMAND:(Hirschmann Railswitch) #show > > running-config > > HIT COMMAND:(Hirschmann Railswitch) #show > > running-config > > 192.168.254.103 : missed > > cmd(s): all commands > > 192.168.254.103 : End of > > run not found > > 192.168.254.103 : End of > > run not found > > ! > > -bash-4.2$ > > > > The .raw file has the full correct output of the > > show running-config. > > The .new file only has: > > !RANCID-CONTENT-TYPE: hirschmann > > ! > > > > I feel oh so close to getting this running! > > Appreciate any help that can be offered. > > > > Cheers, > > Rod. > > > > _______________________________________________ > > Rancid-discuss mailing list > > Rancid-discuss at shrubbery.net > > > > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > > > > > > -- > > Dan > > > > > > > > _______________________________________________ > > Rancid-discuss mailing list > > Rancid-discuss at shrubbery.net > > > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > > > > > > -- > > Dan > > > > > > > > _______________________________________________ > > Rancid-discuss mailing list > > Rancid-discuss at shrubbery.net Rancid-discuss at shrubbery.net> > > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > > > > > > -- > > Dan > > > > > > > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.mckinnon at gmail.com Thu Dec 17 09:32:00 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Thu, 17 Dec 2015 11:32:00 +0200 Subject: [rancid] New device type In-Reply-To: References: <5672533B.9000505@gmail.com> Message-ID: <56728110.5030108@gmail.com> On 17/12/2015 10:06, Rod Hendricks wrote: > Thanks for the help Alan. > > My perl module is based on the builtin ciscowlc module. > > The exit condition (if I've understood you correctly) is this:- > > ProcessHistory("","","","\n!--WLC End Config Data--!\n"); > print STDERR " Exiting ShowConfig: $_" if ($debug); > # WLC lacks a definitive "end of config" marker. > if ($linecnt > 5) { > > $found_end = 1; > return(1); > } > > It seems like the perl module is telling me the file is short, but the > raw file is definitely the full show running-config output. > > I'm kinda lost now :/ No need to be lost. The comment that the WLC lacks an end of config marker is the clue - whatever code detects the end is not correct. Can you do the following please: - post the full script you are using - a copy-paste of show run on a real device. The first and last 5 lines ought to be enough, plus the prompt after the end. One of the things I want to see is if the device issues a proper EOL at the end of show run. redact anything private from the output first of course > > Cheers, > Rod. > > > On Thu, Dec 17, 2015 at 2:16 PM, Alan McKinnon > wrote: > > That's a fairly common error, but it never has a common solution. > > Basically, your script read the raw file, detected the start of "show > running-config" and started to process it in sub ShowConfig() > > However, the script didn't find the end of that output for whatever > reason and processing fell all the way through to the very end with the > error "End of run not found". You will have to dig into the script and > find what it uses for that. There's a main loop in ShowConfig() and it > will have a regex exit condition (possibly "end" followed by a prompt or > something similar). > > Carefully examine the raw file to see what your device put out, and make > ShowConfig() match. > > > On 17/12/2015 08:01, Rod Hendricks wrote: > > I'm getting closer. > > > > rancid.types.conf now looks like this:- > > hirschmann;script;rancid -t hirschmann > > hirschmann;login;hmlogin > > hirschmann;module;hirschmann > > hirschmann;inloop;hirschmann::inloop > > hirschmann;command;hirschmann::ShowConfig;show running-config > > > > Output now looks like this:- > > -bash-4.2$ rancid -d -thirschmann 192.168.254.103 > > loadtype: device type hirschmann > > loadtype: found device type hirschmann in /etc/rancid/rancid.types.conf > > executing hmlogin -t 90 -c"show running-config" 192.168.254.103 > > PROMPT MATCH: > > HIT COMMAND:(Hirschmann Railswitch) #show running-config > > HIT COMMAND:(Hirschmann Railswitch) #show running-config > > In ShowConfig: (Hirschmann Railswitch) #show running-config > > Exiting ShowConfig: > > 192.168.254.103 : End of run not found > > 192.168.254.103 : End of run not found > > !--WLC End Config Data--! > > -bash-4.2$ > > > > .raw file still looks correct. > > > > .new file looks like:- > > !RANCID-CONTENT-TYPE: hirschmann > > ! > > > > !--WLC Begin Config Data--! > > > > !--WLC End Config Data--! > > > > Ideas? > > > > Cheers, > > Rod. > > > > > > > > On Wed, Dec 16, 2015 at 11:57 PM, Dan Anderson > > >> wrote: > > > > That field is basically a call to a subroutine within the module so > > if you copied ciscowlc.pm > , you'd need to use > > ShowConfig as WriteTerm doesn't exist in that module. > > > > On Wed, Dec 16, 2015 at 10:26 AM, Rod Hendricks > > > > >> wrote: > > > > I don't fully understand the purpose of WriteTerm. But from > > what you are saying above, is my rancid.types.conf in my > > original post wrong? Should > > > > hirschmann;command;hirschmann::WriteTerm;show running-config > > > > in fact look like > > > > hirschmann;command;hirschmann::ShowConfig;show running-config > > > > ? > > If so, I guess I've messed that up by not understanding the > > significance of that keyword. Rancid server is on my work dev > > box - will try this out in 12hrs when i get back to the office. > > > > Thanks again. > > > > Cheers, > > Rod. > > > > On Wed, Dec 16, 2015 at 11:07 PM, Dan Anderson > > >> wrote: > > > > ShowConfig in ciscowlc.pm > uses the line > > counting method. > > > > while (<$INPUT>) { > > <---SNIP---> > > > > $linecnt++; > > <---SNIP---> > > > > # WLC lacks a definitive "end of config" marker. > > if ($linecnt > 5) { > > $found_end = 1; > > return(1); > > } > > return(0); > > > > > > WriteTerm in ios.pm > looks for the "end" keyword. > > > > On Wed, Dec 16, 2015 at 9:50 AM, Rod Hendricks > > > > >> wrote: > > > > Thanks Dan. > > > > Your explanation makes sense. Which script normally > > defines this delimiter? I would be happy to > settle for > > the moment in just short-circuiting this > delimiter check > > so I can I can get the job running. Have included > > device config below. Don't worry about the > passwords - > > its a test unit with factory default config. > > > > Escape character is '^]'. > > > > > > > > Copyright (c) 2004-2015 Hirschmann > Automation > > and Control GmbH > > > > All rights reserved > > > > Railswitch Release L2E-08.0.09 > > > > (Build date 2015-04-06 21:32) > > > > > > > > System Name: RS-F602F7 > > Mgmt-IP : 192.168.254.103 > > Base-MAC : > 00:80:63:F6:02:F7 > > System Time: 2015-01-02 > 10:11:52 > > > > > > > > (Hirschmann Railswitch) > > User:admin > > Password:******* > > > > NOTE: Enter '?' for Command Help. Command help > displays > > all options > > that are valid for the 'normal' command > forms of > > that particular mode. > > For a list of valid 'no' command forms for that > > mode, enter the help > > command 'no ?'. For the syntax of a particular > > command form, please > > consult the documentation. > > > > > > (Hirschmann Railswitch) >enable > > > > (Hirschmann Railswitch) # > > (Hirschmann Railswitch) #show running-config > > > > !Current Configuration: > > ! > > !Parameter string escape handling \, 1 > > !Characters to be preceded with escape char (\): > \, !, > > ", ', ? > > > > !System Description "Hirschmann Railswitch" > > !System Version L2E-08.0.09 Build: 2015-04-06 21:32 > > > > vlan database > > exit > > > > > > configure > > > > ! > > > > > > interface 1/1 > > no auto-negotiate > > > > exit > > > > > > interface 1/2 > > no auto-negotiate > > > > exit > > > > > > interface 1/3 > > > > exit > > > > > > interface 1/4 > > > > exit > > > > > > interface 1/5 > > > > exit > > > > > > interface 1/6 > > > > exit > > > > > > interface 1/7 > > > > exit > > > > > > interface 1/8 > > > > exit > > > > > > !Address Conflict Detection > > > > !Bridge Address Learning > > > > !Bridge Fast Link Detection > > > > !Maximum size of frame (packet size) > > > > !Bridge Address Relearn Detection > > > > !Bridge Address Relearn Threshold > > > > !Bridge Duplex Mismatch Detection > > > > !Bridge Hash Optimizing > > > > !Service Mode > > > > !VLAN Learning > > > > > > !Hirschmann DHCP Relay > > > > !Hirschmann Device Status > > > > > > !DIP Switch Admin State > > > > > > !Ethernet/IP > > > > !Power over Ethernet (IEEE 802.3af) > > !Selftest > > > > !Skip ACA on boot > > > > > > !Hirschmann HIPER Ring > > ! configuration determined by DIP switch > > hiper-ring mode ring-switch > > hiper-ring port primary 1/1 > > hiper-ring port secondary 1/2 > > > > !LLDP (IEEE802.1AB Link Layer Discovery Protocol) > > > > !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) > > !No MRP domains exist. > > > > !MAC/IP Based Port Security > > > > > > !ProfinetIO > > > > > > !Hirschmann Precision Time Protocol (PTP, IEEE 1588) > > > > !Hirschmann Ring Coupling > > !Note: master/slave (also for single) part of > > configuration determined by > > ! DIP switch (cannot be overridden by > management) > > ring-coupling operation on > > > > !Hirschmann Signal Contacts > > > > > > !Hirschmann SNMP Access Control > > > > > > !SNTP > > > > > > !Hirschmann Broadcast Limiter > > > > > > !Hirschmann Temperature Limit Settings > > > > users passwd admin > > > :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: > > users snmpv3 authentication admin md5 > > users passwd user > > > :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: > > users snmpv3 authentication user md5 > > > > lineconfig > > exit > > > > no spanning-tree > > > > !IGMP Snooping > > exit > > > > > > (Hirschmann Railswitch) #logoutConnection closed by > > foreign host. > > -bash-4.2$ > > > > Cheers, > > Rod. > > > > On Wed, Dec 16, 2015 at 10:21 PM, Dan Anderson > > > > >> wrote: > > > > It sounds like it's not finding an > > end-of-configuration delimiter. I'm not familiar > > with the device type, but for Cisco devices, it > > usually looks for the keyword "end" by itself at the > > end of "show run" to determine whether or not it has > > successfully pulled the configuration. Other device > > types sometimes look for more than 5 lines of > > config, etc. Without knowing more about the > > configuration file format, I can't say which method > > (if either) would work for your situation. > > > > On Wed, Dec 16, 2015 at 5:49 AM, Rod Hendricks > > > > >> wrote: > > > > Hi. > > > > I am really struggling with getting a new device > > type up and running. > > > > Rancid v3.2, installed into Centos 7 with yum > > from EPEL repo. I have an installation that is > > currently working against a test Cisco router, > > so I know the base install is all good. > > > > I have created a login script hmlogin (based off > > complogin, with session paginate commented out) > > I have created a perl scripthirschmann.pm > > (based on ciscowlc.om > > ). > > > > rancid.types.conf: > > hirschmann;script;rancid -t hirschmann > > hirschmann;login;hmlogin > > hirschmann;module;hirschmann > > hirschmann;inloop;hirschmann::inloop > > hirschmann;command;hirschmann::WriteTerm;show > > running-config > > > > I can run it directly with hmlogin -c"show > > running-config" 192.168.254.103 > > I get no errors running this, and I get the > > output expected. > > > > However, when I run the following: rancid -d > > -thirschmann 192.168.254.103 > > I get: > > loadtype: device type hirschmann > > loadtype: found device type hirschmann in > > /etc/rancid/rancid.types.conf > > executing hmlogin -t 90 -c"show running-config" > > 192.168.254.103 > > PROMPT MATCH: > > HIT COMMAND:(Hirschmann Railswitch) #show > > running-config > > HIT COMMAND:(Hirschmann Railswitch) #show > > running-config > > 192.168.254.103 : > missed > > cmd(s): all commands > > 192.168.254.103 : > End of > > run not found > > 192.168.254.103 : > End of > > run not found > > ! > > -bash-4.2$ > > > > The .raw file has the full correct output of the > > show running-config. > > The .new file only has: > > !RANCID-CONTENT-TYPE: hirschmann > > ! > > > > I feel oh so close to getting this running! > > Appreciate any help that can be offered. > > > > Cheers, > > Rod. > > > > _______________________________________________ > > Rancid-discuss mailing list > >Rancid-discuss at shrubbery.net > > > > >http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > > > > > > -- > > Dan > > > > > > > > _______________________________________________ > > Rancid-discuss mailing list > >Rancid-discuss at shrubbery.net > > > > >http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > > > > > > -- > > Dan > > > > > > > > _______________________________________________ > > Rancid-discuss mailing list > > Rancid-discuss at shrubbery.net > > > > >http://www.shrubbery.net/mailman/listinfo/rancid-discuss > > > > > > > > > > -- > > Dan > > > > > > > > > > _______________________________________________ > > 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 > > > > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss > From harsha.s.aryan at gmail.com Thu Dec 17 06:51:19 2015 From: harsha.s.aryan at gmail.com (Harsha S Aryan) Date: Thu, 17 Dec 2015 12:21:19 +0530 Subject: [rancid] Need Help Message-ID: hi, below is my rancid config, i am unable to config files of my network device as attachment in mail can any one let me know how do i do. cat /etc/rancid/ rancid.conf .rancid.conf.swp root at Nagios:~# cat /etc/rancid/rancid.conf # rancid 2.3.8 # This file sets up the environment used for rancid. see rancid.conf(5) # # This will be site specific # TERM=network;export TERM # # Collating locale LC_COLLATE="POSIX"; export LC_COLLATE # # Create files w/o world read/write/exec permissions, but read/exec permissions # for group. umask 027 # # Under BASEDIR (i.e.: --localstatedir), there will be a "logs" directory for # the logs from rancid and a directory for each group of routers defined in # LIST_OF_GROUPS (below). In addition to these, there will be a "CVS" # directory which is the cvs (or Subversion) repository. # # Use a full path (no sym-links) for BASEDIR. # TMPDIR=/tmp; export TMPDIR # Be careful changing this, it affects CVSROOT below. It should be a FQPN, not # relative. BASEDIR=/var/lib/rancid; export BASEDIR PATH=/usr/lib/rancid/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/usr/bin; export PATH # Location of the CVS/SVN repository. Be careful changing this. # If RCSSYS is svn, this can be: # - an (absolute) path (a subdirectory of BASEDIR by default). # - any URL that subversion understands, but beware that: # - no attempt will be made to create the repository when running rancid-cvs. # - authentication credentials, if necessary, MUST be cached (see the SVN # book, Ch. 3, Network Model, Caching credentials) before non-interactive # commands can run, e.g. by running rancid-cvs after installation. CVSROOT=$BASEDIR/CVS; export CVSROOT # Location of log files produced by rancid-run(1). LOGDIR=$BASEDIR/logs; export LOGDIR # # Select which RCS system to use, "cvs" (default) or "svn". Do not change # this after CVSROOT has been created with rancid-cvs. Changing between these # requires manual conversions. RCSSYS=cvs; export RCSSYS # # if ACLSORT is NO, access-lists will NOT be sorted. #ACLSORT=YES; export ACLSORT # # if NOPIPE is set, temp files will be used instead of a cmd pipe during # collection from the router(s). #NOPIPE=YES; export NOPIPE # # FILTER_PWDS determines which passwords are filtered from configs by the # value set (NO | YES | ALL). see rancid.conf(5). #FILTER_PWDS=YES; export FILTER_PWDS # # if NOCOMMSTR is set, snmp community strings will be stripped from the configs #NOCOMMSTR=YES; export NOCOMMSTR # # How many times failed collections are retried (for each run) before # giving up. Minimum: 1 #MAX_ROUNDS=4; export MAX_ROUNDS # # How many hours should pass before complaining about routers that # can not be reached. The value should be greater than the number # of hours between your rancid-run cron job. Default: 24 #OLDTIME=4; export OLDTIME # # How many hours should pass before complaining that a group's collection # (the age of it's lock file) is hung. #LOCKTIME=4; export LOCKTIME # # The number of devices to collect simultaneously. #PAR_COUNT=5; export PAR_COUNT # # list of rancid groups #LIST_OF_GROUPS="sl joebobisp"; export LIST_OF_GROUPS # more groups... #LIST_OF_GROUPS="$LIST_OF_GROUPS noc billybobisp"; export LIST_OF_GROUPS LIST_OF_GROUPS="switches" LIST_OF_GROUPS="routers" # # For each group, define a list of people to receive the diffs. # in sendmail's /etc/aliases. # rancid-group: joe,moe at foo # rancid-admin-group: hostmaster # be sure to read ../README regarding aliases. # # If your MTA configuration is broken or you want mail to be forwarded to a # domain not the same as the local one, define that domain here. "@" must be # included, as this is simply appended to the usual recipients. It is NOT # appended to recipients specified in rancid-run's -m option. #MAILDOMAIN="@example.com"; export MAILDOMAIN # # By default, rancid mail is marked with precedence "bulk". This may be # changed by setting the MAILHEADERS variable; for example no header by setting # it to "" or adding X- style headers. Individual headers must be separated # by a \n. MAILHEADERS="Precedence: bulk"; export MAILHEADERS #$SENDMAIL -t $MAILOPTS -- Rehards, Harsha -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.candler at pobox.com Thu Dec 17 09:59:21 2015 From: b.candler at pobox.com (Brian Candler) Date: Thu, 17 Dec 2015 09:59:21 +0000 Subject: [rancid] Need Help In-Reply-To: References: Message-ID: <56728779.4000207@pobox.com> On 17/12/2015 06:51, Harsha S Aryan wrote: > below is my rancid config, i am unable to config files of my network > device as attachment in mail There is a tested series of steps for making rancid work under Ubuntu 14.04 here: https://nsrc.org/workshops/2015/wacren-nmm/raw-attachment/wiki/Agenda/rancid-exercise.htm If you follow those steps, it will work. Or if you get a problem, at least you can point to exactly the step where it didn't work as expected. One thing I see wrong in your config is this: LIST_OF_GROUPS="switches" LIST_OF_GROUPS="routers" It's a single setting, so it should be: LIST_OF_GROUPS="switches routers" However that doesn't explain any permissions problems you might see. If you get these you are probably running rancid as the wrong user, or perhaps you ran rancid once as root, which will break all the permissions required for it to be able to run as the rancid user subsequently. If so you may be able to fix this using: sudo chown -R rancid:rancid /var/lib/rancid HTH, Brian. From harsha.s.aryan at gmail.com Thu Dec 17 10:04:08 2015 From: harsha.s.aryan at gmail.com (Harsha S Aryan) Date: Thu, 17 Dec 2015 15:34:08 +0530 Subject: [rancid] Need Help In-Reply-To: <56728779.4000207@pobox.com> References: <56728779.4000207@pobox.com> Message-ID: hi, there is no issue with any permission i need configuration backup which rancid taken should send me attachment instead printing in body of the mail is it possible to discussed with you or any one in skype so that i can enplane you clearly On Thu, Dec 17, 2015 at 3:29 PM, Brian Candler wrote: > On 17/12/2015 06:51, Harsha S Aryan wrote: > >> below is my rancid config, i am unable to config files of my network >> device as attachment in mail >> > There is a tested series of steps for making rancid work under Ubuntu > 14.04 here: > > https://nsrc.org/workshops/2015/wacren-nmm/raw-attachment/wiki/Agenda/rancid-exercise.htm > > If you follow those steps, it will work. Or if you get a problem, at least > you can point to exactly the step where it didn't work as expected. > > One thing I see wrong in your config is this: > > LIST_OF_GROUPS="switches" > LIST_OF_GROUPS="routers" > > It's a single setting, so it should be: > > LIST_OF_GROUPS="switches routers" > > However that doesn't explain any permissions problems you might see. If > you get these you are probably running rancid as the wrong user, or perhaps > you ran rancid once as root, which will break all the permissions required > for it to be able to run as the rancid user subsequently. If so you may be > able to fix this using: > > sudo chown -R rancid:rancid /var/lib/rancid > > HTH, > > Brian. > > -- Rehards, Harsha -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.candler at pobox.com Thu Dec 17 10:10:04 2015 From: b.candler at pobox.com (Brian Candler) Date: Thu, 17 Dec 2015 10:10:04 +0000 Subject: [rancid] Need Help In-Reply-To: References: <56728779.4000207@pobox.com> Message-ID: <567289FC.2050300@pobox.com> On 17/12/2015 10:04, Harsha S Aryan wrote: > i need configuration backup which rancid taken should send me > attachment instead printing in body of the mail OK, then I can't help you - the code is open source, so find the bit where it sends the mail, and modify it. You were already given the clue for this: find where the code uses the SENDMAIL setting. cd /path/to/rancid/source/code grep -R SENDMAIL . Regards, Brian. From b.candler at pobox.com Thu Dec 17 10:14:56 2015 From: b.candler at pobox.com (Brian Candler) Date: Thu, 17 Dec 2015 10:14:56 +0000 Subject: [rancid] Need Help In-Reply-To: <567289FC.2050300@pobox.com> References: <56728779.4000207@pobox.com> <567289FC.2050300@pobox.com> Message-ID: <56728B20.8010306@pobox.com> On 17/12/2015 10:10, Brian Candler wrote: > cd /path/to/rancid/source/code > grep -R SENDMAIL . > Actually: grep -R MAILHEADERS . works better for me (looks like rancid 2.3.6 doesn't have a SENDMAIL setting). This will get you to the following bit of code: # Mail out the diffs (if there are any). if [ -s $TMP.diff ] ; then ( echo "To: $mailrcpt" echo "Subject: $subject" echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}' echo "" if which diffstat >/dev/null; then diffstat $TMP.diff fi cat $TMP.diff ) | sendmail -t fi Regards, Brian. From heas at shrubbery.net Thu Dec 17 20:34:27 2015 From: heas at shrubbery.net (heasley) Date: Thu, 17 Dec 2015 20:34:27 +0000 Subject: [rancid] Need Help In-Reply-To: <567289FC.2050300@pobox.com> References: <56728779.4000207@pobox.com> <567289FC.2050300@pobox.com> Message-ID: <20151217203427.GC97355@shrubbery.net> Thu, Dec 17, 2015 at 10:10:04AM +0000, Brian Candler: > On 17/12/2015 10:04, Harsha S Aryan wrote: > > i need configuration backup which rancid taken should send me > > attachment instead printing in body of the mail > > OK, then I can't help you - the code is open source, so find the bit > where it sends the mail, and modify it. You were already given the clue > for this: find where the code uses the SENDMAIL setting. > > cd /path/to/rancid/source/code > grep -R SENDMAIL . if you use the alpha code, 3.2.99, you can set SENDMAIL in rancid.conf, as i described in the previous message. From rod.hendricks at graduate.uwa.edu.au Fri Dec 18 03:20:06 2015 From: rod.hendricks at graduate.uwa.edu.au (Rod Hendricks) Date: Fri, 18 Dec 2015 11:20:06 +0800 Subject: [rancid] New device type In-Reply-To: <56728110.5030108@gmail.com> References: <5672533B.9000505@gmail.com> <56728110.5030108@gmail.com> Message-ID: Thanks again to all who are helping with this. I've culled some of the history as its getting a bit long. Also not sure well attachments go in this list but I'm going to try. The scripts are 99% based on existing, so there is lots of excess code in them unfortunately. I'm just not proficient enough to remove the unnecessary code. The config I've posted before (see below) Cheers, Rod. > No need to be lost. The comment that the WLC lacks an end of config marker > is the clue - whatever code detects the end is not correct. > > Can you do the following please: > > - post the full script you are using > - a copy-paste of show run on a real device. The first and last 5 lines > ought to be enough, > plus the prompt after the end. One of the things I want to see is if the > device issues a > proper EOL at the end of show run. redact anything private from the output > first of course > > >> >> On 17/12/2015 08:01, Rod Hendricks wrote: >> > I'm getting closer. >> > >> > rancid.types.conf now looks like this:- >> > hirschmann;script;rancid -t hirschmann >> > hirschmann;login;hmlogin >> > hirschmann;module;hirschmann >> > hirschmann;inloop;hirschmann::inloop >> > hirschmann;command;hirschmann::ShowConfig;show running-config >> > >> > Output now looks like this:- >> > -bash-4.2$ rancid -d -thirschmann 192.168.254.103 >> > loadtype: device type hirschmann >> > loadtype: found device type hirschmann in >> /etc/rancid/rancid.types.conf >> > executing hmlogin -t 90 -c"show running-config" 192.168.254.103 >> > PROMPT MATCH: >> > HIT COMMAND:(Hirschmann Railswitch) #show running-config >> > HIT COMMAND:(Hirschmann Railswitch) #show running-config >> > In ShowConfig: (Hirschmann Railswitch) #show running-config >> > Exiting ShowConfig: >> > 192.168.254.103 : End of run not found >> > 192.168.254.103 : End of run not found >> > !--WLC End Config Data--! >> > -bash-4.2$ >> > >> > .raw file still looks correct. >> > >> > .new file looks like:- >> > !RANCID-CONTENT-TYPE: hirschmann >> > ! >> > >> > !--WLC Begin Config Data--! >> > >> > !--WLC End Config Data--! >> > >> > Ideas? >> > >> > Cheers, >> > Rod. >> > >> > > Don't worry about the >> passwords - >> > its a test unit with factory default config. >> > >> > Escape character is '^]'. >> > >> > >> > >> > Copyright (c) 2004-2015 Hirschmann >> Automation >> > and Control GmbH >> > >> > All rights reserved >> > >> > Railswitch Release >> L2E-08.0.09 >> > >> > (Build date 2015-04-06 >> 21:32) >> > >> > >> > >> > System Name: RS-F602F7 >> > Mgmt-IP : >> 192.168.254.103 >> > Base-MAC : >> 00:80:63:F6:02:F7 >> > System Time: 2015-01-02 >> 10:11:52 >> > >> > >> > >> > (Hirschmann Railswitch) >> > User:admin >> > Password:******* >> > >> > NOTE: Enter '?' for Command Help. Command help >> displays >> > all options >> > that are valid for the 'normal' command >> forms of >> > that particular mode. >> > For a list of valid 'no' command forms for >> that >> > mode, enter the help >> > command 'no ?'. For the syntax of a >> particular >> > command form, please >> > consult the documentation. >> > >> > >> > (Hirschmann Railswitch) >enable >> > >> > (Hirschmann Railswitch) # >> > (Hirschmann Railswitch) #show running-config >> > >> > !Current Configuration: >> > ! >> > !Parameter string escape handling \, 1 >> > !Characters to be preceded with escape char (\): >> \, !, >> > ", ', ? >> > >> > !System Description "Hirschmann Railswitch" >> > !System Version L2E-08.0.09 Build: 2015-04-06 21:32 >> > >> > vlan database >> > exit >> > >> > >> > configure >> > >> > ! >> > >> > >> > interface 1/1 >> > no auto-negotiate >> > >> > exit >> > >> > >> > interface 1/2 >> > no auto-negotiate >> > >> > exit >> > >> > >> > interface 1/3 >> > >> > exit >> > >> > >> > interface 1/4 >> > >> > exit >> > >> > >> > interface 1/5 >> > >> > exit >> > >> > >> > interface 1/6 >> > >> > exit >> > >> > >> > interface 1/7 >> > >> > exit >> > >> > >> > interface 1/8 >> > >> > exit >> > >> > >> > !Address Conflict Detection >> > >> > !Bridge Address Learning >> > >> > !Bridge Fast Link Detection >> > >> > !Maximum size of frame (packet size) >> > >> > !Bridge Address Relearn Detection >> > >> > !Bridge Address Relearn Threshold >> > >> > !Bridge Duplex Mismatch Detection >> > >> > !Bridge Hash Optimizing >> > >> > !Service Mode >> > >> > !VLAN Learning >> > >> > >> > !Hirschmann DHCP Relay >> > >> > !Hirschmann Device Status >> > >> > >> > !DIP Switch Admin State >> > >> > >> > !Ethernet/IP >> > >> > !Power over Ethernet (IEEE 802.3af) >> > !Selftest >> > >> > !Skip ACA on boot >> > >> > >> > !Hirschmann HIPER Ring >> > ! configuration determined by DIP switch >> > hiper-ring mode ring-switch >> > hiper-ring port primary 1/1 >> > hiper-ring port secondary 1/2 >> > >> > !LLDP (IEEE802.1AB Link Layer Discovery Protocol) >> > >> > !Media Redundancy Protocol (IEC 62439-2/Ed1.0, MRP) >> > !No MRP domains exist. >> > >> > !MAC/IP Based Port Security >> > >> > >> > !ProfinetIO >> > >> > >> > !Hirschmann Precision Time Protocol (PTP, IEEE >> 1588) >> > >> > !Hirschmann Ring Coupling >> > !Note: master/slave (also for single) part of >> > configuration determined by >> > ! DIP switch (cannot be overridden by >> management) >> > ring-coupling operation on >> > >> > !Hirschmann Signal Contacts >> > >> > >> > !Hirschmann SNMP Access Control >> > >> > >> > !SNTP >> > >> > >> > !Hirschmann Broadcast Limiter >> > >> > >> > !Hirschmann Temperature Limit Settings >> > >> > users passwd admin >> > >> >> :v1:81449548fb49a99be2d6411bdb9a10ea7e9c92c9510eb373a26176b48b934890: >> > users snmpv3 authentication admin md5 >> > users passwd user >> > >> >> :v1:81439e52f35ecca73b21339156609d20cf630a65d0e92261cb29e58647ae54f4: >> > users snmpv3 authentication user md5 >> > >> > lineconfig >> > exit >> > >> > no spanning-tree >> > >> > !IGMP Snooping >> > exit >> > >> > >> > (Hirschmann Railswitch) #logoutConnection closed by >> > foreign host. >> > -bash-4.2$ >> > >> > Cheers, >> > Rod. >> > >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hirschmann.pm Type: application/octet-stream Size: 4287 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hmlogin Type: application/octet-stream Size: 23077 bytes Desc: not available URL: From Sebastien.Boulianne at cpu.ca Mon Dec 28 20:36:44 2015 From: Sebastien.Boulianne at cpu.ca (Sebastien.Boulianne at cpu.ca) Date: Mon, 28 Dec 2015 15:36:44 -0500 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. Message-ID: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> Hi all, I upgraded my debian os to the latest version and I saw there is an issue with the latest version of OpenSSH. dpkg -l | grep openssh ii openssh-client 1:7.1p1-5 amd64 secure shell (SSH) client, for secure access to remote machines ii openssh-server 1:7.1p1-5 amd64 secure shell (SSH) server, for secure access from remote machines ii openssh-sftp-server 1:7.1p1-5 amd64 secure shell (SSH) sftp server module, for SFTP access from remote machine I got this error... bin/flogin tr.1 tr.1 spawn ssh -c 3des -x -l cpu_backup tr.1 Unknown cipher type '3des' Error: Couldn't login Anyone ever had this problem ? How did fix it ? Thanks you very much and merry christmas. ;) S?bastien -------------- next part -------------- An HTML attachment was scrubbed... URL: From ler762 at gmail.com Mon Dec 28 20:55:08 2015 From: ler762 at gmail.com (Lee) Date: Mon, 28 Dec 2015 15:55:08 -0500 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> Message-ID: Hi, On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: > Hi all, > > I upgraded my debian os to the latest version and I saw there is an issue > with the latest version of OpenSSH. > > dpkg -l | grep openssh > ii openssh-client 1:7.1p1-5 amd64 > secure shell (SSH) client, for secure access to remote machines > ii openssh-server 1:7.1p1-5 amd64 > secure shell (SSH) server, for secure access from remote machines > ii openssh-sftp-server 1:7.1p1-5 amd64 > secure shell (SSH) sftp server module, for SFTP access from remote > machine > > I got this error... > > bin/flogin tr.1 > tr.1 > spawn ssh -c 3des -x -l cpu_backup tr.1 > Unknown cipher type '3des' > > Error: Couldn't login > > Anyone ever had this problem ? > How did fix it ? change cyphertype in ~/.cloginrc to aes256-cbc - ie. add method * {ssh} # add cyphertype * {3des} add cyphertype * {aes256-cbc} Regards, Lee From Sebastien.Boulianne at cpu.ca Mon Dec 28 21:30:32 2015 From: Sebastien.Boulianne at cpu.ca (Sebastien.Boulianne at cpu.ca) Date: Mon, 28 Dec 2015 16:30:32 -0500 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> Message-ID: <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> WOW. Thanks for your very fast answer. It's appreciate. It works perfectly... AND for that, do you have a clue Lee ? bin/flogin b.10.10.84.8 b.10.10.84.8 spawn ssh -1 -c aes256-cbc -x -l admin b.10.10.84.8 ssh1 is not supported Error: Couldn't login S?bastien Boulianne -----Message d'origine----- De?: Lee [mailto:ler762 at gmail.com] Envoy??: 28 d?cembre 2015 15:55 ??: Sebastien Boulianne Cc?: rancid-discuss at shrubbery.net Objet?: Re: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. Hi, On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: > Hi all, > > I upgraded my debian os to the latest version and I saw there is an > issue with the latest version of OpenSSH. > > dpkg -l | grep openssh > ii openssh-client 1:7.1p1-5 amd64 > secure shell (SSH) client, for secure access to remote machines > ii openssh-server 1:7.1p1-5 amd64 > secure shell (SSH) server, for secure access from remote machines > ii openssh-sftp-server 1:7.1p1-5 amd64 > secure shell (SSH) sftp server module, for SFTP access from remote > machine > > I got this error... > > bin/flogin tr.1 > tr.1 > spawn ssh -c 3des -x -l cpu_backup tr.1 Unknown cipher type '3des' > > Error: Couldn't login > > Anyone ever had this problem ? > How did fix it ? change cyphertype in ~/.cloginrc to aes256-cbc - ie. add method * {ssh} # add cyphertype * {3des} add cyphertype * {aes256-cbc} Regards, Lee From alan.mckinnon at gmail.com Mon Dec 28 21:50:54 2015 From: alan.mckinnon at gmail.com (Alan McKinnon) Date: Mon, 28 Dec 2015 23:50:54 +0200 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> Message-ID: <5681AEBE.30706@gmail.com> On 28/12/2015 23:30, Sebastien.Boulianne at cpu.ca wrote: > WOW. Thanks for your very fast answer. It's appreciate. > It works perfectly... > > AND for that, do you have a clue Lee ? > > bin/flogin b.10.10.84.8 > b.10.10.84.8 > spawn ssh -1 -c aes256-cbc -x -l admin b.10.10.84.8 > ssh1 is not supported > > Error: Couldn't login Now you have a real problem. I could be wrong on the details, I believe debian now disables all support for ssh1 protocol in openssh-7 and above. In other words, you will never use that ssh to log into that device - the code is not there. Do check the Changelogs for your distro, debian and derivatives are very good at listing exactly what changed. If ssh1 support is indeed gone you have three options: Does flogin then attempt an ssh2 login which succeeds? If so, you must modify flogin to prevent it trying ssh1 protocol. Other than that, you have some options, none of them especially nice: 1. downgrade openssh on the rancid host to 6.x 2. replace the network device with something shipped this millenium 3. install the openssh sources and recompile with ssh1 support enabled You were always going to have to deal with this sometime, now is a good time. ssh1 should have died by fire 10 or more years ago /alanm > > S?bastien Boulianne > > -----Message d'origine----- > De : Lee [mailto:ler762 at gmail.com] > Envoy? : 28 d?cembre 2015 15:55 > ? : Sebastien Boulianne > Cc : rancid-discuss at shrubbery.net > Objet : Re: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. > > Hi, > > On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: >> Hi all, >> >> I upgraded my debian os to the latest version and I saw there is an >> issue with the latest version of OpenSSH. >> >> dpkg -l | grep openssh >> ii openssh-client 1:7.1p1-5 amd64 >> secure shell (SSH) client, for secure access to remote machines >> ii openssh-server 1:7.1p1-5 amd64 >> secure shell (SSH) server, for secure access from remote machines >> ii openssh-sftp-server 1:7.1p1-5 amd64 >> secure shell (SSH) sftp server module, for SFTP access from remote >> machine >> >> I got this error... >> >> bin/flogin tr.1 >> tr.1 >> spawn ssh -c 3des -x -l cpu_backup tr.1 Unknown cipher type '3des' >> >> Error: Couldn't login >> >> Anyone ever had this problem ? >> How did fix it ? > > change cyphertype in ~/.cloginrc to aes256-cbc - ie. > > add method * {ssh} > # add cyphertype * {3des} > add cyphertype * {aes256-cbc} > > Regards, > Lee > _______________________________________________ > 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 Sebastien.Boulianne at cpu.ca Mon Dec 28 21:59:52 2015 From: Sebastien.Boulianne at cpu.ca (Sebastien.Boulianne at cpu.ca) Date: Mon, 28 Dec 2015 16:59:52 -0500 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> Message-ID: <5FE0959288C73D448BB44CB7E9CC320F5829B126D1@CPUMAIL2.cpu.qc.ca> I know that most devices use SSH2 but some are very old and I didn't find a recent firmware... This switch is a HP ProCurve 2650. ssh -2 -c aes256-cbc -x -l admin b.10.10.84.8 Protocol major versions differ: 2 vs. 1 Thanks. S?bastien Boulianne -----Message d'origine----- De?: Aaron Dudek [mailto:adudek16 at gmail.com] Envoy??: 28 d?cembre 2015 16:55 ??: Sebastien Boulianne Cc?: ler762 at gmail.com; rancid-discuss at shrubbery.net Objet?: Re: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. Don't use ssh version 1. Most modern devices have moved to version 2 spawn ssh -1 -1 Forces ssh to try protocol version 1 only. Verify that the device supports version 2 via ssh -2 -c aes256-cbc -x -l admin b.10.10.84.8 from the command line. You can add -v -v -v to to the command to see the debug logs. Aaron On Mon, Dec 28, 2015 at 4:30 PM, wrote: > WOW. Thanks for your very fast answer. It's appreciate. > It works perfectly... > > AND for that, do you have a clue Lee ? > > bin/flogin b.10.10.84.8 > b.10.10.84.8 > spawn ssh -1 -c aes256-cbc -x -l admin b.10.10.84.8 > ssh1 is not supported > > Error: Couldn't login > > S?bastien Boulianne > > -----Message d'origine----- > De : Lee [mailto:ler762 at gmail.com] > Envoy? : 28 d?cembre 2015 15:55 > ? : Sebastien Boulianne Cc : > rancid-discuss at shrubbery.net Objet : Re: [rancid] Issues with the > latest version of OpenSSH and Rancid 3.2-2. > > Hi, > > On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: >> Hi all, >> >> I upgraded my debian os to the latest version and I saw there is an >> issue with the latest version of OpenSSH. >> >> dpkg -l | grep openssh >> ii openssh-client 1:7.1p1-5 amd64 >> secure shell (SSH) client, for secure access to remote machines >> ii openssh-server 1:7.1p1-5 amd64 >> secure shell (SSH) server, for secure access from remote machines >> ii openssh-sftp-server 1:7.1p1-5 amd64 >> secure shell (SSH) sftp server module, for SFTP access from remote >> machine >> >> I got this error... >> >> bin/flogin tr.1 >> tr.1 >> spawn ssh -c 3des -x -l cpu_backup tr.1 Unknown cipher type '3des' >> >> Error: Couldn't login >> >> Anyone ever had this problem ? >> How did fix it ? > > change cyphertype in ~/.cloginrc to aes256-cbc - ie. > > add method * {ssh} > # add cyphertype * {3des} > add cyphertype * {aes256-cbc} > > Regards, > Lee > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From adudek16 at gmail.com Mon Dec 28 21:54:37 2015 From: adudek16 at gmail.com (Aaron Dudek) Date: Mon, 28 Dec 2015 16:54:37 -0500 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> Message-ID: Don't use ssh version 1. Most modern devices have moved to version 2 spawn ssh -1 -1 Forces ssh to try protocol version 1 only. Verify that the device supports version 2 via ssh -2 -c aes256-cbc -x -l admin b.10.10.84.8 from the command line. You can add -v -v -v to to the command to see the debug logs. Aaron On Mon, Dec 28, 2015 at 4:30 PM, wrote: > WOW. Thanks for your very fast answer. It's appreciate. > It works perfectly... > > AND for that, do you have a clue Lee ? > > bin/flogin b.10.10.84.8 > b.10.10.84.8 > spawn ssh -1 -c aes256-cbc -x -l admin b.10.10.84.8 > ssh1 is not supported > > Error: Couldn't login > > S?bastien Boulianne > > -----Message d'origine----- > De : Lee [mailto:ler762 at gmail.com] > Envoy? : 28 d?cembre 2015 15:55 > ? : Sebastien Boulianne > Cc : rancid-discuss at shrubbery.net > Objet : Re: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. > > Hi, > > On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: >> Hi all, >> >> I upgraded my debian os to the latest version and I saw there is an >> issue with the latest version of OpenSSH. >> >> dpkg -l | grep openssh >> ii openssh-client 1:7.1p1-5 amd64 >> secure shell (SSH) client, for secure access to remote machines >> ii openssh-server 1:7.1p1-5 amd64 >> secure shell (SSH) server, for secure access from remote machines >> ii openssh-sftp-server 1:7.1p1-5 amd64 >> secure shell (SSH) sftp server module, for SFTP access from remote >> machine >> >> I got this error... >> >> bin/flogin tr.1 >> tr.1 >> spawn ssh -c 3des -x -l cpu_backup tr.1 Unknown cipher type '3des' >> >> Error: Couldn't login >> >> Anyone ever had this problem ? >> How did fix it ? > > change cyphertype in ~/.cloginrc to aes256-cbc - ie. > > add method * {ssh} > # add cyphertype * {3des} > add cyphertype * {aes256-cbc} > > Regards, > Lee > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at shrubbery.net > http://www.shrubbery.net/mailman/listinfo/rancid-discuss From ler762 at gmail.com Mon Dec 28 22:14:43 2015 From: ler762 at gmail.com (Lee) Date: Mon, 28 Dec 2015 17:14:43 -0500 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> Message-ID: On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: > WOW. Thanks for your very fast answer. It's appreciate. > It works perfectly... > > AND for that, do you have a clue Lee ? > > bin/flogin b.10.10.84.8 > b.10.10.84.8 > spawn ssh -1 -c aes256-cbc -x -l admin b.10.10.84.8 > ssh1 is not supported > > Error: Couldn't login You can try adding this line to your ~/.ssh/config Protocol 2 and see if [whatever the device is] does ssh v2. If no, you're probably stuck trying to find the openssh release notes & figuring out how to enable v1 again.. Another problem I had after upgrading openssh, but darn if I can remember what it was, was either fixed or worked-around by adding KexAlgorithms +diffie-hellman-group1-sha1 to my ~/.ssh/config Regards, Lee > > S?bastien Boulianne > > -----Message d'origine----- > De : Lee [mailto:ler762 at gmail.com] > Envoy? : 28 d?cembre 2015 15:55 > ? : Sebastien Boulianne > Cc : rancid-discuss at shrubbery.net > Objet : Re: [rancid] Issues with the latest version of OpenSSH and Rancid > 3.2-2. > > Hi, > > On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: >> Hi all, >> >> I upgraded my debian os to the latest version and I saw there is an >> issue with the latest version of OpenSSH. >> >> dpkg -l | grep openssh >> ii openssh-client 1:7.1p1-5 amd64 >> secure shell (SSH) client, for secure access to remote machines >> ii openssh-server 1:7.1p1-5 amd64 >> secure shell (SSH) server, for secure access from remote machines >> ii openssh-sftp-server 1:7.1p1-5 amd64 >> secure shell (SSH) sftp server module, for SFTP access from remote >> machine >> >> I got this error... >> >> bin/flogin tr.1 >> tr.1 >> spawn ssh -c 3des -x -l cpu_backup tr.1 Unknown cipher type '3des' >> >> Error: Couldn't login >> >> Anyone ever had this problem ? >> How did fix it ? > > change cyphertype in ~/.cloginrc to aes256-cbc - ie. > > add method * {ssh} > # add cyphertype * {3des} > add cyphertype * {aes256-cbc} > > Regards, > Lee > From howie at thingy.com Tue Dec 29 10:40:21 2015 From: howie at thingy.com (Howard Jones) Date: Tue, 29 Dec 2015 10:40:21 +0000 Subject: [rancid] Issues with the latest version of OpenSSH and Rancid 3.2-2. In-Reply-To: References: <5FE0959288C73D448BB44CB7E9CC320F5829B126CB@CPUMAIL2.cpu.qc.ca> <5FE0959288C73D448BB44CB7E9CC320F5829B126CE@CPUMAIL2.cpu.qc.ca> Message-ID: <56826315.8010103@thingy.com> On 28/12/2015 22:14, Lee wrote: > On 12/28/15, Sebastien.Boulianne at cpu.ca wrote: >> WOW. Thanks for your very fast answer. It's appreciate. >> It works perfectly... >> >> AND for that, do you have a clue Lee ? >> >> bin/flogin b.10.10.84.8 >> b.10.10.84.8 >> spawn ssh -1 -c aes256-cbc -x -l admin b.10.10.84.8 >> ssh1 is not supported >> >> Error: Couldn't login > For a similar situation (I ended up resolving it a different way, but this was the temporary fix), I built last years OpenSSH in /opt/oldssh. When you build with GNU Configure, you can almost always add a --prefix flag to have it build somewhere non-standard. Then RANCID allows you to use the sshcmd directive in your .cloginrc to use /opt/oldssh/bin/ssh instead of the system ssh. Two things to note: you have last year's ssh bugs too, although that is usually more of a risk with the server than client, and also be sure to read the output from "./configure --prefix=/opt/oldssh" to make sure it won't touch /etc at all too. Or just compile as the RANCID user, so that it couldn't touch /etc even if it wanted to. You may also find you can build the current openssh, but without the (guessing the name) --without-ssh1 flag on configure. Howard