From: glen herrmannsfeldt on
In comp.protocols.tcp-ip Didi <dp(a)tgi-sci.com> wrote:
(snip)

> In an attempt to solve it I spent 10 minutes adding RARP reply
> to our device Ethernet related stuff - so it would reply to an ARP
> inquiry #3 by sending its IP address (it only has one); and then spent
> perhaps 3 hours googling, moogling, you name it, searching for some
> piece of code to do that at the wintel side. Even rebooted the wintel
> laptop to ubuntu to try it out from there (thought arp -r or something
> would just work), oh no. No way. Spent perhaps half an hour of
> moogling for linux rarp, same thing.

It seems unlikely that RARP will be useful. RARP is from the
days before BOOTP, from which DHCP was derived. RARP was,
at least, used for diskless Sun systems to find their IP address.

The Sun boot ROM would use RARP to find its IP address, then
tftp to load the rest of the boot code. The first thing the
second level boot code does is RARP to find its address.
Then IP based bootparamd to find the rest of the data it needed
to boot, such as the address of its NFS server, and name of
the root file system.

These days, everyone just used DHCP to get an IP address,
either dynamically or statically assigned.

-- glen

From: Paul Hovnanian P.E. on
Didi wrote:
>
> I tried today to figure out a simple way to give users of our
> new netmca ( http://tgi-sci.com/tgi/nmcatb.htm ) to locate its
> IP address once it gets one via dhcp when there is no internet
> at the moment (when there is the device posts its IP to our domain
> and customers can see it using a browser).
>
>
Here's an idea: http://en.wikipedia.org/wiki/Dynamic_DNS

That will solve the dynamic (DHCP assigned) IP address to a DNS entry
that the world can resolve.

--
Paul Hovnanian mailto:Paul(a)Hovnanian.com
------------------------------------------------------------------
Life is like an analogy.
From: David Schwartz on
On Mar 25, 4:19 pm, Didi <d...(a)tgi-sci.com> wrote:

> Pretty much the latter, although usually it is not a browser
> but an RFB (VNC) client. If only there were a command line in
> the MSDOS window like arp -r <MAC address> which would then do
> inverse ARP and list the result I guess I would be fine but...

You want to sell a physical device that 'just works'. You want it to
connect to a LAN, get its IP by DHCP, and then you want the user to
have some easy way to access the device's built in web server without
having to install or run any special software.

Is that an accurate description of the scenario?

DS
From: robertwessel2 on
On Mar 25, 4:54 pm, Didi <d...(a)tgi-sci.com> wrote:
> I tried today to figure out a simple way to give users of our
> new netmca (http://tgi-sci.com/tgi/nmcatb.htm) to locate its
> IP address once it gets one via dhcp when there is no internet
> at the moment (when there is the device posts its IP to our domain
> and customers can see it using a browser).
>
> Turned out there is nothing like an easy way to do that!
>
> There are some utilities which can be used to ping the entire subnet;
> then list the arp cache, locate the known MAC address and
> see its IP. But these are far from something one would want to ask
> customers to deal with, long lists, necessity to search etc. , heck,
> it
> will generate more calls to me than if I do it for them every time.
>
> In an attempt to solve it I spent 10 minutes adding RARP reply
> to our device Ethernet related stuff - so it would reply to an ARP
> inquiry #3 by sending its IP address (it only has one); and then spent
> perhaps 3 hours googling, moogling, you name it, searching for some
> piece of code to do that at the wintel side. Even rebooted the wintel
> laptop to ubuntu to try it out from there (thought arp -r or something
> would just work), oh no. No way. Spent perhaps half an hour of
> moogling for linux rarp, same thing.
>
> How on Earth is that possible?! I can understand how many things
> are retarded as one would expect them to be on a x86 based thing,
> but this is too simple even for the x86 world.
>
> Any ideas? I have not faced the issue in real life yet (users tend
> to have internet) but this is bound to happen and I am looking for
> some solution.


Well, you could just install a copy of NMAP on the user's
computer. :-)

More seriously, the usual technique is to supply a small program that
gets the list of interfaces from the OS, and then does a scan from
there.

On Windows, the GetAdaptersInfo() function will quickly get you a list
of all the attached subnets. Then just do something simple to detect
your device - if you can have it respond to a UDP port query, for
example, just scan all those IP addresses for that port (QOTD/UDP is
great for that - just have the quote be "I'm a Widget9000, serial
#1234"*). A smidge more work would be to do it with broadcasts, which
should work for anyone on a typical Ethernet network, although can
have some quirks on less standard connections.

You *could* do that with TCP, but the lengthy timeouts will make that
rather more painful. With UDP, you can just have a bound/listening
socket, and pump the queries out (you should probably throttle that to
no more than a few hundred per second, just to be a nice guy).

A similar approach is possible on *nix. On either system you could
also get the same information from shelling out to ipconfig or
ifconfig, as appropriate, and then parsing the output.

If your device supports SNMP, you can use that, although your query
program then gets to process ASN.1, which is always a joy.

In any case, you could wrap that in an HTML page or two (all of which
would be stored on the user’s machine). Use Javascript to actually
run your scanner program (prompt the user to respond “OK” to the
security message), and have the result be a list of links to candidate
devices.


*Just don’t use that exact string – there’s at least one device in the
world that already uses that exact string (well, almost – the above
“9000” and “1234” have been changed to protect the excessively literal-
minded). I wrote the spec for a client, they passed it on to their
offshore development team, a year later I’m looking at the code, and I
notice that string embedded in the code – sure enough, that’s what the
device sends… Where’s that rolling-eyes-smiley when you need it?
From: Didi on
On Mar 26, 5:49 am, David Schwartz <dav...(a)webmaster.com> wrote:
> On Mar 25, 4:19 pm, Didi <d...(a)tgi-sci.com> wrote:
>
> > Pretty much the latter, although usually it is not a browser
> > but an RFB (VNC) client. If only there were a command line in
> > the MSDOS window like arp -r <MAC address> which would then do
> > inverse ARP and list the result I guess I would be fine but...
>
> You want to sell a physical device that 'just works'. You want it to
> connect to a LAN, get its IP by DHCP, and then you want the user to
> have some easy way to access the device's built in web server without
> having to install or run any special software.
>
> Is that an accurate description of the scenario?
>
> DS

Yes. And this works fine if the customer has internet, but I know
I won't be lucky all the time...(so far so good, though :-) ).

Dimiter

------------------------------------------------------
Dimiter Popoff Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------
http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/