views:

500

answers:

4

Hello

I'd like to sell headless Linux servers to SOHO users. Typically, they'll have a DHCP-capable ADSL modem cum switch to which they'll connect their workstation and the server.

In order to just show up with the server, I need to find a way to just plug the server into the switch to get an IP address from the modem, and then have the server broadcast its adresse so I can then connect to it with Putty from the workstation.

I thought about using Samba to broadcast a message using the Messenger Service, but unless I'm mistaken, this only works if the two hots are configured to use the same workgroup/domain.

Do you know of way to get the server's IP address from the workstation?

Thank you for any tip.

+1  A: 

I'd probably suggest using the normal approach for switches and modems as you are treating your device as an appliance, i.e. set a default IP 192.168.0.1, and connect to that to then configure the device into the local infrastructure.

Lazarus
192.168.0.1 is likely to be taken in a SOHO context. Perhaps something obscure, maybe even a non-private address, since you can be sure you're about to change it.
Colin Pickard
I remember HP JetDirect units used to sit in the multicast space until configured which would also be an option.
Lazarus
+3  A: 

Take a look at UPnP and zeroconf services like Apple's Bonjour.

The standard Bonjour-compatible Zeroconf implementation on Linux is named Avahi: http://www.avahi.org/ Add a service file to broadcast, say, service._tcp, and it can easily be seen from anybody else on the network.
ephemient
A: 

I don't know of any good solutions.

Some DHCP servers will register the name you send in the request - then give that name in your setup instructions. But I suspect home user DSL routers aren't in that category.

Maybe you could ship a tool on CD that does arp requests to get the IP address? (Given the MAC address printed on the box)

Douglas Leeder
A: 

Broadcast packets periodically on some arbitrarily chosen UDP port, and build some client software to listen for those packets.

tomfanning