識別碼 (microsoft-windows-tcpip-interface-interface-identifier)

Identifier 會指定要套用至介面內其他設定的 介面。 它可以以下列任一種方式表示:

  • 介面 net 本機唯一識別碼的字串表示 (NetLUID) (0x6000001000000)

  • 例如,本機區域連線 (介面別名)

  • 介面 MAC 位址 (00-11-22-33-44-55)

注意介面中的設定必須依下列順序新增:Ipv4SettingsIpv6Settings、Identifier、UnicastIpAddressesRoute。 在 Windows SIM 中儲存您的自動安裝檔案之後,請在 XML 檔案中確認輸出是以正確的順序顯示,如下列 XML 範例所示。

識別碼

指定要套用至 內其他設定的 Interface 介面。 識別碼 是長度上限為 256 個字元的字串。

這種字串不支援空的元素。 請勿為這種字串建立空值。

注意 在有多個相同類型網路介面的電腦中,例如 LAN 連線、每個介面的 LUID 和介面別名不保證在不同的組建之間相同。 安裝之後,請確認設定已套用至正確的介面。

有效的組態傳遞

特殊化

windowsPE

父階層

Microsoft-Windows-TCPIP | 介面 | 介面 | 識別碼

套用至

如需此元件支援的 Windows 版本和架構清單,請參閱 Microsoft-Windows-TCPIP

XML 範例

下列 XML 輸出示範如何設定 TCPIP。

<component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Interfaces>
   <!-- Add static IP address (192.168.0.1/24, ffff:1::3/48) & route (12.34.0.0/16) to interface with identifier "Ethernet 1" -->      <Interface wcm:action="add">
         <Ipv4Settings>
            <DhcpEnabled>true</DhcpEnabled> 
            <Metric>20</Metric> 
            <RouterDiscoveryEnabled>false</RouterDiscoveryEnabled> 
         </Ipv4Settings>
         <Ipv6Settings>
            <DhcpEnabled>false</DhcpEnabled> 
            <Metric>30</Metric> 
            <RouterDiscoveryEnabled>true</RouterDiscoveryEnabled> 
         </Ipv6Settings>
      <!-- Target the interface with identifier "Ethernet 1" -->         <Identifier>Ethernet 1</Identifier>
         <UnicastIpAddresses>
           <IpAddress wcm:action="add" wcm:keyValue="1">192.168.0.1/24</IpAddress>
           <IpAddress wcm:action="add" wcm:keyValue="2">ffff:1::3/48</IpAddress>
         </UnicastIpAddresses>
         <Routes>
            <Route wcm:action="add">
               <Identifier>1</Identifier> 
               <Metric>10</Metric> 
               <NextHopAddress>12.34.0.0</NextHopAddress> 
               <Prefix>16</Prefix> 
            </Route>
            <Route wcm:action="add">
               <Identifier>10</Identifier> 
               <Metric>29</Metric> 
               <NextHopAddress>12.34.56.0</NextHopAddress> 
               <Prefix>24</Prefix> 
            </Route>
         </Routes>
      </Interface>
      <Interface wcm:action="add">
         <Ipv4Settings>
            <DhcpEnabled>true</DhcpEnabled> 
            <Metric>20</Metric> 
            <RouterDiscoveryEnabled>false</RouterDiscoveryEnabled> 
         </Ipv4Settings>
         <Ipv6Settings>
            <DhcpEnabled>false</DhcpEnabled> 
            <Metric>10</Metric> 
            <RouterDiscoveryEnabled>true</RouterDiscoveryEnabled> 
         </Ipv6Settings>
         <Identifier>Local Area Connection</Identifier> 
         <UnicastIpAddresses>
            <IpAddress wcm:action="add" wcm:keyValue="1">123.45.67.8</IpAddress> 
            </UnicastIpAddresses>
         <Routes>
            <Route wcm:action="add">
               <Identifier>1</Identifier> 
               <Metric>10</Metric> 
               <NextHopAddress>12.34.0.0</NextHopAddress> 
               <Prefix>16</Prefix> 
            </Route>
         </Routes>
      </Interface>
   </Interfaces>
</component>

介面