Yes, this is fine.
Would you mind expanding on that a bit? Let's say I have pihole1
and pihole2
serving both DHCP and DNS.
Each would serve half of the IP range, and register locally the hostname for this lease.
Say pihole1
offers 192.168.10.12 to myphone
, and registers myphone
on its DNS.
How would pihole2
know that they need to query pihole1
if they cannot find myphone
in their own DNS? (in the case they are the ones queried, out of the two IPs a LAN client would have)
EDIT: I read about conditional forwarding on my (for now - single) Pi-hole. The description mentions that
A valid config line could look like true,192.168.0.0/24,192.168.0.1,fritz.box
Let's say I serve 192.168.10.0/25 and 192.168.10.128/25 on to two Pi-holes. I would like to have a direct and reverse resolution. Would this work?
true,192.168.10.0/25,192.168.10.1,home.arpa
true,192.168.10.128/25,192.168.10.128,home.arpa
Notably would this send a request to resolve myphone.home.arpa
to both 192.168.10.1 and 192.168.10.128? (and get a replay from one of them, and a SERVFAIL
(not NXDOMAIN
!) from the other)
EDIT: I fear that this will not fly:
root@srv /e/docker# dig @192.168.10.2 imprimante.home.arpa
; <<>> DiG 9.18.33-1~deb12u2-Debian <<>> @192.168.10.2 imprimante.home.arpa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34747
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;imprimante.home.arpa. IN A
;; ANSWER SECTION:
imprimante.home.arpa. 0 IN A 192.168.10.11
;; Query time: 16 msec
;; SERVER: 192.168.10.2#53(192.168.10.2) (UDP)
;; WHEN: Tue Jul 08 16:30:01 CEST 2025
;; MSG SIZE rcvd: 65
root@srv /e/docker# dig @192.168.10.2 doesnotexist.home.arpa
; <<>> DiG 9.18.33-1~deb12u2-Debian <<>> @192.168.10.2 doesnotexist.home.arpa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2673
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;doesnotexist.home.arpa. IN A
;; Query time: 0 msec
;; SERVER: 192.168.10.2#53(192.168.10.2) (UDP)
;; WHEN: Tue Jul 08 16:30:14 CEST 2025
;; MSG SIZE rcvd: 51
The answer is NXDOMAIN
, which is correct but is not the right answer in case of a HA setup (because if I get that first, I will not query the other one - the answer means "host does not exist in my database, and I respond as the main source of truth")