catos on cat5500 issues

john heasley heas at shrubbery.net
Fri Feb 20 05:47:32 UTC 2004


Wed, Feb 18, 2004 at 06:10:21PM -0700, Jason Ornstein:
> I've just started to play with Rancid and am still learning on how
> to do the tuning part of it.  The issue that I'm currently having
> appears to have been around for awhile based on past email on this
> list, but I didn't see a solution posted, so I thought I'd bring it
> up again.
> 
> This is using the rancid 2.2.2 against a Cisco Catalyst 5500 running
> CatOS 6.3.5.
> 
> The first issue is that it appears that some of the commands from 
> clogin aren't being sent when cat5rancid is being run.  Part of 
> the diff that is sent to me is:
> 
> + 2004 Feb 18 16:06:58 MST -07:00 %PAGP-5-PORTFROMSTP:Port 11/15 left
> bridge port 11/15

the "set logging session disable" from below would get rid of messages
like this one.

> So, while rancid was grabbing the config, someone disconnected their
> machine and it got logged to the telnet session.  From clogin, around
> line 751 there is this section of code:
> 
>         # If the prompt is (enable), then we are on a switch and the
>         # command is "set length 0"; otherwise its "term length
>         # 0".
>         if [ regexp -- ".*> .*enable" "$prompt" ] {
>             send "set length 0\r"
>             send "set logging session disable\r"
> 
> And when I run 'cat5rancid -d boulder-cat3' and look at the raw file, 
> I never see the second line above being output.  

what follows that is an expect clause.  expect will buffer the output
(input) trying to match the prompt, so you may not see them if it is
never getting a prompt back and times-out.

> It could be that this section of code is never being hit as I'm not
> sure if the $do_script is valid coming right above this section of
> code.  

Correct, that would be the path for -s

> It could be taht the second logging line needs to be inserted in the
> run_commands code at line 487.  Has anyone done this or does it break
> other platforms?

That is a bug; it should appear there.  thanks.

do those commands work on whatever catos flavour of the month you are
running?  does your prompt look something like "switch> (enable)"?  do
you get a usable login with 'clogin swtich'?  my WAG would be that the
prompt just isnt being matched properly.

> And the second, and maybe easier issue, is that after people disconnect
> from the switch other lines in the config change which cause email to be
> sent.  Some of those lines would look like this in the diff output:
> 
> - set spantree portcost
>   2/1,2/3,2/5,2/11,2/14,2/16-19,2/21,2/26-27,2/34,2/38,2/40-42,2/46-48
>   200000 mst
> + set spantree portcost
>   2/1-2,2/4,2/6-10,2/12-13,2/15,2/20,2/22-25,2/28-33,2/35-37,2/39,2/43-45
>   2000000 mst
> 
> This is on the same Catalyst above.  Is there a way to filter this not 
> being sent and/or being collected as a diff?

it would have to be filtered in cat5rancid, though it is not clear to me
that it should be.  why would spanning tree be enabled on a user interface?



More information about the Rancid-discuss mailing list