zoukankan      html  css  js  c++  java
  • 不插网线,看不到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_MACHINESystemCurrentControlSetServicesTcpipParameters
    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.
  • 相关阅读:
    [HNOI2010]CITY 城市建设

    [HNOI2011]数学作业
    [NOI2012]美食节
    [HEOI2014]大工程
    [HEOI2013]ALO(待更)
    [HEOI2016/TJOI2016]序列
    贪食蛇(未完待续)
    [HEOI2016/TJOI2016]字符串
    bzoj 2437[Noi2011]兔兔与蛋蛋 黑白染色二分图+博弈+匈牙利新姿势
  • 原文地址:https://www.cnblogs.com/cnpirate/p/4045204.html
Copyright © 2011-2022 走看看