Do static DHCP leases with hostnames turn into DNS entries too?

I've just been setting up PiHole (on a Pi Zero W - works very well).

I have it set up as the DNS and DHCP server for my LAN, and I've slowly been adding static DHCP lease entries to it, including both MAC, IP and hostname.

I'd assumed that adding the hostname would effectively add a DNS entry for that host, but after a few of my devices have re-acquired their DHCP leases, I can see that this isn't necessarily the case.

Now, most of what I'm looking at are IoT devices (a Ring doorbell, Fitbit Aria scales, etc) so I'm not 100% sure whether this is expected behaviour.

Can anyone confirm either way whether static DHCP leases with hostnames should also generate a DNS entry?

Only the clients that acquire there IP through DHCP will get an DNS entry.
Below example is my Kodi media centre for which I set a static reservation in Pi-hole:

pi@noads:~ $ host kodi
kodi has address 10.0.0.34

Below an example of my NAS which doesnt aquire an IP through DHCP because its set statically, but still I created a static reservation for it in Pi-hole:

pi@noads:~ $ host nas
Host nas not found: 3(NXDOMAIN)

Those clients that have a static IP and dont acquire IP through DHCP can be put in the "/etc/hosts" file on Pi-hole to have them register in Pi-hole.

EDIT: while at it:

pi@noads:~ $ cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       noads.dehakkelaar.nl
10.0.0.3        nas.dehakkelaar.nl    nas

pi@noads:~ $ sudo service pihole-FTL reload
pi@noads:~ $

pi@noads:~ $ host nas
nas has address 10.0.0.3

Awesome, thanks for the reply.
Turns out I just needed to wait longer for my clients to re-request their DHCP leases.

2 Likes

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