Fallback DNS server in case of AGH downtime
Prerequisites
- [x] I am running the latest version
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed
Problem Description
Depending on various events, the machine hosting AdGuard Home may go down unexpectedly. Thus, devices connected to the network cannot query their DNS server (AGH). I use AGH as my DHCP server, as my ISP does not allow to change DNS configuration.
Proposed Solution
An ideal solution would be to be able to advertise (through DHCP?) a fallback DNS server (the one from the ISP, or any other DNS server), which would be used only if the primary server does not answer.
Maybe something like dhcp-option=6,AGH_IP,SecondaryDNS_IP for dnsmasq?
Thanks a lot :)
I use AGH as my DHCP server
An ideal solution would be to be able to advertise (through DHCP?)
If the DHCP server is down, then how would it advertise said DNS IPs?
In any case, the docs mention the ability to override the DNS servers sent by DHCP.
But it would be of no use if your DHCP server is down.
@maxauvy, hello. Unfortunately, it's not possible to use DHCP options for that. The thing is it's impossible to automatically determine why the server doesn't respond. The OS decides whether to use the secondary DNS server or not. To be honest I'm pretty sure such a scheme is not even foreseen by DNS.
Hello 😃
If the DHCP server is down, then how would it advertise said DNS IPs?
That shouldn't be a problem if the device has a valid DHCP lease. Of course if one switches on a device while the DHCP server is already down, there's no easy solution.
Thanks y'all for your answers!
Well leases expire and its not prudent to depend upon them.
As I said, you can try setting multiple DNS servers in DHCP options and see whether the odds are in your favor when the DHCP server and the primary DNS server go down.
@maxauvy, if there are no more questions, we'll close the issue. Feel free to start a discussion on the topic.