Reputation: 5102
I have a number of devices connected to a server. When it restarts the ip address might change. How would the remaining devices find the new address?
I want to automate the process since I want to distribute the software and there won't be any network administrator.
I found solutions like configuring a DHCP server or manually configuring the router, but it won't possible to manually configure the routers of the devices that would use the software.
Upvotes: 0
Views: 817
Reputation: 19168
What you could do is following :-
Assign static IP-Address to the server; it could be done by adding a reservation for server's IP-Address based on the MAC address of the server in the router. Check your router manual for how to add IP-Address reservation for a designated MAC-Address.
Once server has got a static IP-Address, your work would be so easy to achieve. You either need to ensure that the clients make an entry of the server's hostname and the corresponding static IP into the client's host name OR if you've an adhoc connection(WiFi/Bluetooth), it would do that automatically without your intervention.
That's it, you have a static IP-Address for your server and you have mapping of server's IP-Address and hostname into each client's etc/hosts
file(not needed for adhoc connections as explained above).
Upvotes: 3