Pi-hole DHCP fails to assign IP addresses to devices

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

Expected Behaviour:

  • I have enabled the DHCP server on Pi-hole and disabled DHCP on my router.
  • My Raspberry Pi 3B+ has a static IP address 192.168.0.7.
  • My router has an IP address 192.168.0.1.
  • My DHCP range is configured to 192.168.0.10 - .255.
  • My Pi-hole DNS is configured to 1.1.1.1 and 1.0.0.1.
  • Pi-hole is up to date and all other applications on Pi.
  • I expect all devices to connect to network and work with Pi-hole.

Actual Behaviour:

  • All devices fail to obtain an IP address on the network when using auto DHCP. If I set a manual IP then devices can connect to the internet but are obviously not going through Pi-hole unless I manually set DNS on each device also, which defeats the purpose of setting up Pi-hole DHCP.
  • I have attempted ipconfig release, flushdns and renew for Windows 10.
  • Android devices fails to connect entirely on auto DHCP, "Failed to obtain IP address".
  • I have tried restarting router, Pi and devices multiple times.
  • Debug log doesn't have anything unusual to me except for one port conflict for lighttpd, which I resolved. There is only one red section re: "Block page X-Header".

Debug Token:

flnzsdh3t1

Thank you for any assistance. Please let me know if you need me to run any extra scripts or provide more information.

What is the output of this command (looking for DHCP transactions in the pihole log):

sudo grep DHCP /var/log/pihole.log

Please see output for sudo grep DHCP /var/log/pihole.log:

Feb  4 18:49:19 dnsmasq[8277]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
Feb  4 18:49:19 dnsmasq-dhcp[8277]: DHCP, IP range 192.168.0.10 -- 192.168.0.255, lease time 1d
Feb  4 18:49:19 dnsmasq-dhcp[8277]: DHCPv6, IP range ::100 -- ::1ff, lease time 1d, template for eth0
Feb  4 18:49:19 dnsmasq-dhcp[8277]: DHCPv4-derived IPv6 names on eth0
Feb  4 18:50:42 dnsmasq-dhcp[8277]: no address range available for DHCPv6 request via eth0
Feb  4 18:50:43 dnsmasq-dhcp[8277]: no address range available for DHCPv6 request via eth0
Feb  4 18:50:47 dnsmasq-dhcp[8277]: no address range available for DHCPv6 request via eth0
Feb  4 18:50:47 dnsmasq-dhcp[8277]: no address range available for DHCPv6 request via eth0
Feb  4 18:51:39 dnsmasq-dhcp[8277]: no address range available for DHCPv6 request via eth0

Let's try a slightly different query, since it is case sensitive.

sudo grep dhcp /var/log/pihole.log

Output for sudo grep DHCP /var/log/pihole.log

Feb 10 17:13:08 dnsmasq[6666]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
Feb 10 17:13:08 dnsmasq-dhcp[6666]: DHCP, IP range 192.168.0.10 -- 192.168.0.255, lease time 1d
Feb 10 17:13:08 dnsmasq-dhcp[6666]: DHCPv6, IP range ::100 -- ::1ff, lease time 1d, template for eth0
Feb 10 17:13:08 dnsmasq-dhcp[6666]: DHCPv4-derived IPv6 names on eth0
Feb 10 17:13:33 dnsmasq[6851]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
Feb 10 17:13:33 dnsmasq-dhcp[6851]: DHCP, IP range 192.168.0.10 -- 192.168.0.255, lease time 1d
Feb 10 17:13:33 dnsmasq-dhcp[6851]: DHCPv6, IP range ::100 -- ::1ff, lease time 1d, template for eth0
Feb 10 17:13:33 dnsmasq-dhcp[6851]: DHCPv4-derived IPv6 names on eth0
Feb 10 17:14:11 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:12 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:12 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:13 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:13 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:23 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:24 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:15:09 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:15:10 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0

Output for sudo grep dhcp /var/log/pihole.log

Feb 10 17:13:08 dnsmasq-dhcp[6666]: DHCP, IP range 192.168.0.10 -- 192.168.0.255, lease time 1d
Feb 10 17:13:08 dnsmasq-dhcp[6666]: DHCPv6, IP range ::100 -- ::1ff, lease time 1d, template for eth0
Feb 10 17:13:08 dnsmasq-dhcp[6666]: DHCPv4-derived IPv6 names on eth0
Feb 10 17:13:08 dnsmasq-dhcp[6666]: router advertisement on eth0
Feb 10 17:13:33 dnsmasq-dhcp[6851]: DHCP, IP range 192.168.0.10 -- 192.168.0.255, lease time 1d
Feb 10 17:13:33 dnsmasq-dhcp[6851]: DHCPv6, IP range ::100 -- ::1ff, lease time 1d, template for eth0
Feb 10 17:13:33 dnsmasq-dhcp[6851]: DHCPv4-derived IPv6 names on eth0
Feb 10 17:13:33 dnsmasq-dhcp[6851]: router advertisement on eth0
Feb 10 17:14:11 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:12 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:12 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:13 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:13 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:23 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:14:24 dnsmasq-dhcp[6851]: RTR-SOLICIT(eth0) 58:82:a8:0c:25:2a
Feb 10 17:14:24 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:15:09 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:15:09 dnsmasq-dhcp[6851]: RTR-SOLICIT(eth0)
Feb 10 17:15:10 dnsmasq-dhcp[6851]: no address range available for DHCPv6 request via eth0
Feb 10 17:16:05 dnsmasq-dhcp[6851]: RTR-SOLICIT(eth0) 24:18:1d:7c:5d:a1
Feb 10 17:17:03 dnsmasq-dhcp[6851]: RTR-SOLICIT(eth0) 60:f1:89:25:3e:c8
Feb 10 17:18:24 dnsmasq-dhcp[6851]: RTR-SOLICIT(eth0) 60:f1:89:25:3e:c8
Feb 10 17:18:30 dnsmasq-dhcp[6851]: RTR-SOLICIT(eth0) 24:18:1d:7c:5d:a1

Do you have a firewall installed on your Raspberry Pi ? Note that you need to permit some ports (67/68 UDP) also for DHCP.

Hi DL6ER,

I haven't intentionally installed a firewall on the Raspberry Pi unless another application has.

Could you advise on how to permit ports 67/68? It doesn't look like they are listening with DHCP enabled on Pi-Hole running sudo netstat -lptu:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost:4711          0.0.0.0:*               LISTEN      1336/pihole-FTL
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      526/vncserver-x11-c
tcp        0      0 0.0.0.0:http            0.0.0.0:*               LISTEN      663/lighttpd
tcp        0      0 0.0.0.0:domain          0.0.0.0:*               LISTEN      1336/pihole-FTL
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      566/sshd
tcp6       0      0 localhost:4711          [::]:*                  LISTEN      1336/pihole-FTL
tcp6       0      0 [::]:mysql              [::]:*                  LISTEN      653/mysqld
tcp6       0      0 [::]:5900               [::]:*                  LISTEN      526/vncserver-x11-c
tcp6       0      0 [::]:http               [::]:*                  LISTEN      663/lighttpd
tcp6       0      0 [::]:http-alt           [::]:*                  LISTEN      692/apache2
tcp6       0      0 [::]:domain             [::]:*                  LISTEN      1336/pihole-FTL
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      566/sshd
tcp6       0      0 [::]:3838               [::]:*                  LISTEN      323/shiny-server
udp        0      0 0.0.0.0:47647           0.0.0.0:*                           359/avahi-daemon: r
udp        0      0 0.0.0.0:domain          0.0.0.0:*                           1336/pihole-FTL
udp        0      0 0.0.0.0:bootps          0.0.0.0:*                           1336/pihole-FTL
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                           389/dhcpcd
udp        0      0 0.0.0.0:mdns            0.0.0.0:*                           359/avahi-daemon: r
udp6       0      0 [::]:dhcpv6-client      [::]:*                              389/dhcpcd
udp6       0      0 [::]:dhcpv6-server      [::]:*                              1336/pihole-FTL
udp6       0      0 [::]:domain             [::]:*                              1336/pihole-FTL
udp6       0      0 [::]:41137              [::]:*                              359/avahi-daemon: r
udp6       0      0 [::]:mdns               [::]:*                              359/avahi-daemon: r

Thanks

What is the output of this command, which should show the port numbers in use:

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:68 \|:80 \|:471'

pi@raspberrypi:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:68 \|:80 \|:471'
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:4711          0.0.0.0:*               LISTEN      1336/pihole-FTL
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      663/lighttpd
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      1336/pihole-FTL
tcp6       0      0 ::1:4711                :::*                    LISTEN      1336/pihole-FTL
tcp6       0      0 :::80                   :::*                    LISTEN      663/lighttpd
tcp6       0      0 :::53                   :::*                    LISTEN      1336/pihole-FTL
udp        0      0 0.0.0.0:53              0.0.0.0:*                           1336/pihole-FTL
udp        0      0 0.0.0.0:67              0.0.0.0:*                           1336/pihole-FTL
udp        0      0 0.0.0.0:68              0.0.0.0:*                           389/dhcpcd
udp6       0      0 :::53                   :::*                                1336/pihole-FTL

DHCPv6 use port 547

Hi Tntdruid, could you please advise on how to change the DHCPv6 port? I haven't been able to find this.

Thanks

Is there any other feedback on this issue?

Thanks!

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