- How do I provide a fixed Hostname to my device so that a netscan can shows up the device name across all platforms?
- How can I reach the device using the hostname/MAC-ID (something which is fixed) irrespective of the dynamically changing IP?
For example, I have 2 Raspberry-Pi and I give them hostname as Pi-1 and Pi-2 respectively (visible across all platforms). Now my router gives away dynamic IPs, so the IPs keep changing. Now how do I do a simple ping Pi-1 and get a reply? In short,how do I set up a DDNS (correct me if I am wrong) to map the Hostname/MAC-ID/URL against the updated IPs.
I have an application which connects to the corresponding devices (over TCP or MQTT) and does xyz stuffs. But I don't have the luxury to lookup the current IP of my device and update my application with the same everytime I move the setup to a different network. So I will just make a hostname entry in the application saying connect to "Pi-1" and it should be able connect to Pi-1 irrespective of the ip/network/domain as long as all the allocated IPs are reachable by on another.
N.B: I don't want to go for static IP or dhcp reserved IP and Open source packages (if required) are preferred.