[ltp] automatic network probing

Jeffrey Taylor linux-thinkpad@linux-thinkpad.org
Sun, 23 Nov 2003 00:44:58 -0600


Quoting Andr? Wyrwa <a.wyrwa@gmx.de>:
[snip]
> I'd like to probe for in which network i am without interfering too much
> with the network. To explain a bit more, imagine the following situation
> (the actual problem I had was solved by using a dock and wireless at
> home and no dock and wired lan at work, but I'm still interested in the
> case):
> 
[snip]

There is a package in Debian called whereami
(http://debiana.net/whereami/).  It is a framework of tools that you
configure for your own situation.  IIRC, my setup checks if the
pcnet_cs module is loaded.  If it is, the ethernet PCMCIA card is
inserted.  Then it checks the MAC address at 192.168.1.1 (the
DSL/broadband router) and if it matches a known value, then it is
plugged into my home LAN and the IP address is set to 192.168.1.5.  If
not, it tries DHCP.  If DHCP fails, it is in the Great Unknown.  Where
I get the WLAN card, I'll add another step or two.  So far, it has
worked at home, on the road with dialup, in a corporate LAN or two,
and plugged into a coffeehouse LAN or two.

There are other similar packages whose names escape me at the moment.

HTH,
  Jeffrey