不插网线,看不到IP的解决办法

在Windows中,如果不插网线,就看不到IP地址,即使这个块网卡已经绑定了固定IP,原因是操作系统开启了DHCP Media Sense功能,该功能的作用如下:

在一台使用 TCP/IP 的基于 Windows 的计算机上,您可以使用媒体感知功能来检测网络媒体是否处于链接状态。以太网适配器和集线器通常有一个指示连接状态的“链接”灯。该状态与 Windows 解释的链接状态相同。只要 Windows 检测到“故障”状态,它就会从该适配器中删除绑定的协议,直到检测到该适配器重新“正常工作”时为止。

摘录于网址: http://support2.microsoft.com/kb/239924

那么我们只要能关闭DHCP Media Sense功能即可,具体的关闭有两种。

第一种,修改注册表,方法如下:

1.启动注册表编辑器。
2.找到以下注册表子项:
  HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
3.将以下注册表项添加到
  Parameters
  子项:
  名称:DisableDHCPMediaSense
  数据类型:REG_DWORD(布尔型)
  值:1
  注意:此项控制媒体感知的行为。默认情况下,媒体感知事件触发 DHCP 客户端执行操作。例如,当发生连接事件时,客户端会尝试获取租约。当发生连接断开事件时,客户端可能会使接口和路由无效。如果您将该数值数据设置为 1,则 DHCP 客户端和非 DHCP 客户端会忽略媒体感知  事件。
4.重新启动计算机。
摘录于网址: http://support2.microsoft.com/kb/239924

第二种,使用netsh命令,方法如下:

1)Click on the Start button.
2)Type cmd in the search bar.
3)Right click on the cmd.exe and select Run as Administrator.
4)Run the following commands one by one:
   netsh interface ipv4 set global dhcpmediasense=disabled
   netsh interface ipv6 set global dhcpmediasense=disabled
5)After finishing the commands above, please run the following commands to check the results:
   netsh interface ipv4 show global
   netsh interface ipv6 show global
Please check if the entry “DHCP Media Sense” shows disabled or not. If it is disabled, it means the operations are successful.
However, please also note, the Media Sense depends on the NIC; if the NIC didn’t support the Media Sense, the configurations won’t take effect, either. Therefore, please also check the issue with the technical support of your NIC.

 

转载于:https://www.cnblogs.com/cnpirate/p/4045204.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值