Andrew Fort | 2 May 2004 03:05

Re: Custom RANCID modules

Joshua Ginsberg wrote:

> I was wondering if anybody had any experience or pointers for somebody
> trying to begin creating RANCID modules for other types of networking
> equipment. I've looked at the code base, and I'm not really able to make
> heads or tails of how it all works. Thanks for any help you could
> provide.

If the device is vastly different than one of the others already in the 
distribution, you're going to need to produce *login program (normally 
written in expect) and an output parser *rancid program (which produces 
the data checked into CVS).

I've hacked with a couple of them (alteon, riverstone) that are in the 
distribution now; so the maintainers can provide you some more answers 
I'm sure.  My suggestions are:

- Try to modify what is in clogin (to handle your new device without 
breaking others using it) if the device works similarly enough (method 
of logging in, etc) to a cisco.  This applies for other login/parser 
pairs, also.  For example, Foundry made their CLI just different enough 
from Cisco IOS syntax that there are separate program for each of those 
vendors.

- expect doesn't have the most obvious syntax, so you'll need to stare 
at the code for longer than you would a more popular language.  If you 
are successful, hallucinations and madness will ensue.  At this time, 
you will be "expected".

The O'Reilly "Exploring Expect" book (Libes) is rumored to assist if you 
(Continue reading)

Joshua Ginsberg | 3 May 2004 16:37
Favicon

Re: Custom RANCID modules

Thanks for your reply, Andrew. So let the questions begin... :-D

I'm not the Perl Gods' gift to mankind, so could somebody briefly
explain to me what sub ProcessHistory does?

And to answer your question, my boss has instructed me to make RANCID
modules for Copper Mountain Copper Edge DSLAM's and for Lucent Stinger
DSLAM's.

Thanks again.

-jag

On Sat, 2004-05-01 at 19:05, Andrew Fort wrote:
> Joshua Ginsberg wrote:
> 
> > I was wondering if anybody had any experience or pointers for somebody
> > trying to begin creating RANCID modules for other types of networking
> > equipment. I've looked at the code base, and I'm not really able to make
> > heads or tails of how it all works. Thanks for any help you could
> > provide.
> 
> If the device is vastly different than one of the others already in the 
> distribution, you're going to need to produce *login program (normally 
> written in expect) and an output parser *rancid program (which produces 
> the data checked into CVS).
> 
> I've hacked with a couple of them (alteon, riverstone) that are in the 
> distribution now; so the maintainers can provide you some more answers 
> I'm sure.  My suggestions are:
(Continue reading)

Anchi Zhang | 4 May 2004 23:07
Picon
Favicon

what to do with "proceed (y/n) [n]?"

gmane.network.rancid
Mike J | 3 May 2004 16:46

help with TNT's

I was wondering if anybody had any experience or problems using RANCID with
Lucent Ascend TNT's. I can't find much documentation on the Lucent TNT's and
Rancid.  Any ideas or help would be greatly appreciated.

Mike
michaelj <at> nts-online.net

Andrew Partan | 5 May 2004 05:44

Re: what to do with "proceed (y/n) [n]?"

On Tue, May 04, 2004 at 02:07:41PM -0700, Anchi Zhang wrote:
> How would you use Rancid to handle situations like one below?
>  
> 1km-dmz-cx1> (enable) copy config slot0:config
> This command uploads non-default configurations only.
> Use 'copy config <file-id> all' to upload both default and non-default 
> configurations.
> 
> Upload configuration to slot0:config
> 
> 18355672 bytes available on device slot0, proceed (y/n) [n]? y
> ...............
> 
> --0-1985934314-1083704861=:17368--

Take a look at cisco-load.exp and cisco-reload.exp (both distributed
as example scripts with rancid) and see if either can be modified
to do what you need.
	--asp

john heasley | 5 May 2004 08:57

Re: help with TNT's

Mon, May 03, 2004 at 09:46:44AM -0500, Mike J:
> I was wondering if anybody had any experience or problems using RANCID with
> Lucent Ascend TNT's. I can't find much documentation on the Lucent TNT's and
> Rancid.  Any ideas or help would be greatly appreciated.
> 
> Mike
> michaelj <at> nts-online.net

The tnt module was contributed, we dont have any ourselves.  perhaps if
you describe your problem, we can help debug.

john heasley | 5 May 2004 09:13

Re: Custom RANCID modules

Mon, May 03, 2004 at 08:37:20AM -0600, Joshua Ginsberg:
> Thanks for your reply, Andrew. So let the questions begin... :-D
> 
> I'm not the Perl Gods' gift to mankind, so could somebody briefly
> explain to me what sub ProcessHistory does?

ProcessHistory(tag, command, command arg, line)

command is one of the functions keynsort, keysort, valsort, numsort, or
ipsort.  see the comments.

basically, lines (of the output collected from the router) are "buffered"
or "queued" with the given command and tag until of them changes, at
which point the buffer is flushed.

so,
        /^Cisco Secure PIX /i &&
            ProcessHistory("COMMENTS","keysort","F1", "!Image: $_") && next;
        /^This PIX has an?\s+(.*)$/ &&
            ProcessHistory("COMMENTS","keysort","C1", "!$_") && next;

lines matching these would be buffered and sorted with keysort whose
arg is F1 or C1.  if it then hit

        /^Serial Number:\s+(.*)$/ && 
            ProcessHistory("FOO","keysort","C1", "!$_") && next;
or
        /^(HD unit \d), idb/ &&
            ProcessHistory("INT","","","!Interface: $1\n") && next;

(Continue reading)

Andrew Fort | 6 May 2004 06:20

Re: Custom RANCID modules

On 4/05/2004 12:37 AM, Joshua Ginsberg wrote:

>And to answer your question, my boss has instructed me to make RANCID
>modules for Copper Mountain Copper Edge DSLAM's and for Lucent Stinger
>DSLAM's.
>
>Thanks again.
>
>-jag
>  
>

I think I still have some Stingers in the labs, I think there's even 
some modules in them, still.   I should be able to help you test if they 
haven't died :-)

-afort

Arnold Nipper | 12 May 2004 23:47
Picon

ssh with authorized_keys

I'm trying to use rancid for quagga as well. Quagga either supports
access via telnet on port 260x or via vtysh/ssh.

To use rancid with telnet on port 260x works quite well, but I run into
problems when I want to use it with vtysh/ssh. Obviously rancid also
expects to login via username/password. When using ssh & ssh-agent I no
longer need an username/password. I fiddled around with different
settings but can not convince rancid to not echo the username. It always
looks like

 Hello, this is quagga (version 0.96.4).
 Copyright 1996-2002 Kunihiro Ishiguro.

 rs1> quagga
 % Unknown command.
 rs1>

Any ideas how to configure this?

Arnold

Andrew Partan | 12 May 2004 23:55

Re: ssh with authorized_keys

On Wed, May 12, 2004 at 11:47:31PM +0200, Arnold Nipper wrote:
> To use rancid with telnet on port 260x works quite well, but I run into
> problems when I want to use it with vtysh/ssh. Obviously rancid also
> expects to login via username/password. When using ssh & ssh-agent I no
> longer need an username/password. I fiddled around with different
> settings but can not convince rancid to not echo the username. It always
> looks like

jlogin does not insist on sending the username.  Have you tried jlogin?
Or just clogin?
	--asp


Gmane