DNS fails sporadically throught day

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Devices to be able to connect to pihole (running on raspberry pi 0w) DNS

Actual Behaviour:

Multiple times a day, random devices on my network ( mix of linux, windows, iOS, and android) will fail to contact the pihole, and as such will lose internet access. This doesn't happen all at once

At first, I was having issues using pihole act as a DHCP server and thought I had a fix ,but it failed again, and that was such a hassle I just decided to manually point all of my devices to my pihole. I cant set this in my router, because the "admin" account wont let me (ubee dvw32cb). Apparently there is a secret "actual" admin account that will let me do that, but I haven't gotten that to work with what I've found online

At this point pihole is set up to act as DNS only

The only fix is to restart my pihole and my device in order to get them to play nice, and its anyone's guess as to which ones will go next

Debug Token:

https://tricorder.pi-hole.net/hycnjqsfax

How do those failures manifest themselves?

What are the results of the following commands when run on the affected client in event of such a failure?

nslookup pi.hole
nslookup flurry.com
nslookup flurry.com 192.168.0.100

I'll try those nslookups the next time I have an issue.

When the issue comes up, one or two devices regardless of OS (Android, Linux, Windows, iOS, Nintendo Switch) will fail to resolve DNS, and error codes will come up on the devices stating that they failed to reach the DNS server. Others are unaffected, but if left alone for a while (havent timed this) they will also start to fail

Looking in /var/log/syslog, I found these entries when I had an earlier issue

`Feb 22 13:01:09 pihole dhcpcd[309]: wlan0: fe80::aa6b:adff:feac:3ec: router expired`

`Feb 22 13:01:09 pihole dhcpcd[309]: wlan0: part of Router Advertisement expired`

`Feb 22 13:01:09 pihole dhcpcd[309]: wlan0: deleting default route via fe80::aa6b:adff:feac:3ec`

Looking online, I found a reddit post (here) outlining the issue I believe I had. I had both a static IP set on the pi, a static lease in DHCP on my router, and the IP was in the DHCP range. I removed my static lease, changed the DHCP range so my pi does not fall in it, and ran dhcpcd -n wlan0 to rebind. So far (knock on wood) everything is running smoothly.

I'll reply back to this thread if this doesn't fix my issue

Unfortunately it seems I didn't knock hard enough. The log entries I supplied above have come back and clients are having issues.

The Nslookup commands all have failed. I did this from my phone as thats the one having an issue right now, so Im not sure what more output a windows cmd prompt or linux terminal would give

Since its deleting a route for the local link IPv6 address, could this just be solved by disabling IPv6 on the pihole?

Those log messsages are related to IPv6.
Note that changing your DHCP configuration is doing nothing for IPv6.
DHCP is IPv4. IPv6 uses DHCPv6 and/or SLAAC with a bunch of other mechanisms like router advertisement (RA).

nslookup does not deliver reliable results on a smartphone, as most terminal apps will use statically configured DNS servers (most often Google's 8.8.8.8) instead of those configured for the device.

The log messages you've picked up look like normal IPv6 housekeeping at first glance. Your router's router RA expired, so it is deleted as a gateway from the routing table.
Note that this would not only affect Pi-hole's machine: Your router is providing those RA information to all clients in your network. I'd expect similar log messages to appear on all of your devices.

This wouldn't be DNS failing then, but without further details, we cannot be sure whether those messages actually indicate an error.

Your log should also register either a corresponding RA by your router with updated information for renewing router information or an answer for a respective router solicitation request.

If there is no such message, then clients using IPv6 would indeed be left without a gateway, cutting them off from accessing anything beyond the local link.

However, while most modern OSs prefer IPv6 over IPv4, they should fall back to IPv4 after a while.

No, since it's your router offering those RAs for all your IPv6 clients.

If you'd be able to confirm it's indeed missing or faulty RAs that are causing your problems, you could try to disable IPv6 on your router (if it supports that option) and watch whether that would fix your devices.

Thank you for your very insightful write-up, it seems I need to learn more about IPv6. I had tried disabling IPv6 on the router to no avail.

As to try and isolate the issue to any configuration I had in Pihole, and not the pi itself, I tried another pi to serve as my pihole. I had a Pi 3B not doing anything, so I installed on that one, moved my configurations over to that one, pointed some devices to that one and left some for automatic DNS served up by my router, and turned off the 0w

I have been running stable for the past 3 days now, and my devices that look at the pihole have not had any issues I've been aware of. This is the longest I've been able to run pihole without the need to restart.

For now I will say this specific issues is resolved. If this does come up again and I do need to reach out I will make a new post, as the addition of another Pi adds another moving part and may complicate troubleshooting

Thank you for your help