Windows如何决定在解析名称时使用哪个DNS服务器?

Windows使用什么算法来决定它将查询哪个DNS服务器以解析名称

假设我有几个接口,都是活动的,有些没有指定DNS服务器,有些被告知自动确定它,有些接口是手动指定的(在接口ipv4和接口ipv6中).

我要求回答这个一般性问题,希望我知道如何在Windows Vista中解决更具体的问题 – 我有两个接口,一个是较低的指标,另一个是手动指定的DNS服务器. nslookup使用THIS DNS服务器并正确解析名称.但是,除非我为其他接口手动指定DNS服务器,否则所有其他应用程序都无法解析名称,然后应用程序将使用该服务器.一旦指定,nslookup还使用为此其他接口指定的DNS服务器.

谢谢

如果我没有弄错的话,它取决于网络连接文件夹中高级设置中的NIC绑定顺序.您可以通过更改各种NIC的绑定顺序并运行nslookup作为测试来验证它.

为了扩展我的答案,引用the article that Evan linked,这是以下文章的摘录:

The DNS Client service queries the DNS servers in the following order:

  1. The DNS Client service sends the name query to the first DNS server on the preferred adapter’s list of DNS servers and waits one second for a response.

  2. If the DNS Client service does not receive a response from the first DNS server within one second,it sends the name query to the first DNS servers on all adapters that are still under consideration and waits two seconds for a response.

  3. If the DNS Client service does not receive a response from any DNS server within two seconds,the DNS Client service sends the query to all DNS servers on all adapters that are still under consideration and waits another two seconds for a response.

  4. If the DNS Client service still does not receive a response from any DNS server,it sends the name query to all DNS servers on all adapters that are still under consideration and waits four seconds for a response.

  5. If it the DNS Client service does not receive a response from any DNS server,the DNS client sends the query to all DNS servers on all adapters that are still under consideration and waits eight seconds for a response.

步骤1中的首选适配器是在绑定顺序中首先列出的适配器.

相关文章

Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...
Windows文件操作基础代码 Windows下对文件进行操作使用的一段...
Winpcap基础代码 使用Winpcap进行网络数据的截获和发送都需要...
使用vbs脚本进行批量编码转换 最近需要使用SourceInsight查看...