Re: [j-nsp] Juniper RANCID

2010-07-16 Thread David DeSimone
Stefan Schlesinger s...@ono.at wrote:

 I'm trying to get RANCID to work with jlogin on my SRX100. I
 configured my router.db and .cloginrc. The following command
 can login to the router, but it doesn't backup anything.
 
   $ bin/jlogin -f .cloginrc 192.168.0.13

Check what's in rancid's logs directory to get a hint as to what is
failing.

Also I suggest you test with jlogin -c 'show version' to see what
happens when jlogin tries to run a command and collect output.

99% of rancid's problems stem from failing to be able to detect the
device's prompt correctly, so it can't tell when it is supposed to be
submitting commands.  That said, your device's prompt doesn't look
unusual so I'm not sure why it would fail.

Perhaps rancid is not recognizing a particular command's output, which
is something that your logs will tell you.

-- 
David DeSimone == Network Admin == f...@verio.net
  I don't like spinach, and I'm glad I don't, because if I
   liked it I'd eat it, and I just hate it. -- Clarence Darrow


This email message is intended for the use of the person to whom it has been 
sent, and may contain information that is confidential or legally protected. If 
you are not the intended recipient or have received this message in error, you 
are not authorized to copy, distribute, or otherwise use this message or its 
attachments. Please notify the sender immediately by return e-mail and 
permanently delete this message and any attachments. Verio, Inc. makes no 
warranty that this email is error or virus free.  Thank you.
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] Juniper RANCID

2010-07-16 Thread Stefan Fouant
 -Original Message-
 From: juniper-nsp-boun...@puck.nether.net [mailto:juniper-nsp-
 boun...@puck.nether.net] On Behalf Of David DeSimone
 Sent: Friday, July 16, 2010 3:40 AM
 To: juniper-nsp@puck.nether.net
 Subject: Re: [j-nsp] Juniper RANCID
 
 99% of rancid's problems stem from failing to be able to detect the
device's
 prompt correctly, so it can't tell when it is supposed to be submitting
 commands.  That said, your device's prompt doesn't look unusual so I'm not
 sure why it would fail.

I think the problem is that it's *not* failing.  As others have pointed out,
jlogin is working as expected given the input the user has provided - it's
doing what he's asked of it and that is simply to automate the login.

In order to do anything beyond that he is going to need to pass along
commands as input to the jlogin command as either a single string using the
argument -c or via a command file using the argument -x.  See additional
information from the jlogin manpages below:

-c
Command to be run on each router list on the command-line. Multiple commands
maybe listed by separating them with semicolons (;). The argument should be
quoted to avoid shell expansion.

-x 
Similar to the -c option; -x specifies a file with commands to run on each
of the routers. The commands must not expect additional input, such as 'copy
rcp startup-config' does.

HTHs.

Stefan Fouant, CISSP, JNCIEx2
www.shortestpathfirst.net
GPG Key ID: 0xB5E3803D

___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] Juniper RANCID

2010-07-16 Thread Stefan Schlesinger
On Jul 16, 2010, at 03:11 , ck wrote:

 your output is expected behavior. jlogin is just an expect script that logs 
 into the devices.
 
 if you're configuration is complete (with cron job/etc and you just want to 
 test you can run the following /blah/blah/rancid/bin/rancid-run to run rancid

Thank you everyone. I finally got it working. :-)
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] Juniper RANCID

2010-07-15 Thread ck
your output is expected behavior. jlogin is just an expect script that logs
into the devices.

if you're configuration is complete (with cron job/etc and you just want to
test you can run the following /blah/blah/rancid/bin/rancid-run to run
rancid

-ck



On Thu, Jul 15, 2010 at 4:53 PM, Stefan Schlesinger s...@ono.at wrote:

 Hello Folks,

 I'm trying to get RANCID to work with jlogin on my SRX100. I
 configured my router.db and .cloginrc. The following command
 can login to the router, but it doesn't backup anything.

$ bin/jlogin -f .cloginrc 192.168.0.13


 I'm running rancid 2.3.3, and here are my configuration files:

 .cloginrc
add password 192.168.0.* pwdstring
add user 192.168.0.* rancid
add method   192.168.0.* {ssh}
 --

 var/noc/router.db:
192.168.0.13:juniper:up
 --

 The following happens when i run the command line from above:


 $ bin/jlogin -f .cloginrc 192.168.0.13
spawn ssh -c 3des -x -l rancid 192.168.0.13
ran...@192.168.0.13's password:
--- JUNOS 10.1R3.7 built 2010-07-10 08:32:02 UTC
ran...@juniper-01

ran...@juniper-01



 Maybe someone on the list could provide me with some advice on how
 to get that working.

 Regards, Stefan.

 --
 Stefan Schlesinger // ///
 s...@ono.at
 ___
 juniper-nsp mailing list juniper-nsp@puck.nether.net
 https://puck.nether.net/mailman/listinfo/juniper-nsp

___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] Juniper RANCID

2010-07-15 Thread Dale Shaw
Hi Stefan,

On Fri, Jul 16, 2010 at 9:53 AM, Stefan Schlesinger s...@ono.at wrote:

 I'm trying to get RANCID to work with jlogin on my SRX100. [...]

 The following happens when i run the command line from above:

 $ bin/jlogin -f .cloginrc 192.168.0.13
        spawn ssh -c 3des -x -l rancid 192.168.0.13
        ran...@192.168.0.13's password:
        --- JUNOS 10.1R3.7 built 2010-07-10 08:32:02 UTC
        ran...@juniper-01

Looks like 'jlogin' is working just fine. 'jlogin' automates logins
and (optionally) allows you to execute commands (using -c or -x).
'jrancid' does the work to collect and store command output in CVS,
but typically it is not executed directly.

Have you run rancid-cvs and then rancid-run? Have you set up rancid.conf?

Follow some of the links from: http://www.shrubbery.net/rancid/#started

cheers,
Dale

___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp