Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Allied Telesyn switches, programmatic access

0 views
Skip to first unread message

LC's No-Spam Newsreading account

unread,
Dec 31, 2009, 6:16:48 AM12/31/09
to
We have a stack of 6 AT - 8326GB switches (which we can access as a
single hostname "switch4"), and a newer AT-80000S ("switch0").

switch0 was originally also an 8326GB, but was replaced with the
AT-80000S under our maintenance contract when it failed.

I used to access both switch4 and switch0 via telnet or http interfaces.
In particular what I want to do is to access PROGRAMMATICALLY the
information which tell me which MAC address is attached to which slot in
the switch. I do this (a)periodically for monitoring, or to update a
database.

I had originally both a crontab shell script (for mysql database
updating) and a CGI shell script (for realtime monitoring). They used
to interrogate the switches running a telnet session under "expect".

This worked nicely for both switches, and still does for switch4. But
the NEW switch0 has a totally different telnet interface and I cannot
find where the slot (port) to MAC address info is kept now !!!

Recently I converted the realtime monitoring tool to a java class. This
is done opening an URL connection to

URL url = new
URL("http://switch4/fdbport.htm?port="+port+"&deviceno="+hubdev) ;
URLConnection uc = url.openConnection();
uc.setRequestProperty ("Authorization", "Basic " + encoding);

where "encoding" is a way to store user/password.

Essentially for switch4 I can connect to the web page which gives me the
MAC-to-port mapping and parse it.

Old switch0 failed while I was developing the java tool, so I had no
opportunity to try it.

But also the web interface of the new switch0 is TOTALLY DIFFERENT from
the old one. HOWEVER I located a page Layer2->MAC address -> set radio
button "view dynamic" and click "view", which gives me the right info.
I can MANUALLY save the HTML output and e.g. use awk to parse the info I
want. I already have such awk script !

But I wanted to do this programmatically. I thought to start with the
crontab and CGI, and replace the expect/telnet arrangement with a wget
to the new web page.

But the point is : which URL should I use ?
I tried with (using appropriate credentials)
http://switch0/FwdDb/bridg_frdData_Query_Address_m.htm?mac_filter=Dynamic

which looks to be the ACTION of the html form, with the only non-default
and non-hidden argument set. But the web page I get in return does not
contain the info I want. If I look at the "page info" address I see an
URL with a much contrived calling sequence with lots of funny
characters probably requiring URL encoding.

Any idea of the proper URL to use ?

If I get it, I could also use it in java and rewrite the parsing code
from awk to java.

--
----------------------------------------------------------------------
nos...@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.

0 new messages