为什么 Windows 7 尝试针对 IPv6 DNS 服务器解析 DNS?

Dom*_*Dom 8 networking dns windows-7 ipv6

非常简单,刚刚安装了 Win 7,SP1,64 位。没有 IPv6 访问。网络状态显示 IPv4:Internet。IPv6:无网络访问。

选择一个具有同时具有 IPv4 和 IPv6 地址的 DNS 服务器的域,例如www.hummerzines.com.au(dave.ns.cloudflare.com)。

从命令行执行 nslookup:

C:\Users\Dom\Desktop>nslookup hummerzines.com.au dave.ns.cloudflare.com
Server:  dave.ns.cloudflare.com
Address:  173.245.59.109

Name:    hummerzines.com.au
Addresses:  141.101.116.193
          141.101.117.193
Run Code Online (Sandbox Code Playgroud)

现在从 nslookup 内部执行 nslookup:

C:\Users\Dom\Desktop>nslookup
Default Server:  resolv.internode.on.net
Address:  192.231.203.132

> hummerzines.com.au dave.ns.cloudflare.com
Server:  dave.ns.cloudflare.com
Addresses:  2400:cb00:2049:1::adf5:3b6d
          173.245.59.109

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to dave.ns.cloudflare.com timed-out
Run Code Online (Sandbox Code Playgroud)

为什么 Windows 在这两种情况下表现不同?我认为它超时是因为它试图通过 IPv6 进行 DNS 查找?我还没有运行 WireShark 来证明/否认这一点。

ipconfig /all 的输出:

Windows IP Configuration

   Host Name . . . . . . . . . . . . : xxx
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Realtek RTL8168D/8111D Family PCI-E Gigabit Ethernet NIC (NDIS 6.20) #2
   Physical Address. . . . . . . . . : 00-24-1D-C9-D0-7E
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Realtek RTL8168D/8111D Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)
   Physical Address. . . . . . . . . : 00-24-1D-C9-D0-8E
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::200a:e243:364f:8ec9%11(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.11.10(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, 20 February 2014 8:36:49 AM
   Lease Expires . . . . . . . . . . : Monday, 24 February 2014 8:36:48 AM
   Default Gateway . . . . . . . . . : 192.168.11.1
   DHCP Server . . . . . . . . . . . : 192.168.11.1
   DHCPv6 IAID . . . . . . . . . . . : 234890269
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-66-F2-E1-00-24-1D-C9-D0-8E

   DNS Servers . . . . . . . . . . . : 192.231.203.132
                                       192.231.203.3
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{0693AA71-5382-4DED-8260-EA710149F8A9}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 12:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:0:9d38:90d7:c0a:2ff5:c458:7ffb(Preferred)
   Link-local IPv6 Address . . . . . : fe80::c0a:2ff5:c458:7ffb%14(Preferred)
   Default Gateway . . . . . . . . . : ::
   NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter isatap.{870AA1C0-1FDE-4852-87D6-34357F1C7177}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
Run Code Online (Sandbox Code Playgroud)

Mic*_*ton 6

您的计算机已尝试创建 Teredo 连接。Teredo 是几种 IPv6 过渡技术之一,所有这些技术都有各种缺点。Teredo 的缺点是它在明确设计的各种场景中不起作用,例如在 IPv4 NAT 设备后面。

因此,由于启用了 Teredo,您的计算机会认为它具有 IPv6 连接,但实际上该连接已断开。(网络状态图标使用完全不同的连接检查方法,但更准确。)

要解决此问题,请禁用 Teredo(同时禁用其他两个有问题的 6to4 和 ISATAP)。右键单击命令提示符并单击以管理员身份运行,然后运行以下命令:

netsh int ipv6 isatap set state disabled
netsh int ipv6 6to4 set state disabled
netsh int teredo set state disabled
Run Code Online (Sandbox Code Playgroud)

然后重新启动计算机。