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

Broadcast message to clients

1 view
Skip to first unread message

Angus

unread,
Oct 28, 2009, 1:36:08 PM10/28/09
to
Hello

I have network software in the past which seems to 'know' or finds out
where the server is located - ie the hostname or IP address. I think
HP have this feature with their network printer setups. ie you launch
a client installation and the client does a search for the server.
how do they do this?

Does the server periodically send a broadcast message? Or do the
clients simply attempt to send a message to all ip addresses on their
subnet?

I would be interested to know if there is a standard means of handling
this scenario.

Reason is users of my client server application want to be able to
silently install my client app without having to visit each client to
enter ip address or hostname of the server.

One idea I had was that client on first bootup looks for its config
file which tells where server is located. doesn't find file so works
out its own ip address and then in a loop sends a small message on
each ip address in subnet (would have to be a standard port) to see if
get any response?

Any ideas would be much appreciated.

Angus

Remy Lebeau

unread,
Oct 28, 2009, 2:59:30 PM10/28/09
to

"Angus" <angus...@gmail.com> wrote in message
news:d02ae96c-60b0-4e0e...@o10g2000yqa.googlegroups.com...

> I have network software in the past which seems to 'know' or
> finds out where the server is located - ie the hostname or IP address.

That is usually done by broadcasting a UDP packet over the network, and then
waiting a moment for any server(s) to reply. Each server has to be
listening for such UDP packets at all times, and whenever received can then
send a reply back directly to the client that sent the broadcast (the
client's IP is in the broadcasted UDP packet's header, and the server's IP
is in the reply packet's header).

> Does the server periodically send a broadcast message?

Usually not. That would waste network traffic. The client is usually the
one sends the broadcast instead, asking to discover any running servers who
are listening for such a request.

> Or do the clients simply attempt to send a message to all ip addresses
> on their subnet?

Basically, yes.

> I would be interested to know if there is a standard means of handling
> this scenario.

A subnet has a special broadcast IP that can be used to send UDP packets
across the entire subnet, provided there is not a firewall/router on the
subnet that is blocking such broadcasts.

> Reason is users of my client server application want to be able to
> silently install my client app without having to visit each client to
> enter ip address or hostname of the server.

If your network has a DNS server, an alternative option would be to have the
server register itself with the DNS server directly, and then clients can
perform a DNS query to find the server.

--
Remy Lebeau (TeamB)


0 new messages