Mailing List Archive

hlogin and hp2424/4000/8000 ?
Has anyone got hrancid/hlogin working with the Procurve 2424/4000/8000
switches? It looks like hlogin is meant for a newer switch that has
a more command-line like interface and an extra command or two. To
get to the command prompt, you have to enter a couple of menu choices
after logging in ("5", then "4", no carriage returns, then get a line
with a VLAN prompt and enter a CR), and there's no router prompt to speak
of because the telnet interface keeps sending cursor control characters
to show you the current time in the upper right corner.
hlogin and hp2424/4000/8000 ? [ In reply to ]
Tue, May 10, 2005 at 09:44:58AM -0400, Ed Ravin:
> Has anyone got hrancid/hlogin working with the Procurve 2424/4000/8000
> switches? It looks like hlogin is meant for a newer switch that has
> a more command-line like interface and an extra command or two. To
> get to the command prompt, you have to enter a couple of menu choices
> after logging in ("5", then "4", no carriage returns, then get a line
> with a VLAN prompt and enter a CR), and there's no router prompt to speak
> of because the telnet interface keeps sending cursor control characters
> to show you the current time in the upper right corner.

I'm not really keen on supporting such platforms. Changes to the menus
are very likely, such that those selections no longer invoke the CLI.
To handle that in a reasonable way, hlogin would have to grovel the
menu and pick out the selections - not pleasant.

HP is a particular PITA, as their interface produces gobs of vt screen
handling codes that are a real bugger to filter.

% script hplog
% telnet switch

will give you a good idea. you're welcome to send the log; maybe these
actually have clean output.
hlogin and hp2424/4000/8000 ? [ In reply to ]
On Wed, May 11, 2005 at 10:57:10AM -0700, john heasley wrote:
> Tue, May 10, 2005 at 09:44:58AM -0400, Ed Ravin:
> > Has anyone got hrancid/hlogin working with the Procurve 2424/4000/8000
> > switches? It looks like hlogin is meant for a newer switch that has
> > a more command-line like interface and an extra command or two. To
> > get to the command prompt, you have to enter a couple of menu choices
> > after logging in ("5", then "4", no carriage returns, then get a line
> > with a VLAN prompt and enter a CR), and there's no router prompt to speak
> > of because the telnet interface keeps sending cursor control characters
> > to show you the current time in the upper right corner.
>
> I'm not really keen on supporting such platforms. Changes to the menus
> are very likely, such that those selections no longer invoke the CLI.

This particular platform hasn't changed its top-level menu for years,
and the boxes are getting old enough that I doubt HP will do anything
other than fix bugs in future firmware revs.

> HP is a particular PITA, as their interface produces gobs of vt screen
> handling codes that are a real bugger to filter.
>
> % script hplog
> % telnet switch
>
> will give you a good idea. you're welcome to send the log; maybe these
> actually have clean output.

No, the input is extremely ugly, although once you get to command line
mode and start dumping things it's not too horrid (you still have to
hit space at each "MORE" prompt). I'll send in a sample.
hlogin and hp2424/4000/8000 ? [ In reply to ]
On Tue, May 10, 2005 at 09:44:58AM -0400, Ed Ravin wrote:
> Has anyone got hrancid/hlogin working with the Procurve 2424/4000/8000
> switches?

I just stumbled over a Perl/Expect.pm script that fetches the config
file from an HP2424m/4000m/8000m - with a little bit of work it could
be brought into rancid. I'm rather embarrassed, since it looks like
I wrote this script three years ago and then promptly forgot about it.

Based on my limited understanding of rancid so far, I think that the
"little bit of work" means the following:

* add a new device type to rancid-fe.

* create a clone of hrancid to support this device. I'm not 100% clear
on what needs to happen here, other than having hrancid call my new
script rather than the hlogin / hpui combination which doesn't work for
these devices.

* teach the new login script how to parse cloginrc to get the
username/password. Has anyone else done parsing of cloginrc in Perl?

* teach the new login script how to accept arbitrary commands on
the command line, instead of the hard coded "fetch config" task that
it has now.

Is there anything else I'd need to worry about?

-- Ed