So I have my PiHole running DHCP. DHCP on my router is turned off.
It seems like PiHole is working fine. The query logs are populated and all seems good. I am able to access the web interface.
But when I run a debug log I get this:
WARN: Could not sendto() in send_dhcp_discover() (/root/project/src/dhcp-discover.c:223): Network is unreachable
Received 300 bytes from eth0:192.168.0.23
Offered IP address: 192.168.0.147
Server IP address: 192.168.0.23
So it looks like the Pi (.23) is not advertising itself as a DHCP server?
Does anyone know why this is happening or how to fix this? Please help!
That's nothing to worry about - there is nothing wrong with Pi-hole's DHCP.
The full DHCP discovery details are:
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
Scanning all your interfaces for DHCP servers
Timeout: 10 seconds
WARN: Could not sendto() in send_dhcp_discover() (/root/project/src/dhcp-discover.c:223): Network is unreachable
* Received 300 bytes from eth0:192.168.0.23
Offered IP address: 192.168.0.147
Server IP address: 192.168.0.23
Relay-agent IP address: N/A
BOOTP server: (empty)
BOOTP file: (empty)
DHCP options:
Message type: DHCPOFFER (2)
server-identifier: 192.168.0.23
lease-time: Infinite
netmask: 255.255.255.0
broadcast: 192.168.0.255
dns-server: 192.168.0.23
domain-name: "lan"
hostname: "pihole"
router: 192.168.0.1
--- end of options ---
DHCP packets received on interface wlan0: 0
DHCP packets received on interface lo: 0
DHCP packets received on interface eth0: 1
They demonstrate your Pi-hole at 192.168.0.23 to be fully operational as DHCP server.
The warning you see is likely related to your wlan0 interface that isn't in use by Pi-hole.
If you do not need your wlan0 interface on your RPi at all, you could consider to disable that completely (which would also save a wee bit of power).
If I do the same from my windows PC I get this output:
C:\Users\Bill>nslookup google.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 2601:196:180:7b10:a005:92bb:1d65:1bf4
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
Note that the IPv6 IP in the output from the Pi is correct, while the IPv6 from the output from the Windows machine is not correct.
Strangely enough my internet is working perfectly fine. But what is up with the output from my windows machine?
I said that your concerns about your DHCP server are unjustified, in addressing your initial issue.
If you raise additional concerns from different observations, I'd prefer to do so in a new topic, so we can mark this one with a clear solution (for the benefit of other users as well).