0

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

nameserver 1.1.1.1
nameserver 8.8.8.8

It will try 1.1.1.1 first. If there is no response in 5 seconds then it will query 8.8.8.8. 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 at 3:38
4

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.

3

Yes,

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.

https://jeanbruenn.info/2017/05/28/parallel-dns-lookup-using-dnsmasq/

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.