julyclyde
2023-01-28 09:01:54 +08:00
其实是好几个问题:
dhcp 下发 options 的时候,服务器配置的顺序和客户端接收到的顺序是否一致
客户端拥有多个 DNS 服务器的时候,其使用策略怎样
对于第二个问题,在 glibc 的情况下
man resolv.conf 里面写着:
If there are multiple servers, the resolver library queries them in the order listed. If no nameserver
entries are present, the default is to use the name server on the local machine. (The algorithm used is to try a name server, and if the query times out, try the next, until out of name
servers, then repeat trying all the name servers until a maximum number of retries are made.)
其他解析库请参考其文档或者源码