Can I use DHCP static lease name?

I have DHCP enabled along with a bunch of static leases. I thought I could use the name of the static lease and have pihole resolve it to the correct IP (like the Local DNS feature). However, it only seems to work for some and not others (5 work out of 12 total). In the cases where it's working, the logs show it still forwards to Google, so I guess it's not really working as I hoped anyway, and it worked by magic. Do I really have to set it up twice (once for static IP, once for local name), or am I missing something?

PS C:\Users\Michael> nslookup readynas.lan
Server: pihole

Name: readynas.lan

PS C:\Users\Michael> nslookup synology.lan
Server: pihole

*** pihole can't find synology.lan: Non-existent domain

Whereas this is the static lease config in pihole (and neither are currently in the local DNS settings)...

Static leases are not in the DNS cache as long as the lease is not active.

As soon as the client got the lease, it should resolve properly.

Ah, the ones that were not working were configured to have a static IP on the machine, so that makes sense. A trap for young players. I will change them to use DHCP (or use Local DNS).

Does this imply that if a machine has Wake On LAN and the lease has expired because it's off, then you won't be able to access it via the DHCP name? Accessing via IP would then wake it, causing it to get a new lease, after which time you can use the DHCP name - correct?

As far as I know you don't need hostnames or IPs for WOL. It does work by magic packets containing the MAC address of the device.
But in principle you are right. If the device has no active lease, hostname resolution won't work. You can circumvent this but setting "Local DNS Records"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.