I would like to configure the following:

options rotate timeout:1 retries:1

What is the way to achieve that with scutil --dns. I can't find it anywhere in the documentation.

$ for i in {1..100}; do dig +trace +ans google.com | grep Received | egrep '[56]' | cut -d ' ' -f 6 ; done | sort | uniq -c


bash-3.2$ cat /etc/resolv.conf
# macOS Notice
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
# To view the DNS configuration used by this system, use:
#   scutil --dns
#   dns-sd(1), scutil(8)
# This file is automatically generated.
domain lan

I am not sure when and why is 99% of requests go to one name server.

1 Answer 1

  1. scutil allows changing the computer name, local host name (for Bonjour) and/or global host name (for gethostname).
  2. macOS always performs a rotate when more than one DNS name is returned.
  3. The DNS resolver for macOS is self-optimizing and far more advanced than the resolv.conf parameters can convey.

TLDR: macOS doesn't use resolv.conf. It auto-generates one for applications that need to see such a file, but its DNS resolver is auto-optimizing and auto-configuring.

  • Actually the observed behaviour for CLI tools is quite strange. I update the question.
    – Istvan
    Apr 22, 2019 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .