I’m currently implementing the rather nice Uptime Kuma docker at a client’s site so we can monitor the state of their many (40+) devices. Most of the devices are using DHCP handled by the main RB4011iGS+ router with reservations. When I look at the DHCP table, it knows the host name of most devices:
However, do (say) ping 1a-Veranda-BRIDGE003 and it doesn’t resolve. I could add each entry to the local hosts file but that’s time consuming and duplicating what is clearly there.
Is the reason that the computer I’m using to do the PING is using 1.1.1.1 and 8.8.8.8 for it’s DNS and not the DNS server on the router. If I changed it to use router, would hostnames start resolving?
I don’t want to try it remotely in case I lock myself out of the support laptop! I guess I could try changing DHCP to give out the router AND 1.1.1.1?
ROS doesn’t have feature to resolve Active Host Name of DHCP lease with its DNS resolver. This is not related to DNS resolver which is used by client and it needs to be scripted in Lease Script event of DHCP server to add Active Host Name into ROS DNS static entry.
You can search forum for such scripts, keep in mind for cases where DHCP clients can have same host name on same DHCP network so you need to handle how to name such duplicate host names for adding into DNS static entry (like with suffix count number). Also you will need to handle cleanup of such DNS static entries.
Hello! This happen because your device whos make the ping doesn’t know the name. One thing to test is, how you say, try to use the Router IP such a DNS server. But, your router need to set the name on IP > DNS > Static.
This Active Host Name is a information received in DHCP options (i guess), but isn’t received directly to DHCP Leases and setted automaticly on DNS Static
Ahh that’s a shame… I was basing my assumptions based on Windows Active Directory where DHCP can be configured to update the DNS server. I’ll check out the scripts but good point about duplicate names.
I might just go with either using IP addresses in Uptime Kuma or a local hosts file. Pros and cons of all solutions here.
I’d already realised that using the router DNS alone wouldn’t work “as-is” as nslookup 1a-Veranda-BRIDGE003 192.168.88.1 didn’t work either, i.e. forcing DNS server to use.