The project I am working on is a client/server architecture. In a LAN environment, I want the client's to be able to automatically determine the server's address. I want to avoid having to manually configure each client with the ip address of the server. What is the best way to do this? Some alternatives I have thought about doing are:
- The server could listen for broadcast packets from the clients. The message from the client would be a request for the IP address of the server. The server would respond with its address.
- The machine running my project's server could also have a bind server running. The LAN's router could be configured to use it as one of its DNS servers.
- I think I saw that there is a bind library. Does that mean I can build the bind service into my server so that bind doesn't have to be installed on the server?
Any other ideas? What have you done in the past? What are the pros/cons of these approaches and others that might be suggested?
Thanks for your help!