I now have two DNS servers for my home network. Once I took DNS and DHCP off the router and moved them onto the server it was easy to connect to services on the home network by DNS name. But if the one DNS server was down then no devices could get to the Internet. Not good.
Time to set up a second DNS server. That need prompted my first Raspberry Pi purchase. The default app for DNS and DHCP on Raspberry Pi is DNSMasq. Tried to make it secondary to the existing primary BIND9 server. I didn’t work that out so purge DNSMasq from the Raspberry Pi and install BIND9.
Once I got the config statements worked out it’s been fun disabling one or the other and having the resolvectrl status command show the flip back and forth between the active DNS server and my web pages are found regardless the server that’s running.
The host with both DNS servers running:
localhost:~$ resolvectl status interface
Link 3 (interface)
Current Scopes: DNS
DefaultRoute setting: yes
Current DNS Server: 192.168.0.205
DNS Servers: 192.168.0.203
192.168.0.205
…shutdown the .205 bind9 server
server205:~$ sudo systemctl stop bind9.service
server205:~$ sudo systemctl status bind9.service
* named.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2023-01-23 06:51:42 EST; 35s ago
…and now the host’s current DNS server changes once the .205 bind9.service is shutdown.
localhost:~$ resolvectl status interface
Link 3 (interface)
Current Scopes: DNS
DefaultRoute setting: yes
Current DNS Server: 192.168.0.203
DNS Servers: 192.168.0.203
192.168.0.205