共用方式為


DNS 用戶端解析逾時

本文件說明在 Windows DNS 用戶端上設定一或多個域名系統 (DNS) 伺服器 IP 時存在的後援和逾時行為。

適用於: 支援的 Windows 用戶端版本
原始 KB 編號: 2834226

摘要

如需詳細資訊,請參閱 轉寄站和條件式轉寄站解析逾時

使用多個 DNS 伺服器 IP 設定 DNS 用戶端,可為您的 DNS 基礎結構新增額外的容錯。 如果唯一設定的 DNS 伺服器失敗、基礎網路連結的失敗,或將指定用戶端連線到 DNS 伺服器的支援網路基礎結構,則新增多個 DNS 伺服器 IP 可讓 DNS 名稱繼續解析。 這類名稱失敗可能會導致應用程式或元件停止響應、資源中斷等待直接或間接導致作業失敗的相依逾時到期。

基於這些原因,建議使用多個 DNS 伺服器設定任何 Windows 用戶端,但請務必注意 Windows 用戶端解析程式,因為它會根據我們設定的 DNS 伺服器數目而有所不同。

在 NIC 上設定單一 DNS 伺服器時,DNS 用戶端的預設行為為何

時間(開始後的秒數) 動作
0 用戶端查詢 DNS 伺服器
1 如果在 1 秒後未收到任何回應,用戶端會再次查詢 DNS 伺服器
2 如果在 1 秒之後未收到任何回應,用戶端會再次查詢 DNS 伺服器
4 如果在2秒後未收到任何回應,用戶端會再次查詢 DNS 伺服器
8 如果在 4 秒之後未收到任何回應,用戶端會再次查詢 DNS 伺服器
10 如果在 2 秒後未收到任何回應,用戶端會停止查詢

DNS 伺服器的任何名稱錯誤回應都會造成進程停止 - 如果回應為負數,用戶端不會重試。

在此案例中,用戶端會在逾時前五次嘗試查詢相同的 DNS 伺服器。

範例

已設定單一 DNS 伺服器的 Windows DNS 用戶端,查詢 Microsoft.com

用戶端上的Ipconfig

IPv4 位址。 . . . . . . . . . . :10.0.0.31(慣用)
DNS 伺服器。 . . . . . . . . . . : 10.0.0.1

網路追蹤輸出

Time                Time Offset    TimeDelta      Source        Dest          Details  

6:23:33.8063812     0.0000000     0.0000000     10.0.0.31     10.0.0.1     DNS:QueryId = 0xA5B4, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:23:34.8026943     0.9963131     0.9963131     10.0.0.31     10.0.0.1     DNS:QueryId = 0xA5B4, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:23:35.8042696     1.9978884     1.0015753     10.0.0.31     10.0.0.1     DNS:QueryId = 0xA5B4, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:23:37.8184257     4.0120445     2.0141561     10.0.0.31     10.0.0.1     DNS:QueryId = 0xA5B4, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:23:41.8394589     8.0330777     4.0210332     10.0.0.31     10.0.0.1     DNS:QueryId = 0xA5B4, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

在 NIC 上設定兩部 DNS 伺服器時,DNS 用戶端的預設行為為何

時間(開始後的秒數) 動作
0 用戶端會查詢清單的第一部 DNS 伺服器
1 如果在 1 秒之後未收到任何回應,客戶端會查詢清單的第二部 DNS 伺服器
2 如果在 1 秒之後未收到任何回應,用戶端會再次查詢清單的第二部 DNS 伺服器
4 如果在 2 秒之後未收到任何回應,客戶端會同時查詢清單中的所有伺服器
8 如果在 4 秒之後未收到任何回應,客戶端會同時查詢清單中的所有伺服器
10 如果在 2 秒後未收到任何回應,用戶端會停止查詢

任何 DNS 伺服器的任何名稱錯誤回應都會造成進程停止 - 如果回應為負數,用戶端不會使用下一部伺服器重試。 只有在無法連線到先前的伺服器時,用戶端才會嘗試新的伺服器。

範例

已設定查詢兩部 DNS 伺服器的 Windows DNS 用戶端 Microsoft.com

用戶端上的Ipconfig

IPv4 Address. . . . . . . . . . . : 10.0.0.31(Preferred)
DNS Servers . . . . . . . . . . . : 10.0.0.1
                                10.0.0.2  

網路追蹤輸出

Time                Time Offset    TimeDelta      Source        Dest          Details

6:28:12.5060330     0.0000000     0.0000000     10.0.0.31     10.0.0.1     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:28:13.5129164     1.0068834     1.0068834     10.0.0.31     10.0.0.2     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:28:14.5124283     2.0063953     0.9995119     10.0.0.31     10.0.0.2     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:28:16.5288823     4.0228493     2.0164540     10.0.0.31     10.0.0.1     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:28:16.5289050     4.0228720     0.0000227     10.0.0.31     10.0.0.2     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:28:20.5582196     8.0521866     4.0293146     10.0.0.31     10.0.0.1     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

6:28:20.5582475     8.0522145     0.0000279     10.0.0.31     10.0.0.2     DNS:QueryId = 0x7B1C, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet  

在 NIC 上設定三部以上的 DNS 伺服器時,DNS 用戶端的預設行為為何

其中有多少個使用,以及哪些逾時?

時間(開始後的秒數) 動作
0 用戶端會查詢清單的第一部 DNS 伺服器
1 如果在 1 秒之後未收到任何回應,客戶端會查詢清單的第二部 DNS 伺服器
2 如果在 1 秒之後未收到任何回應,用戶端會查詢清單的第三部 DNS 伺服器
4 如果在 2 秒之後未收到任何回應,客戶端會同時查詢清單中的所有伺服器
8 如果在 4 秒後未收到任何回應,客戶端會同時查詢清單中的所有伺服器
10 如果在 2 秒後未收到任何回應,用戶端會停止查詢

任何 DNS 伺服器的任何名稱錯誤回應都會造成進程停止 - 如果回應為負數,用戶端不會使用下一部伺服器重試。 只有在無法連線到先前的伺服器時,用戶端才會嘗試新的伺服器。

如果唯一可連線的伺服器位於 4 或更高位置,在實際嘗試之前,在原始查詢之後,預期延遲至少為 4 秒。 如果要求 DNS 解析的應用程式具有低於此值的應用程式解析逾時,這可能會導致問題。 讓此伺服器稍早查詢的唯一方法是將它設定在前三個位置。

範例

五部 DNS 伺服器的用戶端已設定查詢 Microsoft.com

用戶端上的Ipconfig

Pv4 Address. . . . . . . . . . . : 10.0.0.31(Preferred)
DNS Servers . . . . . . . . . . . : 10.0.0.1
                                10.0.0.2
                                10.0.0.3
                                10.0.0.4
                                10.0.0.5

網路追蹤輸出

Time                Time Offset    TimeDelta      Source        Dest          Details

9:50:19.4165728     0.0000000     0.0000000     10.0.0.31     10.0.0.1     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:20.4030068     0.9864340     0.9864340     10.0.0.31     10.0.0.2     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:21.4053190     1.9887462     1.0023122     10.0.0.31     10.0.0.3     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:23.4022371     3.9856643     1.9969181     10.0.0.31     10.0.0.1     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:23.4022575     3.9856847     0.0000204     10.0.0.31     10.0.0.2     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:23.4022646     3.9856918     0.0000071     10.0.0.31     10.0.0.3     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:23.4023130     3.9857402     0.0000484     10.0.0.31     10.0.0.4     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:23.4023347     3.9857619     0.0000217     10.0.0.31     10.0.0.5     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:27.4113578     7.9947850     4.0090231     10.0.0.31     10.0.0.1     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:27.4113788     7.9948060     0.0000210     10.0.0.31     10.0.0.2     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:27.4113860     7.9948132     0.0000072     10.0.0.31     10.0.0.3     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:27.4113932     7.9948204     0.0000072     10.0.0.31     10.0.0.4     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet

9:50:27.4114034     7.9948306     0.0000102     10.0.0.31     10.0.0.5     DNS:QueryId = 0xE2A2, QUERY (Standard query), Query  for microsoft.com of type Host Addr on class Internet  

其他相關資訊

如果用戶端具有一個以上的 NIC,且其上設定了不同的 DNS 伺服器,用戶端解析行為會稍有不同。

如果使用 nslookup 之類的名稱解析工具,則用戶端解析行為會有所不同。