[英]Get-NetIPAddress returns values not found in ipconfig
We are doing a configuration inventory of servers in our system, and found something odd.我们正在对系统中的服务器进行配置清单,并发现了一些奇怪的东西。 Two of our servers share this anomaly: When we run PowerShell Get-NetIPAddress as follows:
我们的两台服务器共享此异常:当我们运行 PowerShell Get-NetIPAddress 时,如下所示:
Get-NetIPAddress -addressstate Preferred -addressfamily ipv4
Three IP addresses are returned.返回三个 IP 地址。 They are 192.xxx, 127.0.0.1, and 169.xxx The 169 address, in both cases, reportedly are on Interface Alias Local Area Connectiuon 11 * The IP addresses are different from one another, but both in the 169.254.0.0/16 network (16-bit mask).
它们是 192.xxx、127.0.0.1 和 169.xxx 据报道,在这两种情况下,169 地址都在接口别名本地连接11上 * IP 地址彼此不同,但都在 169.254.0.0/16网络(16 位掩码)。
However, "ipconfig /all" for these two servers does not show the 169 address at all.但是,这两个服务器的“ipconfig /all”根本不显示 169 地址。
Control Panel / Network and Internet / Network Connections also does not show anythong other than the interface for 192.168.xx控制面板/网络和 Internet/网络连接除了 192.168.xx 的接口外也没有显示任何内容
Where might I look to determine where Get-NetIPAddress is getting this information?我在哪里可以确定 Get-NetIPAddress 从何处获取此信息?
PS C:\Windows\system32> Get-NetIPAddress -addressstate Preferred -addressfamily ipv4
IPAddress : 192.168.10.xxx
InterfaceIndex : 13
InterfaceAlias : Ethernet 2
AddressFamily : IPv4
Type : Unicast
PrefixLength : 24
PrefixOrigin : Manual
SuffixOrigin : Manual
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore
**IPAddress : 169.254.xxx.xxx
InterfaceIndex : 14
InterfaceAlias : Local Area Connection* 11
AddressFamily : IPv4
Type : Unicast
PrefixLength : 16
PrefixOrigin : WellKnown
SuffixOrigin : Link
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore**
IPAddress : 127.0.0.1
InterfaceIndex : 1
InterfaceAlias : Loopback Pseudo-Interface 1
AddressFamily : IPv4
Type : Unicast
PrefixLength : 8
PrefixOrigin : WellKnown
SuffixOrigin : WellKnown
AddressState : Preferred
ValidLifetime : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource : False
PolicyStore : ActiveStore
PS C:\Windows\system32>
PS C:\Windows\system32> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : GotDomVM1
Primary Dns Suffix . . . . . . . : gotnet.net
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : gotnet.net
Tunnel adapter Local Area Connection* 11:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adapter
Physical Address. . . . . . . . . : 02-87-4F-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Ethernet 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
Physical Address. . . . . . . . . : 00-15-5D-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::b074:d74d:6320:dab0%13(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.10.xxx(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.xxx
DHCPv6 IAID . . . . . . . . . . . : 251663709
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-25-F9-6D-6F-00-15-xx-xx-xx-xx
DNS Servers . . . . . . . . . . . : ::1
192.168.10.x
192.168.10.y
127.0.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.{6D49450E-C01F-4FF3-9CF8-033D67921AA6}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-xx-xx-xx-xx
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{2B8A29E1-13B1-4311-A1F7-6CDBA190EC28}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
PS C:\Windows\system32>
Thanks, Dennis谢谢,丹尼斯
Well as to why it has a 169 address at all:至于为什么它有一个 169 地址:
What is a Microsoft Failover Cluster Virtual Adapter anyway? 什么是 Microsoft 故障转移群集虚拟适配器?
Like other adapters, the Microsoft Failover Cluster Virtual Adapter has a MAC address and both IPv4 and IPv6 addresses assigned to it.
与其他适配器一样,Microsoft 故障转移群集虚拟适配器具有 MAC 地址以及分配给它的 IPv4 和 IPv6 地址。 The IPv4 address is an Automatic Private Internet Protocol Addressing (APIPA) address
IPv4 地址是自动私有 Internet 协议寻址 (APIPA) 地址
But why it doesn't show up using ipconfig /all
?但是为什么它没有显示使用
ipconfig /all
? Probably because it's disconnected.可能是因为断线了。 It still has an IP address assigned, so
Get-NetIPAddress
sees that, but ipconfig doesn't really care about inactive IPs.它仍然分配了一个 IP 地址,因此
Get-NetIPAddress
看到了这一点,但 ipconfig 并不真正关心非活动 IP。 the linked MS blog specifically shows it working normally with ipconfig:链接的 MS 博客特别显示它与 ipconfig 一起正常工作:
it is plainly visible when listing the network configuration of a Cluster node using the ipconfig /all command line.
当使用 ipconfig /all 命令行列出集群节点的网络配置时,它是显而易见的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.