DNSServerSearchOrderDNSServerSearchOrder

DNSServerSearchOrder 指定要搜尋網路上的 DNS 伺服器時使用 IP 位址的清單。DNSServerSearchOrder specifies a list of IP addresses to use when searching for the DNS server on the network.

當 DNS 用戶端執行自動的安裝,您可以設定 DNS 用戶端來搜尋尾碼的清單,以及要使用的 DNS 伺服器清單。When running unattended setup for a DNS client, you can configure a list of suffixes for the DNS client to search and a list of DNS servers to use.

不過,項目不會保證任何特定的順序套用。However, the entries are not guaranteed to be applied in any specific order.

若要確保正確的 DNS 伺服器順序,請使用金鑰DNSServerSearchOrder金鑰DNSSuffixSearchOrder指定順序中的每個 DNS 伺服器應該搜尋。To ensure the correct ordering of DNS servers, use Key in DNSServerSearchOrder and Key in DNSSuffixSearchOrder to specify the order in which each DNS server should be searched. 例如,For example,

   <DNSServerSearchOrder>
      <IpAddress wcm:action="add" wcm:keyValue="2">2001:4898:28:4:213:20ff:fe16:3e96</IpAddress>
      <IpAddress wcm:action="add" wcm:keyValue="3">172.16.1.12</IpAddress>
      <IpAddress wcm:action="add" wcm:keyValue="1">192.168.1.1</IpAddress>
   </DNSServerSearchOrder>

您也可以使用金鑰下方設定DNSSuffixSearchOrder項目,以確保後置詞會搜尋特定的順序。You can also use the Key setting under DNSSuffixSearchOrder element to ensure that suffixes are searched in a specific order. 例如,For example,

   <DNSSuffixSearchOrder>
      <DomainName wcm:action="add" wcm:keyValue="2">fabrikam.com</DomainName>
      <DomainName wcm:action="add" wcm:keyValue="3">server2.fabrikam.com</DomainName>
      <DomainName wcm:action="add" wcm:keyValue="1">server1.fabrikam.com</DomainName>    
      </ DNSSuffixSearchOrder >

這些範例中,值的兩個金鑰DNSServerSearchOrder金鑰DNSSuffixSearchOrder表示要在其中搜尋的 DNS 伺服器的順序。For both of these examples, the value for Keyin DNSServerSearchOrder and Key in DNSSuffixSearchOrder indicates the order in which the DNS servers are searched. 在此範例中,伺服器搜尋順序清單為:In this example, the server search order list is:

  1. 192.168.1.1192.168.1.1
  2. 2001:4898:28:4:213:20ff:fe16:3e962001:4898:28:4:213:20ff:fe16:3e96
  3. 172.16.1.12172.16.1.12

尾碼搜尋順序為:The suffix search order is:

  1. server1.fabrikam.comserver1.fabrikam.com
  2. fabrikam.comfabrikam.com
  3. server2.fabrikam.comserver2.fabrikam.com

金鑰DNSServerSearchOrder金鑰DNSSuffixSearchOrder必須是唯一的而且可以設定為任何英數字元。The value for Keyin DNSServerSearchOrder and Key in DNSSuffixSearchOrder must be unique, and can be set to any alphanumeric character. 如果值為數值 (只包含數字),這些將會套用至排序的清單IpAddressDNSServerSearchOrderIf the value is numeric (contains only numbers), these will be applied to order the list of IpAddress within DNSServerSearchOrder.

子項目Child Elements

設定Setting 描述Description
IpAddressIpAddress 指定的 IP 位址。Specifies an IP address.

父階層Parent Hierarchy

Microsoft-Windows-DNS-Client | Interfaces | Interface | DNSServerSearchOrderMicrosoft-Windows-DNS-Client | Interfaces | Interface | DNSServerSearchOrder

有效的設定階段Valid Configuration Passes

特製化specialize

套用至Applies To

如需支援的 Windows 版本和架構,此元件支援的清單,請參閱Microsoft Windows DNS-ClientFor the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-DNS-Client.

XML 範例XML Example

下列的 XML 輸出會顯示 DNS 網域設定為 Fabrikam。The following XML output shows a DNS domain configuration for Fabrikam.

   <DNSDomain>fabrikam.com</DNSDomain>
   <DNSSuffixSearchOrder>
      <DomainName wcm:action="add" wcm:keyValue="1">server1.fabrikam.com</DomainName>
      <DomainName wcm:action="add" wcm:keyValue="2">fabrikam.com</DomainName>
   </DNSSuffixSearchOrder>
   <UseDomainNameDevolution>true</UseDomainNameDevolution>
   <Interfaces>
      <Interface wcm:action="add">
         <Identifier>Local Area Connection</Identifier>
         <DNSDomain>fabrikam.com</DNSDomain>
         <DNSServerSearchOrder>
            <IpAddress wcm:action="add" wcm:keyValue="1">192.168.1.1</IpAddress>
            <IpAddress wcm:action="add" wcm:keyValue="2">192.168.1.2</IpAddress>
         </DNSServerSearchOrder>
         <EnableAdapterDomainNameRegistration>true</EnableAdapterDomainNameRegistration>
         <DisableDynamicUpdate>false</DisableDynamicUpdate>
      </Interface>
      <Interface wcm:action="add">
         <Identifier>Local Area Connection 2</Identifier>
         <DNSDomain>fabrikam.com</DNSDomain>
         <DNSServerSearchOrder>
            <IpAddress wcm:action="add" wcm:keyValue="1">192.168.1.1</IpAddress>
            <IpAddress wcm:action="add" wcm:keyValue="2">2001:4898:28:4:213:20ff:fe16:3e96</IpAddress>
         </DNSServerSearchOrder>
         <EnableAdapterDomainNameRegistration>true</EnableAdapterDomainNameRegistration>
        <DisableDynamicUpdate>false</DisableDynamicUpdate>
      </Interface>
   </Interfaces>

介面Interface