Is there any way to force resolv.conf to always query all servers for an IP? Currently if I have


It will try first. If there is no response in 5 seconds then it will query I would want it to always query both at the same time and use whichever answers first.

  • /etc/resolv.conf is a data file, and does not query anything.
    – JdeBP
    May 16 '19 at 3:38

No... and yes.

"No". The behaviour you're seeing is embedded into the library routines. The OS will always try the servers in order, producing the behaviour you're seeing. So resolv.conf can not solve this problem.

"Yes". However... you can cheat. You can specify a single DNS server in resolv.conf and that can perform parallel lookups on your behalf, and return the results of the first server to respond. dnsmasq has the --all-servers option, for example.



You can achieve that using dnsmasq.

There's an (external) article here explaining how to do so, and how to fix it to be dnssec aware.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.