Expected Behavior:
Pi assigns all devices an IPv4 address as they connect to the network. Devices are able to access the internet. Pi blocks blacklisted domains.
Actual Behavior:
Some devices cannot connect to the network at all. I can not find any discernible pattern as to which devices can and which cannot. Devices on the network can access the internet, but domain blocking does not function. Multiple warnings appear in the diagnostic logs.
Details:
I am running Pi-hole on a Pi 5, Raspian OS, outside docker. My router does not support assigning the Pi as the DNS and so I have to configure it as the DHCP server for my network. When I try to set the Pi as the DHCP server it fails to assign IP addresses to some devices and not others. I am unclear as to why.
The Pi-hole diagnosis keeps throwing the following 2 errors:
DHCP range 192.168.1.2 -- 192.168.1.254 is not consistent with netmask 255.255.255.255
No address range available for DHCP request via eth0
The contents of the 02-pihole-dhcp.conf read
dhcp-authoritative
dhcp-range=192.168.1.2,192.168.1.254,24h
dhcp-option=option:router,192.168.1.1
dhcp-leasefile=/etc/pihole/dhcp.leases
#quiet-dhcp
domain=local
local=/local/
dhcp-rapid-commit
There's no mention of a netmask anywhere on the Pi-hole GUI or the router settings, so I suspected this might have something to do with the ifconfig. Output:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::2bd2:e5ff:b9e2:2707 prefixlen 64 scopeid 0x20
ether 2c:cf:67:2e:07:f6 txqueuelen 1000 (Ethernet)
RX packets 5049 bytes 1281001 (1.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2415 bytes 2993767 (2.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 106
Suspecting the netmask might be causing the issue, I reset it to 255.255.255.0, but when I reconnected the Pi it immediately reset to 255.255.255.255.
Debug log below: https://tricorder.pi-hole.net/0fmH5786/
Any help would be greatly appreciated.
Addendum: This is either helpful context or a red herring. While I was writing this the following warnings also occurred
no address range available for DHCP request via docker0
AFAIK I am not running Pi-hole through docker, but I do have other containers in docker on the pi. This was not generated while accessing those.
ignoring query from non-local network 192.168.1.48 (logged only once)
There is no .48 on our network.