Windows 10 機器無法連線到某些公用 Wifi

Windows 10 機器無法連線到某些公用 Wifi

我使用的是 Windows 10,有些 wifi 我的筆記型電腦無法連接,但我的 iphone 7 可以。

我注意到我的筆記型電腦上有一些奇怪的東西:
1.它有一個 DNS 後綴(來自工作中的 VPN,但即使我沒有運行 FortiClient,它也在那裡)。
2.它有 2 個來自工作的 DNS 條目(即使我沒有運行 FortiClient)。

這是我的筆記型電腦連接到任何 wifi 之前的網路資訊:

C:\Users\h>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-9UT1FIV
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Wireless LAN adapter Wi-Fi:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 8260
   Physical Address. . . . . . . . . : [my physical address]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : [another physical address]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

當我的筆記型電腦連接到「損壞的」wifi(適用於我的 iPhone)後:

C:\Users\h>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-9UT1FIV
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : mywork.com

Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : [another physical address]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 8260
   Physical Address. . . . . . . . . : [my physical address]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.161.165.206(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.224.0
   Lease Obtained. . . . . . . . . . : Thursday, January 4, 2018 3:49:24 PM
   Lease Expires . . . . . . . . . . : Thursday, January 4, 2018 4:04:28 PM
   Default Gateway . . . . . . . . . : 10.161.160.1
   DHCP Server . . . . . . . . . . . : 10.161.128.1
   DNS Servers . . . . . . . . . . . : 172.1.200.181
                                       172.1.208.81
                                       8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled

這是我連接到 iPhone 後的網路資訊(網路分享和工作):

C:\Users\h>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : DESKTOP-9UT1FIV
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : mywork.com

Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : [another physical address]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 8260
   Physical Address. . . . . . . . . : [my physical address]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 172.20.10.2(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.240
   Lease Obtained. . . . . . . . . . : Thursday, January 4, 2018 3:59:27 PM
   Lease Expires . . . . . . . . . . : Friday, January 5, 2018 3:45:06 PM
   Default Gateway . . . . . . . . . : 172.20.10.1
   DHCP Server . . . . . . . . . . . : 172.20.10.1
   DNS Servers . . . . . . . . . . . : 172.1.200.181
                                       172.1.208.81
                                       8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   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:18e3:5b70:4910:a696(Preferred)
   Link-local IPv6 Address . . . . . : fe80::18e3:5b70:4910:a696%10(Preferred)
   Default Gateway . . . . . . . . . : ::
   DHCPv6 IAID . . . . . . . . . . . : 268435456
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1E-8D-A3-00-98-83-89-25-3E-30
   NetBIOS over Tcpip. . . . . . . . : Disabled

C:\Users\h>

我有一種感覺,當它連接到“損壞的”wifi時,它會嘗試使用工作中的第一個DNS伺服器(172.1.200.181),只是因為當我嘗試訪問(“損壞的”wifi的)默認網關的IP時瀏覽器,它試圖將我重定向到帶有網域的登入頁面(公共 wifi 常見),然後它無法解析網域名稱並停在那裡。如果它使用8.8.8.8或8.8.8.4(第3和第4條目)的DNS伺服器(google的),那麼它應該已經正確解析了網域名稱。

所以我的問題是:
1. 有沒有辦法在 Windows 10 中重新排序 DNS 項目?
2. 有沒有辦法進一步診斷問題? (因為我真的很想解決這個問題,但令人煩惱的是我在路上無法使用公共 wifi)

先致謝!

答案1

您無法重新排序 DNS 伺服器。相反,刪除並添加以更改優先級。命令範例已發布這裡。不過我不確定Win10是否有效。

添加新的將把其他人推到列表中。您可以新增和刪除,但不能重新排序,您必須使用新增和刪除來按您想要的順序取得內容。

刪除命令是:

netsh interface ipv4 delete dnsserver name="<ID>" address=<DNSIP>

(您可以設定address=all刪除整個清單並從頭開始)

DNS 解析應該是自上而下的。如果有疑問,請運行nslookup,儘管資訊應該仍然相同。

執行 WireShark 擷取以查看是否還有其他問題。在排除 DNS 問題之前,請先進行更多挖掘。

答案2

看起來您的 Wi-Fi 適配器上可能有一些有趣的 DNS 設定。

  1. 控制面板\網路和 Internet\網路連接
  2. 右鍵單擊您正在使用的 Wi-Fi 轉接器,然後選擇屬性。
  3. 選擇 IPv4 並點選屬性按鈕
  4. 點選進階...
  5. 按一下 DNS 標籤

它應該看起來像這樣:

進階 DNS 設定

您可能必須清除其中的垃圾才能使 DNS 按預期工作,但您的工作 VPN 可能需要這些設定。

如果您使用工作提供的設備,請在更改一系列設定之前諮詢您的 IT 部門。使用工作筆記型電腦連接到陌生的 Wi-Fi 可能違反公司政策。在陌生的 Wi-Fi 網路上使用工作設備時,請務必使用工作 VPN 來保護您的連線。

相關內容