I have recently chnaged internet providers and they have installed a new router. The router’s IP address changed from 192.168.1.1 to 192.168.0.1.
Consequently, the router assigns DHCP leases in the 192.168.0.10 to 192.168.0.255 range.
I had previously created a Static DHCP for my Raspberry Pi server running openhab 4.0.3, which was set to 192.168.1.253, I have now created a similar static record for 192.168.0.253 on the new router.
After that I couldn’t see the frontend at http://valdiego:8080 nor log into the server using the server’s name (that I had previously set in the openhabian-config tool to “valdiego”). Both worked with the new 192.168.0.253 static IP address, though.
I have reconfigured the openhab server name using openhabian-config/ 31 (change hostname) to valdiego1, reboot (not able to log in to valdiego1, frontend http://valdiego1:8080 not showing) and then back to valdiego (still not working).
What do I have to modify, so that the local DNS server resolves the existing server name (valdiego) to the new static IP address 192.168.0.253
It’s up to your DHCP Server if it’s telling the DNS forwarder to resolve the given name to an ip.
Maybe reboot the system, so it gets its ip address from the router which then gets the name of the system and hopefully adds it to the internal list.
Maybe this won’t suffice and you’ll have to log into your router and setup the name in the DNS resolver (e.g. in a FRITZ!Box you have to setup the name in the port forwarding section (you don’t have to forward any port for this, you’ll only have to setup the name)
Oh, and be aware that maybe your computer has the wrong ip address in its dns cache.
update the A record on your local DNS server.
After you have done that if you are using windows open a command prompt and type nslookup valdiego <ipaddress of your local dns server here> press enter and confirm the local dns server reply resolves back to the static ip of your openhabian
if it does not type ipconfig /flushdns press enter
and test again with nslookup valdiego <ipaddress of your local dns server here>
note if you do not supply a address for your local dns server using nslookup it will try using whatever default dns servers your dhcp server has provisoned to the device you are testing on.