I am able to configure multiple DNS servers under "DHCP and DNS > DNS forwardings". I have a DNS server running on LAN (pihole), and if I configure it as the only DNS server, everything works as expected.
I would also like to specify a fallback DNS server, such as 1.1.1.1, however, if I specify 2 DNS servers, it seems to be chosen at random, and not in the order that they are specified in.
most clients will use the 1st DNS IP as long as it works.
if you shut it down, it'll keep using the 2nd for a while, even if you bring up the 1st again.
I was under the impression that when I specify a DNS server under "DNS forwardings" (not "Interfaces > LAN > Advanced > Use custom DNS servers"), it's resolved on the router, rather than advertised to the clients.
Thank you, no idea how I missed that option. And it works.
As a related side question. When I specify options timeout:2 and attempts:1 in resolv.conf, it seems to have no effect, DNS queries still take around 10 seconds when the "main" server is down.
Is there a way to make it to give up on trying to reach the "main" server more quickly?
Using an unfiltered DNS server as fallback pretty much defeats the purpose, especially as you never know how the clients deal with it. There are two good options for this, either configuring only the primary DNS server and making sure that it (pihole) never goes down - or setting up a parallel pihole on different hardware. In a home environment, using a single DNS server only is usually good enough.