IpAddress (microsoft-unicastipaddresses-ip 地址) IpAddress (microsoft-windows-tcpip-interfaces-interface-unicastipaddresses-ipaddress)

IpAddress 指定接口的单播 IP 地址。IpAddress specifies a unicast IP address for the interface. 可为 IPv4 和 IPv6 协议指定单播 IP 地址。You can specify the unicast IP address for both the IPv4 and the IPv6 protocols.

备注

在将此元素添加到答案文件之前,子元素不会出现在 Windows 系统映像管理器的 " 属性 " 窗格中 (windows SIM) 。The child elements do not appear in the Properties pane of Windows System Image Manager (Windows SIM) until you add this element to the answer file.

子元素Child Elements

设置Setting 说明Description
KeyKey 指定的唯一键 IpAddressSpecifies a unique key for the IpAddress.
Value 指定 IpAddress 的值。Specifies the value of the IpAddress.

该字符串类型不支持空元素。This string type does not support empty elements. 请勿为该设置创建空值。Do not create an empty value for this setting.

有效的配置阶段Valid Configuration Passes

specializespecialize

windowsPEwindowsPE

父层次结构Parent Hierarchy

Microsoft-Windows-TCPIP | 接口 | 接口 | UnicastIpAddresses | IpAddressMicrosoft-Windows-TCPIP | Interfaces | Interface | UnicastIpAddresses | IpAddress

适用于Applies To

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-WINDOWS TCPIPFor a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-TCPIP.

XML 示例XML Example

以下 XML 输出显示了如何配置 TCPIP。The following XML output shows how to configure 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>
      <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>

UnicastIpAddressesUnicastIpAddresses