Discussion:
[rancid] Enterasys C-Series
Rob Yamry
2011-02-21 21:33:29 UTC
Permalink
Hi All-
I have rancid set up and working for cisco and hp devices. I also have
Enterasys C-Series switches in my environment. Does anybody have a config
for enterasys switches or can you point me in the direction of producing
one? Ive tried editing some of the other rancid files (ie hrancid,
cat5rancid, etc) and am not having any luck. The switches use 'show config'
to output the config...thats about all Im looking to grab from them.

Thanks!
-Rob
Corey Quinn
2011-02-22 01:06:10 UTC
Permalink
Post by Rob Yamry
Hi All-
I have rancid set up and working for cisco and hp devices. I also have Enterasys C-Series switches in my environment. Does anybody have a config for enterasys switches or can you point me in the direction of producing one? Ive tried editing some of the other rancid files (ie hrancid, cat5rancid, etc) and am not having any luck. The switches use 'show config' to output the config...thats about all Im looking to grab from them.
What do your transaction logs say when you attempt to pull the configs via a rancid-run -r $YOUR_SWITCH?

I find it's often enlightening when tracking this stuff down...

- -- Corey / KB1JWQ
Rob Yamry
2011-02-22 02:14:16 UTC
Permalink
Post by Corey Quinn
What do your transaction logs say when you attempt to pull the configs via
a rancid-run -r $YOUR_SWITCH?
I find it's often enlightening when tracking this stuff down...
Hi-
Thanks for the reply. The logs show this:

Getting missed routers: round 4.
switch_enterasys: missed cmd(s): system show hardware,system show
version,system show active-config,system show uptime
switch_enterasys: End of run not found

The end of run not found is what Ive been seeing the whole time. I tried to
modify a script (Im not a programmer) and put in some reg exp to look for
the end, but I couldnt get it working.

My goals for this is pretty simple....just get a config using the 'show
config'. Im not sure if this helps, but the prompt for the cli on these
looks like "switch3(su)->" and the config ends with a literal "end". Some
switches need the space bar pressed to advance the output.

Thanks again for your help.
Rob Yamry
2011-02-22 14:31:13 UTC
Permalink
I think Im getting close on this. I edited the rancid script and change the
"write term" command to "show config". I putzed around with it and got it
to where I can run "rancid.mod -d sw_enterasys" and itll create a .new file
with an output of the config but I still get the "end of run not found".
Jethro R Binks
2011-02-22 15:06:34 UTC
Permalink
Post by Rob Yamry
I think Im getting close on this. I edited the rancid script and change the
"write term" command to "show config". I putzed around with it and got it
to where I can run "rancid.mod -d sw_enterasys" and itll create a .new file
with an output of the config but I still get the "end of run not found".
Rob Yamry
2011-02-22 15:17:25 UTC
Permalink
(I've not been closely following this thread)
So if $found_end is true, then /$prompt\s?(quit|exit|Connection( to \S+)?
closed)/ must not be, for $clean_run not to be true.
What does the end of "show config" look like?
The end will look something like this:

!
end
switch(su)->
but! The "end" is sometimes not there. Not sure why.

Also, I set $clean_run at the top of the script and had the variable printed
in various parts to see if it got changed at all. I changed it to 2 so I
could see if it got changed to 0 or 1. It didnt. It ended with a value of
2.
Corey Quinn
2011-02-22 17:23:58 UTC
Permalink
!
end
switch(su)->
switch(su)-> should be the terminator then, regardless if "end" is found or not.

You might packet capture this and see what's actually coming back over the wire (assuming telnet). I've seen similar issues before where the (radware) switch was actually echoing what the user had input-- once that was turned off, Rancid "just worked."

-- Corey / KB1JWQ
Jethro R Binks
2011-02-22 20:38:06 UTC
Permalink
Post by Corey Quinn
!
end
switch(su)->
switch(su)-> should be the terminator then, regardless if "end" is found or not.
You might packet capture this and see what's actually coming back over
the wire (assuming telnet). I've seen similar issues before where the
(radware) switch was actually echoing what the user had input-- once
that was turned off, Rancid "just worked."
env NOPIPE=YES PATH=${PATH}:/usr/local/libexec/rancid rancid -d devicename

substituting the second "rancid" with the appropriate *rancid and
modifying the path as appropriate.

Then check out the .raw file produced.

You previously said: "Some switches need the space bar pressed to advance
the output.". If you can't disable per-session paging (commands like
"screen length 0" and their ilk), then *login will need to recognise the
paging prompt ("--- More ---" etc), send a space when it sees it, and
*rancid will need to be able to filter out the paging prompt, control
characters etc. It might be that the paging prompt on your devices isn't
being recognised by *login/*rancid.

Jethro.

. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK

The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.

Loading...