Mailing List Archive

how use an edited version of cat5rancid
Hello,

I have successfully installed rancid and it working great for some of my Cisco switches.
The ones that work are for the Cisco Catalyst 4003.

I have a bunch of Catalyst 3548s that don't appear to work.
In my router.db file I have:

cat4003-mez.plumtree.com:cat5:up
cat4003-2nd.plumtree.com:cat5:up
cat4003-3rd.plumtree.com:cat5:up
cat4006-server.plumtree.com:cat5:up
cat3548-2nd.plumtree.com:cat5:up
cat3548-3rd.plumtree.com:cat5:up
cat3548-svr-sw1.plumtree.com:cat5:up
cat3548-svr-sw2.plumtree.com:cat5:up
cat3548-svr-sw3.plumtree.com:cat5:up
cat3548-svr-sw4.plumtree.com:cat5:up

So I am using "cat5" for mfg for my cisco catalyst switches. However, when I run do-diffs, nothing happens for the cat3548s. When I run rancid or cat5rancid (for debugging) I get errors. Basically, some of the called commands from the scripts don't work .. ie

[rancid at Nagios bin]$ ./cat5rancid -d cat3548-2nd.plumtree.com
executing clogin -t 90 -c"show version;show boot;show flash;dir bootflash:;dir slot0:;dir slot1:;dir sup-bootflash:;dir sup-microcode:;show module;show port ifindex;write term" cat3548-2nd.plumtree.com
cat3548-2nd.plumtree.com: missed cmd(s): show port ifindex,show module,dir sup-microcode:,dir sup-bootflash:,dir bootflash:,dir slot0:,show version,show flash,write term,show boot,dir slot1:
cat3548-2nd.plumtree.com: missed cmd(s): show port ifindex,show module,dir sup-microcode:,dir sup-bootflash:,dir bootflash:,dir slot0:,show version,show flash,write term,show boot,dir slot1:
cat3548-2nd.plumtree.com: End of run not found
cat3548-2nd.plumtree.com: End of run not found


Some of the commands mention above dont' work. It appears that cat5rancid does not output anything if any of the commands don't work while rancid at least spits out whatever it can find.

So my questions are:

- how do we know if rancid or cat5rancid is called? (should I use cisco as the mfg in my router.db file?)
- how do we get rancid to call an edited version of any of these scripts?

thanks,

Jason T.
how use an edited version of cat5rancid [ In reply to ]
On Thu, Oct 16, 2003 at 10:36:51AM -0700, Jason Truong wrote:
> So I am using "cat5" for mfg for my cisco catalyst switches.
> However, when I run do-diffs, nothing happens for the cat3548s.
> When I run rancid or cat5rancid (for debugging) I get errors.
> Basically, some of the called commands from the scripts don't work

I never remember which ciscos are best done with type 'cisco'
(rancid) or type 'cat5' (cat5rancid). I usually use rancid 1st,
and if that fails, then use cat5rancid. [.See bin/rancid-fe for the
bit that goes from type to program.]

In any case, the 'missed cmds' message means that the program
(cat5rancid in this case) has problems logging into the router &
could not run all of the commands. The programs deal with 'command
not found' or 'invalid command' just fine; its when they can't even
run the commands that they complain about missed commands.

So I'd look into why you can't log into the router & run commands.
Can you use clogin to log into the routers having problems? Can
you run some commands with:
clogin -c "show version;show version" rtr1
without problems?

Btw, the missed commands that you listed are *all* of the commands
that cat5rancid is trying to run - i.e.: it was unable to run any
of them.
--asp
how use an edited version of cat5rancid [ In reply to ]
> I never remember which ciscos are best done with type 'cisco'
> (rancid) or type 'cat5' (cat5rancid). I usually use rancid 1st,
> and if that fails, then use cat5rancid. [.See bin/rancid-fe for the
> bit that goes from type to program.]

If it runs IOS, use "cisco". If it runs CatOS, use "cat5". I
probably should have put a check in cat5rancid to see if the target
device was running IOS and return a "you're using the wrong device
type" error, but cat5rancid was originally a hack for my own use only.

A switch running in hybrid mode should be treated like a C5K with an
attached RSM - separate router.db entries, one of type "cat5" for the
switch and one of type "cisco" for the router. Native mode switches
only need a single "cisco" entry for the whole switch/router combo.

Similarly, any module that you get to with the "session" command is
running a private copy of IOS and should be configured as a separate
entry in router.db of type "cisco".

Terry Kennedy http://www.tmk.com
terry at tmk.com New York, NY USA
how use an edited version of cat5rancid [ In reply to ]
>I have successfully installed rancid and it working great for some
>of my Cisco switches.
>The ones that work are for the Cisco Catalyst 4003.
>
>I have a bunch of Catalyst 3548s that don't appear to work.
>In my router.db file I have:
>
>So I am using "cat5" for mfg for my cisco catalyst switches.
>However, when I run do-diffs, nothing happens for the cat3548s. When
>I run rancid or cat5rancid (for debugging) I get errors. Basically,
>some of the called commands from the scripts don't work .. ie

Catalyst 3548's run IOS so you need to use the 'cisco' RANCID
directive. On the other hand, Catalyst 2980's (which are Catalyst
4000 series switches) run CatOS. So just because the model is a
Catalyst doesn't mean it is running CatOS. I don't know why the
Cisco naming is so convoluted. If a 'show ver' on the switch reveals
that the binary OS image starts with 'cat' such as cat4000.6-3-3a.bin
then it's running CatOS and you need to use the RANCID directive
'cat5'. Otherwise it is running IOS and needs to use RANCID
directive 'cisco'.

There may be exceptions to this. That is the way it looks to me
based on the Cisco equipment I happen to have.

Mark