I have pi-hole on raspberry pi4b with this configuration in /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.254.123/24
static routers=192.168.254.254
static domain_name_servers=192.168.254.123
interface eth0:1
static ip_address=192.168.254.123/24
static routers=192.168.254.254
static domain_name_servers=192.168.254.123
interface eth0:2
static ip_address=192.168.252.123/24
static routers=192.168.252.254
static domain_name_servers=192.168.252.123
This I have a sub-net of cameras on 252 that are prevented from connecting to the internet, where the DSL router is at 254.
$ ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:a6:32:c4:2f:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.254.123/24 brd 192.168.254.255 scope global eth0:1
valid_lft forever preferred_lft forever
inet 192.168.252.123/24 brd 192.168.252.255 scope global eth0:2
valid_lft forever preferred_lft forever
inet6 fe80::2ab4:46ee:68a2:8f7e/64 scope link
valid_lft forever preferred_lft forever
Now I want to turn on the pi-hole DHCP server, and have it serve out a mask other than 255.255.255.0 and disable the DSL DHCP, but get errors:
DNSMASQ_WARN dnsmasq warning:
using interface eth0 instead
DNSMASQ_WARN dnsmasq warning:
DHCP packet received on eth0 which has no address
No DHCP context has been configured for this interface. Check your DHCP settings.
$ sudo pihole-FTL dhcp-discover
Scanning all your interfaces for DHCP servers and IPv6 routers
Timeout: 6 seconds
Error: Could not bind socket to interface eth0:1 (No such device)
Error: Could not bind socket to interface eth0:2 (No such device)
No answer on eth0:2
No answer on eth0:1
$ sudo grep dhcp /var/log/pihole/pihole.log
Feb 11 12:19:59 dnsmasq-dhcp[751]: DHCP, IP range 192.168.252.17 -- 192.168.252.23, lease time 1h
Feb 11 12:20:40 dnsmasq-dhcp[751]: DHCP packet received on eth0 which has no address
Feb 11 12:20:41 dnsmasq-dhcp[751]: DHCP packet received on eth0 which has no address
So is the dual-address naming a problem, or something else I’m missing?
Thank you