Show hostname for IPV6 DHCP in log and dashboard

Hi,

I have DHCP enabled with the "Enable IPv6 support (SLAAC + RA)" checkbox. All my devices get a DHCP lease from my pi-hole device (v3.3.1)

In DHCP leases section, I see a HOSTNAME column that has the correct name for most IPV6 devices.

It would be super-duper nice if that hostname was actually used in Dashboard > Top Clients and Query Log.

IPV4 correctly displays the hostname but IPV6 does not.

Thanks!

FTL tries to do a reverse lookup when generating the data for those two charts, so they might not be getting found when running that lookup, which is odd considering that they appear in the DHCP leases.

@DL6ER might know more about the IPv6 hostname situation

Can you manually run a dig -x 2003:1234:abcd:defa:dead:beef:dcba:abcd (insert your IPv6 you expect a hostname to have been found for) and share the results?

Sure. Doesnt seem to be an answer section in the DIG output. I expect to see "K3" as the hostname. If I DIG my IPV4 static ip for the same computer it gives an answer section that shows the correct hostname.

IPV6 is confusing... I get the feeling this issue may be due to using "Temporary IPV6 addresses"?

A few things to note:

  • The DHCP lease (with the name showing) shows a different IPV6 than I looked up from the dashboard? And it is not listed anywhere in my Win10 box IPCONFIG output?

Dashboard: 2601:190:c400:190:c971:XXXX:XXXX:ec10 (No name, dig doesnt give answer)
DHCP lease: 2601:190:c400:190::XXX (Hostname=K3, dig's fine)

===
IPCONFIG:

   IPv6 Address. . . . . . . . . . . : **2601:190:c400:XXX::1d8**  (DHCP lease, DIG is OK)
   IPv6 Address. . . . . . . . . . . : 2601:190:c400:190:4b8:XXX:XXX:6407
   Temporary IPv6 Address. . . . . . : 2601:190:c400:190:c5b:XXXX:XXXX:54be
   Temporary IPv6 Address. . . . . . : **2601:190:c400:190:c971:XXXX:XXXX:ec10**  (The one from dashboard without a hostname, No diggity, no doubt)
   Temporary IPv6 Address. . . . . . : 2601:190:c400:190:XXXX:XXXX:XXXX:d271  (My external IP)
   Link-local IPv6 Address . . . . . : fe80::4b8:XXXX:cdb:6407%16
   IPv4 Address. . . . . . . . . . . : 10.0.1.99
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : fe80::2e56:dcff:XXXX:a890%16
                                       10.0.1.1

===

pi@raspberrypi:~ $ **dig -x 2601:190:c400:190:c971:XXXX:XXXX:ec10**

; <<>> DiG 9.10.3-P4-Raspbian <<>> -x 2601:190:c400:190:c971:XXXX:XXXX:ec10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3945
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;0.1.c.e.d.1.1.1.e.8.a.6.1.7.9.c.0.9.1.0.0.0.4.c.0.9.1.0.1.0.6.2.ip6.arpa. IN PTR

;; Query time: 1287 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Jun 07 08:05:57 EDT 2018
;; MSG SIZE  rcvd: 101

What do you mean by "temporary IPv6 addresses"?

Okay, so maybe your computer changed the IP address at some point and since there is no host name tied to the previous IP address there is also none that could be displayed.

Are queries still coming in from the 2601:190:c400:190:c971:XXXX:XXXX:ec10 address or are new requests now coming from 2601:190:c400:190::XXX ?

So, you can see from my previous IPCONFIG output in Windows there are 3 "Temporary" IPV6 addresses. (I see 4 now actually).

See: IPv6 address - Wikipedia

The address listed in pi-hole DHCP leases NEVER seems to show up in the log or top clients, etc. ONLY the temporary IP does.

To make matters worse:

  • More than one temporary IP (as listed in IPCONFIG) has been making DNS requests in the last week.
  • The MAC address listed under my IPv6 DHCP lease is in decimal form, not a normal mac address: "65066334". I guess this might be messing with your hostname lookup.

Ipv6 is a pain... But since it is inevitable I'm going to have to better understand this at some point.

Thanks!

Dnsmasq gives you 2 extra IPv6 adresses not found a way to turn that off.

This morning a possible bug with IPv6 host name resolution has been posted on the dnsmasq mailing list. I'm not sure if it was one of you guys in here, but there might be something coming up.

I disagree with

But DHCPv6 is something you typically don't want to use as IPv6 is designed for autoconfiguration and wants to live without a central manager. It not even clear if windows implemented DHCPv6 as possible source for addresses correctly, as the level of implementation is different for almost every OS.