在对 PC 上的连接问题进行故障排除时,我注意到Get-NetIPInterface在 PowerShell 上发出命令时每个网络接口都有重复。
请注意每个接口都有一个副本。就连 都是ifIndex一样的。
但我可以得出结论,这些不仅仅是同一接口的“影子”,因为其中一个已启用vEthernet (Ethernet 2)DHCP ,另一个已禁用。
PS C:\Windows\system32> Get-NetIPInterface
ifIndex InterfaceAlias AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
37 vEthernet (WSL) IPv6 1500 5000 Enabled Connected ActiveStore
21 Ethernet 2 IPv6 1500 6 Enabled Connected ActiveStore
31 vEthernet (Ethernet 2) IPv6 1500 15 Enabled Connected ActiveStore
1 Loopback Pseudo-Interface 1 IPv6 4294967295 75 Disabled Connected ActiveStore
37 vEthernet (WSL) …Run Code Online (Sandbox Code Playgroud)