I am looking for a way to have a script on a client machine automatically find the servers IP on the same network.
I have several media extender clients running ubuntu 14.04.1 and a server running the same on a single LAN. I want the clients to at startup to search the network for the server. Setting a static IP is NOT a solution I can utilize from the server or dhcp.
Searching by hostname might be useable but I would really like if there was something on the server that would broadcast and allow the clients to find it that way, incase two devices have the same hostname (unlikely but possible), or the hostname changes. Also the LAN may not always be the same ether. (eg, 192.168.1., 10.0.0., etc)
The clients are ultimately looking for the mysql server running on the server but I really only need the IP so the script can configure the software to use the database on the server.
Thanks in advance for any help.
EDIT: Third party programs are fine. Clients could be connecting to any server on any subnet at any time. When I have something to find the server I will likely use a keepalive of somesort to restart the search once connection to the server is lost. Keeping a list of MAC's or other hardware identifiers is not an option.