随机化 DNS 名称服务器

Ste*_*eve 4 domain-name-system resolv.conf

是否可以在 Unix 系统上的 /etc/resolv.conf 中列出多个名称服务器,并在进行 dns 查询时使用随机名称服务器解析 dns 查询,而不仅仅是第一个?

eww*_*ite 8

对于 Linux 系统,我使用timeoutrotate选项/etc/resolv.conf... 我通常将 DNS 超时降低到 1 秒。

timeout:n
    sets the amount of time the resolver will wait for a response from a remote name server
    before  retrying  the  query  via  a  different  name server.  Measured in seconds, the
    default is RES_TIMEOUT (currently 5, see  <resolv.h>).   The  maximum  value  for  this
    option is silently capped to 30.
Run Code Online (Sandbox Code Playgroud)

rotate 
    sets RES_ROTATE in _res.options, which causes round robin selection of nameservers from
    among  those  listed.  This has the effect of spreading the query load among all listed
    servers, rather than having all clients try the first listed server first every time.
Run Code Online (Sandbox Code Playgroud)