Originally, I had my router configured to use the Pi-Hole as its DNS, and send its own (the router's) IP address to DHCP clients as the DNS server. Looking at the Pi-Hole's logs, though, was uninteresting because every DNS request came from the same IP address -- that of the router. So, after some research, I changed the router's config to disable its internal DNS, and supply to clients the Pi-Hole's IP address as DNS. The early returns were promising -- once clients renewed their lease, and got the new DNS address, they worked fine. However, the next night, when my son booted up his laptop, it picked up the right DNS server address but he was unable to successfully perform any name resolution. I shrugged it off for a bit, but then later in the evening, others in the house were complaining about our wireless network not working well. They're not technical enough to know what was failing.
Then this morning, when I connected my laptop, it had the same problem my son's did! So I started Wireshark, and lo and behold, I could see DNS queries going out, but no answers coming back. Meanwhile other devices were working OK (no extensive testing, but no problems...)
Is there some internal limit to the number of DNS clients you would support?? Or any other explanation for the observed behavior?
Well you solved the first part of the problem by giving the clients the Pi-hole's DNS. Now you just need to figure out why it is not working. The first step would probably be to check the log file to see if the Pi-hole is actually accepting the queries using this tail -f /var/log/pihole.log.
I can tell you that I connected to my wifi, got the pi-hole assigned as DNS, and it wasn't working. I ran some of these diagnostics, though while I was running tail -f, it seemed to all of a sudden be producing more output faster. I then noticed that my exclamation point overlay on my wifi indicator had gone, and "The Internet" was working again (on this computer).
I had a Wireshark trace running at the same time, and at the beginning, all the UDP DNS traffic was uni-directional. Queries with no responses. However, I certainly had IP connectivity to my pi-hole because I had the admin page up and running in a browser (connected via IP address).
So this problem can happen to any of our computers in the network, at least those that come and go from the network. It is not isolated to any particular computer, or any OS (both Win and Mac affected for sure). So it feels like it must be something at the pi-hole end.
Thanks for looking at the logs. It happens most of the time a client (especially laptops? Maybe not so much iPhones??) reconnects after having been absent for some period of time. The "outage" seems to last somewhere between 5 and 10 minutes. It seems to clear up on its own, or after multiple attempts at disconnecting/reconnecting to wifi. Unclear if the disconnect/reconnect actually helps, or it's just the passage of time.
I updated this morning to 2.6.3, and am (I guess not surprisingly) still experiencing this problem. It strikes me as very strange. On my main laptop (Windows) I have a console window open. I also have an ssh session to the pi-hole server. And another ssh session to another pi. If I attempt to resolve names from my laptop, it fails. But if I attempt to resolve names from the second pi, they succeed. The pi-hole web interface, via the query log, does show those successful attempts, but not the unsuccessful ones. From previous incidents, I know that my UDP DNS queries are simply unanswered. However, it should be clear that I have IP connectivity to that Pi -- I have a browser tab open to the pi-hole admin page, and I have an SSH session.
It is not a complete service outage, as it's answering queries from other systems. Also, it's not limited to my Windows laptop -- Mac laptops suffer from the same problem. I think the phones do as well, but perhaps they are connecting to wifi "behind the scenes" so the initial period during which name resolution doesn't seem to work may go undetected. I have seen cases where upon arriving home, if I attempt something on the phone it may not work right away.
From my other pi, I tried pinging armchair.org, which worked fine. From my Windows laptop, I tried pinging armchair.net, and there's nothing in the log showing that.
Do you have any idea how many people have it setup the way I currently do? I would guess I'm in the minority. The simple solution is to have the gateway router configured to use the pi-hole as its DNS, and have all the DHCP clients use the gateway router as their DNS. No doubt some routers make it easier, but I had to go into the CLI of mine to edit dnsmasq's config files to have it give out a different IP address as DNS server.
I guess my thinking is that perhaps I am "alone" in experiencing this because I have it configured in an "unusual" manner. As I said elsewhere, the reason I did so was so that the reporting would be more useful, or at least "interesting."
Well, my family was about ready to lynch me for the "broken wifi" at home, so lacking any further troubleshooting ideas/help, I have had to back off of this.
Sorry that you are having so much trouble. Have you restarted/reset your router? Since the Pi-hole logs show that the Pi-hole is working correctly, at least for those connected to it, the issue seems to be mainly related to your network/router. If you manually assign your devices to the Pi-hole, do they work? Also, are you using IPv6, and did you enable it when installing Pi-hole?
Yes, the router had been restarted numerous times in this process. Also, the compelling thing to me (and odd!) is that a sniffer trace showed packets leaving the computer, but no responses. Obviously, I don't know if those packets were getting there, but I did have IP connectivity, because I had an ssh session going! No IPv6, and not enabled.