Problem switching to use Pi-hole DHCP

Expected Behaviour:

Raspbian GNU/Linux 10 (buster)
Pi-hole v5.8.1 FTL v5.13 Web Interface v5.10.1
Using Pi-hole for DHCP, because Virgin Hub DHCP will not let me change the DNS server.
I expect the Pi-hole DHCP to take over when I disable the DHCP server on the Virgin Hub, and the Pi-hole DNS to by used.

Actual Behaviour:

This was working perfectly, but I had problems with one WiFi access point on my Raspi (there is no ethernet socket) - poor signal so could not connect to the Internet. So I changed to another access point. Internet connection from the Raspi now works fine.

When I enable DHCP on the Virgin Hub, and I can see use the Internett and see my Raspi from other machines on my local network, and can use the Pi-hole web interface.

But when I disable DHCP on my Virgin Hub, I cannot ping my Raspi, and cannot use the Internet from other machines. Yes, DHCP is enabled in Pi-hole.

Apart from what I described above, I don't believe I changed anythting. No idea how to start diagnosing the problem. Any help gratefully received.

Debug Token:

https://tricorder.pi-hole.net/O0Qt8OvU/
This was generated with DHCP enabled on the Virgin Hub

Your debug log shows two active DHCP servers. The router is offering DNS servers other than Pi-hole, and Pi-hole DHCP was active as well. Multiple DHCP servers cause problems.

Disable the router DHCP server and renew the DHCP leases on all clients.

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   
   * Received 548 bytes from wlan0:192.168.0.1
     Offered IP address: 192.168.0.18
     Server IP address: 192.168.0.1
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.0.1
      lease-time: 86400 ( 1d )
      netmask: 255.255.255.0
      router: 192.168.0.1
      dns-server: 194.168.4.100
      dns-server: 194.168.8.100
      --- end of options ---
    
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3382653620) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2091975346) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (394580103) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2711127372) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (171946573) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2825658380) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2929005625) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (368974275) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2719409427) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2388090917) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2867709982) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3973221436) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 310 bytes from wlan0:192.168.0.3
     Offered IP address: 192.168.0.233
     Server IP address: 192.168.0.3
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.0.3
      lease-time: 86400 ( 1d )
      renewal-time: 43200 ( 12h )
      rebinding-time: 75600 ( 21h )
      netmask: 255.255.255.0
      broadcast: 192.168.0.255
      dns-server: 192.168.0.3
      domain-name: "lan"
      hostname: "RaspberryPi"
      router: 192.168.0.1
      --- end of options ---
    
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3373633685) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3245937954) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2602071145) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1728933944) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (952094385) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2734823146) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (856507954) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (4245740510) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1990106410) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (715895390) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3762424712) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3452862290) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1967024406) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (4195595428) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (467508671) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1706573104) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3940554471) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1108803026) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3072972288) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (219830030) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1872934108) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (3643573618) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (789106535) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1625293010) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2874191981) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (1156469249) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (519738336) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2058766849) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2425154198) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2133100424) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (160150022) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (87211543) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   * Received 548 bytes from wlan0:192.168.0.1
     DHCPOFFER XID (2493521178) does not match our DHCPDISCOVER XID (1857241393) - ignoring packet (not for us)
   
   DHCP packets received on interface wlan0: 2
   DHCP packets received on interface lo: 0

Edit - in addition, you have this dnsmasq warning as a result:

not using configured address 192.168.0.3 because it is in us

See our documentation page for dnsmasq warnings:

https://docs.pi-hole.net/ftldns/dnsmasq_warn/

Handing out addresses used by known critical infrastructure (like the DHCP server or a relay) is prevented to avoid IP address duplication issues.

This can happen when you have configured a static address assignment for the IP address of your Pi-hole. As this could result in an IP address conflict, Pi-hole offers a different free address from your configured DHCP pool. As this means Pi-hole behaves differently than you configured it to, it issues a warning.

The solution would be to either remove the static reservation for the Pi-hole itself (see ADDRESS in the warning) or simply accept this warning as it should only happen during debug log generation. When this warning appears outside of a running DHCP test, check that your Pi-hole is indeed using a static address.

Thank you for your help and the quick reply.

I did realise that the router DHCP should be disabled, but if I do that I cannot use the Internet from my Raspi, and thus cannot upload the debug information using "pihole -d". (And neither can I connect to my Raspi remotely from another machine on my lan, or connect to the Internet from any other machine.)

I could however use another mechanism to send a debug file generated when the router DHCP is disabled. Is it safe to attach the file to a message on this forum, or is there a better way?

PM me the log.

1 Like

Many thanks again. PM sent. It looks like some special character(s) got lost or converted somehow, but the text remains

Your debug log shows that Pi-hole cannot connect to external DNS servers.

This section of the debug log checks supported versions with this command:

dig +short -t txt versions.pi-hole.net @ns1.pi-hole.net

which should return:

"Raspbian=9,10,11 Ubuntu=16,18,20,21 Debian=9,10,11 Fedora=33,34 CentOS=7,8"

*** [ DIAGNOSING ]: Operating system
[i] dig return code:  10
[i] dig response:  dig: couldn't get address for 'ns1.pi-hole.net': failure
[?] Distro:  Raspbian
[?] Error: Raspbian is not a supported distro (https://docs.pi-hole.net/main/prerequisites/)

Your Pi was unable to make the connection to the remote nameserver.

This section of the debug log checks DNS resolution and blocking - this was also unable to connect to an external DNS server.

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[?] www.wyleczpc.pl is 0.0.0.0 on lo (127.0.0.1)
[?] www.wyleczpc.pl is 0.0.0.0 on wlan0 (192.168.0.3)
[?] Failed to resolve doubleclick.com via a remote, public DNS server (8.8.8.8)

Are you running any software on your network to block or redirect port 53 traffic?

You also have these warnings:

*** [ DIAGNOSING ]: Pi-hole diagnosis messages
   id    timestamp            type                  message                                                       blob1                 blob2                 blob3                 blob4                 blob5               
   ----  -------------------  --------------------  ------------------------------------------------------------  --------------------  --------------------  --------------------  --------------------  --------------------
   32    2022-01-22 19:36:50  DNSMASQ_WARN          interface wlan0 does not currently exist                                                                                                                                  
   33    2022-01-23 09:54:31  DNSMASQ_WARN          no address range available for DHCP request via lo      

The first may be due to Pi-hole starting up before your Pi connects wirelessly to the network. You can add a startup delay for Pi-hole, to allow the wlan connection to be made prior to Pi-hole starting.

https://docs.pi-hole.net/ftldns/configfile/#delay_startup

10-15 seconds should do it.

The solution was to add a 15s delay. I have no idea why that suddenly became neceessary at a time when I was not changing anything on the Raspi, but it did the trick. Perhaps something to do with the WiFi strength or a hub upgrade sneakily applied by Virgin?

I've also removed the static IP address assigment from the Pi-hole DHCP, even though it did not seem to be causing any problems.

Thanks again!

There is still something a little awry.

I have just found these warnings, and I seem to remember there was a tempory glitch around the time of the warnings - could not access a couple of news page in an app - which may or may not be related. Pihole wasn't starting up or anything around that time, and wlan0 is associated with the WiFi access point I am using.

After that, everything seemed to work smoothly, but it would be nice to know if there is an underlying issue I should address

Screenshot 2022-01-25 at 22-18-06 Pi-hole - raspberrypi
20220125T221545

Here's a debug file I generated a lot later than the warnings, if it is any help
https://tricorder.pi-hole.net/IxY0uxD7/

Ooo, and a few more warnings I've just noticed, one very recent. Didn't notice any glitches this time.

20220125T223148

I've been busy with other stuff recently, and have not had time to look at this for a while. But to conclude...

I have just found out that moving the Raspi closer to the WiFi router removed the re-occurance of any warnings found after the "solution".

However, I needed to keep the startup delay to prevent a single warning "interface wlan0 does not currently exist" on booting the machine. Maybe I have had that single warning for months, and simply not noticed?

Anyway, everything is working smoothly again now, and my conclusion is that a deterioration in the WiFi signal provoked some or all of the earlier issues.

I hope this might help someone else

This is very likely. We just recently made this warnings appear in the web interface, but they have always been logged to /var/log/pihole.log in the past.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.