DHCP leases show up as <i>unknown</i>

Expected Behaviour:
DHCP names are shown for each lease
-operating system PiHole 5.1.2
-hardware]_Raspberry Pi 4

Actual Behaviour:

[Some of the leases show up as unknown even though they are shown normally on other networks that I connect to.]

Debug Token:

[https://tricorder.pi-hole.net/wje9hlgj28]

Could you share a screenshot of the DHCP table and where the hostnames show up on

The pure cosmetic of <i>unknown</i> is fixed in the next pihole version


here, you can see the top three are unknown and the last one was identified correctly and not assigned statically or anything.

as for the cosmetic side, I know, I search for that before and saw a lot of people already reporting it.

do you need some other logs from the pihole? or is the log I uploaded enough?

You are running Pi-hole as DHCP, so Pi-hole should at least know the names as provided by your clients during DHCP lease negotiation - if they actually did provide them.

What are the devices that show up as unknown? All of the same kind?

In the meantime, have a look at your RPi's time. (click for details)

It's likely not related to your naming issue, but your pihole-FTL.log is filled to the brim with messages like

*** [ DIAGNOSING ]: contents of /var/log
-rw-r--r-- 1 pihole pihole 96627 Sep 30 05:13 /var/log/pihole-FTL.log
   -----head of pihole-FTL.log------
   [2020-09-30 00:03:11.808 666M] WARN: getOverTimeID(1601420700): 480 is too large: 1601132700

This means your time is off by a few days (Sat 26 Sep vs. Wed 30 Sep).

Incorrect times may interfere with statistics and, more importantly, would ruin DNSSEC validation (which you don't have enabled), resulting in loss of DNS resolution.

Restarting the timesync service should enforce a sync:

sudo systemctl restart systemd-timesyncd.service

That may not work if time is off by too much.
In that case, you can still set the time manually:

timedatectl set-time '2020-10-01 07:00:00'

Hey, thanks for the tip with the time. synced it and changed the timezone while I was at it.
as for the devices, all three are mobile phones, 2 android and 1 windows phone. I have other phones on my network show up normally, and these phones show up on my work DHCP normally as well.

Does a reverse lookup for those IP addresses through your Pi-hole return any names, e.g.:

nslookup 192.168.55.112 pi.hole

image_2020-10-01_103657image_2020-10-01_103757

So there is indeed no DNS record associated with that IP.
Let's have a look at your dnsmasq configuration:

grep -nRv '^#\|^$' /etc/dnsmasq.*

Please post the output as text (it's easier to read and reuse).

/etc/dnsmasq.conf:1:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.conf.old:1:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.d/04-pihole-static-dhcp.conf:1:dhcp-host=94:DE:AA:BA:DD:AD,192.168.55.100,Server
/etc/dnsmasq.d/02-pihole-dhcp.conf:5:dhcp-authoritative
/etc/dnsmasq.d/02-pihole-dhcp.conf:6:dhcp-range=192.168.55.101,192.168.55.254,72h
/etc/dnsmasq.d/02-pihole-dhcp.conf:7:dhcp-option=option:router,192.168.55.55
/etc/dnsmasq.d/02-pihole-dhcp.conf:8:dhcp-leasefile=/etc/pihole/dhcp.leases
/etc/dnsmasq.d/02-pihole-dhcp.conf:11:domain=lan
/etc/dnsmasq.d/02-pihole-dhcp.conf:12:dhcp-rapid-commit
/etc/dnsmasq.d/02-pihole-dhcp.conf:15:dhcp-option=option6:dns-server,[::]
/etc/dnsmasq.d/02-pihole-dhcp.conf:16:dhcp-range=::100,::1ff,constructor:eth0,ra-names,slaac,72h
/etc/dnsmasq.d/02-pihole-dhcp.conf:17:ra-param=*,0,0
/etc/dnsmasq.d/01-pihole.conf:21:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:22:addn-hosts=/etc/pihole/custom.list
/etc/dnsmasq.d/01-pihole.conf:25:localise-queries
/etc/dnsmasq.d/01-pihole.conf:28:no-resolv
/etc/dnsmasq.d/01-pihole.conf:32:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:34:log-queries
/etc/dnsmasq.d/01-pihole.conf:35:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:37:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:39:log-async
/etc/dnsmasq.d/01-pihole.conf:43:dhcp-name-match=set:hostname-ignore,wpad
/etc/dnsmasq.d/01-pihole.conf:44:dhcp-name-match=set:hostname-ignore,localhost
/etc/dnsmasq.d/01-pihole.conf:45:dhcp-ignore-names=tag:hostname-ignore
/etc/dnsmasq.d/01-pihole.conf:46:server=208.67.222.123
/etc/dnsmasq.d/01-pihole.conf:47:server=1.1.1.3
/etc/dnsmasq.d/01-pihole.conf:48:dnssec
/etc/dnsmasq.d/01-pihole.conf:49:trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
/etc/dnsmasq.d/01-pihole.conf:51:local-service
/etc/dnsmasq.d/01-pihole.conf:52:server=/use-application-dns.net/

Looks ok, no redirects for local lookups.
I'll soon run out of ideas what's causing this.

What names do they show up with?

the device name, for the windows one it's windows-phone. what's weird is now 196 shows up correctly as windows-phone. but 141 does not show up.

Have a look at your /etc/pihole/dhcp.leases (don't post it here, it may contain sensitive data). The names should be in there.

If you perhaps deleted Pi-hole's DHCP lease file at some stage in the past, that could explain it.
dnsmasq would try to repopulate that file on DHCP lease renewal, and lease renewals may not include hostnames.

192.168.55.141 * 

I did delete it before but I rebuilt it, and all the other devices were there before, and I think that before I deleted these devices did not show up properly either.

I have found something out, the windows phone that I said now shows up correctly, only shows up correctly in the main dashboard, under the DHCP lease table in the settings it is still shown as unknown.

It would be interesting to know whether that correlates with the hostname missing from your dhcp.leases as well.

that's the strange thing, now the windows phone shows up correctly on both. I even changed the device name of it and it updated on both tables. the android phone however refuse to be registered correctly.
they're both android 10 lineage os if that helps. but as I said at least one of them was showing up correctly on other networks.

so anyone has any idea why this happens? another thing that isn't working is the logs in the dashboard randomly work and sometimes are just blank. so I checked the time again to see if it lost sync again, but it's fine.

Just to bump this, I'm having the same issue with devices not registering host names. Seems to be only affecting Android devices for me. Their queries don't show up in the main Query Log link on the front page, but they do show in the Query Log search tool. The hostnames are logged thus though: unknown-8a-c8-4d-3e-bb-d1.lan (MAC changed) which the pi cannot resolve. Same PiHole version as the OP, Raspberry Pi 3.

that's strange, mine are also android, but not all android. and mine show up as IP in the logs.

Where do you see these logs?