值 (unicastipaddresses----值) Value (microsoft-windows-tcpip-interfaces-interface-unicastipaddresses-ipaddress-value)

Value 指定 IpAddress的值。Value specifies the value of the IpAddress.

它还可以选择性地指定路由前缀长度,这通常表示为子网掩码。It can also optionally specify a routing prefix length, which is often expressed as a subnet mask. 路由前缀长度 是指 IP 地址中的前导位数。The routing prefix length refers to the number of leading bits in the IP address. 子网掩码 是一个位掩码,涵盖前缀中使用的位数。A subnet mask is a bit mask covering the number of bits used in the prefix.

如果未定义路由前缀长度,将根据 IP 地址的类使用默认路由前缀长度。If the routing prefix length is not defined, the default routing prefix length will be used, based on the class of the IP address.

IPv4 地址的默认路由前缀长度和子网掩码Default routing prefix lengths and subnet masks for IPv4 addresses

Class 开始Start 结束End 默认路由前缀长度Default routing prefix length 以点分隔的默认子网掩码Default subnet mask in dotted decimal

AA

0.0.0.00.0.0.0

127.255.255.255127.255.255.255

88

255.0.0.0255.0.0.0

BB

128.0.0.0128.0.0.0

191.255.255.255191.255.255.255

1616

255.255.0.0255.255.0.0

CC

192.0.0.0192.0.0.0

223.255.255.255223.255.255.255

2424

255.255.255.0255.255.255.0

DD

224.0.0.0224.0.0.0

239.255.255.255239.255.255.255

多播Multicasting

多播Multicasting

EE

240.0.0.0240.0.0.0

255.255.255.254255.255.255.254

预留Reserved

预留Reserved

注意Note
此元素不会出现在 Windows 系统映像管理器的 " 属性 " 窗格中 (windows SIM) ,直到你将 IpAddress 添加到无人参与安装答案文件。This element does not appear in the Properties pane of Windows System Image Manager (Windows SIM) until you add IpAddress to the unattended installation answer file.

Values

Value

指定 IP 地址的值和路由前缀长度。Specifies the value of the IP Address, and routing prefix length. 为字符串。Value is a string.

若要使用默认路由前缀长度,请使用以下格式: < IP_Address > To use the default routing prefix length, use the format: <IP_Address>. < IP_Address > 可以是任何有效的 IPv4 或 IPv6 地址。<IP_Address> can be any valid IPv4 or IPv6 address.

若要定义路由前缀长度,请使用以下格式: < IP_Address > / < Routing_Prefix_Length > To define a routing prefix length, use the format: <IP_Address>/<Routing_Prefix_Length>. 对于 IPv4 地址, < Routing_Prefix_Length > 可以是0到32之间的任何值。For IPv4 addresses, <Routing_Prefix_Length> can be any value between 0 and 32. 对于 IPv6 地址, < Routing_Prefix_Length > 可以是0到64之间的任何值。For IPv6 addresses, <Routing_Prefix_Length> can be any value between 0 and 64.

有效的配置阶段Valid Configuration Passes

specializespecialize

windowsPEwindowsPE

父层次结构Parent Hierarchy

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

适用于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 输出显示了如何配置两个静态 IP 地址。The following XML output shows how to configure two static IP addresses. 在此示例中:In this example:

  • IPv4 地址设置为192.168.1.0,路由前缀长度为25。The IPv4 address is set to 192.168.1.0, with a routing prefix length of 25. 这会将子网掩码定义为255.255.255.128。This defines the subnet mask as 255.255.255.128.

  • IPv6 地址设置为 ffff:1::3,路由前缀长度为48。The IPv6 address is set to ffff:1::3, with a routing prefix length of 48. 这会将子网掩码定义为 ffff: ffff: ffff:0000:0000:0000:0000:0000。This defines the subnet mask as ffff:ffff:ffff:0000:0000:0000:0000:0000.

      <UnicastIpAddresses>
         <IpAddress wcm:action="add" wcm:keyValue="1">192.168.0.1/25</IpAddress> 
         <IpAddress wcm:action="add" wcm:keyValue="2">ffff:1::3/48</IpAddress> 
      </UnicastIpAddresses>

以下 XML 输出显示了如何配置单个 IP 地址。The following XML output shows how to configure a single IP address. 在此示例中,IP 地址设置为10.168.1.0。In this example, the IP address is set to 10.168.1.0. 这是一个 IPv4 类的地址。This is an IPv4 Class A address. Windows 使用默认的子网掩码255.0.0.0。Windows uses the default subnet mask of 255.0.0.0.

      <UnicastIpAddresses>
         <IpAddress wcm:action="add" wcm:keyValue="1">10.168.1.0</IpAddress> 
      </UnicastIpAddresses>

以下 XML 输出显示了如何配置单个 TCP/IP 地址。The following XML output shows how to configure a single TCP/IP address. 在此示例中,IP 地址设置为160.168.1.0。In this example, the IP address is set to 160.168.1.0. 这是一个 IPv4 B 类地址。This is an IPv4 Class B address. Windows 使用默认的子网掩码255.255.0.0。Windows uses the default subnet mask of 255.255.0.0.

      <UnicastIpAddresses>
         <IpAddress wcm:action="add" wcm:keyValue="1">160.168.1.0</IpAddress> 
      </UnicastIpAddresses>

IpAddressIpAddress