2

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 '192.168.1.10[56]' | cut -d ' ' -f 6 ; done | sort | uniq -c
  99 192.168.1.105#53(192.168.1.105)
   1 192.168.1.106#53(192.168.1.106)

resolv.conf

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
#
# SEE ALSO
#   dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
domain lan
nameserver 192.168.1.105
nameserver 192.168.1.106

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

1 Answer 1

4
  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.

1
  • 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 .