LPV*_*OID 5 networking powershell dhcp windows-10
在对 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) IPv4 1500 5000 Disabled Connected ActiveStore
21 Ethernet 2 IPv4 1500 6 Enabled Connected ActiveStore
31 vEthernet (Ethernet 2) IPv4 1500 15 Disabled Connected ActiveStore
1 Loopback Pseudo-Interface 1 IPv4 4294967295 75 Disabled Connected ActiveStore
Run Code Online (Sandbox Code Playgroud)
网络连接 ( ncpa.cpl) 窗口不显示重复项。

为什么会出现这些重复的网络接口?如何修复它?
这不是链路层接口的列表(即),而是IP 接口Get-NetAdapter或网络堆栈的列表。从第三列(“AddressFamily”)可以看出,一个条目代表该接口的IPv4配置,另一个条目代表IPv6配置。(这两个协议基本上是独立的网络堆栈,仅共享相同的链路层\xe2\x80\x93,但每个协议都有自己的地址、路由、网关、静态/DHCP设置等)
| 归档时间: |
|
| 查看次数: |
1137 次 |
| 最近记录: |