Home > Networking, Windows > How to disable link detection for Windows 7

How to disable link detection for Windows 7

Modern network cards and operating systems usually support media sense or link detection, where the system detects if a network cable is plugged in or not. Often this is beneficial, but there are drawbacks as well. As a developer I’m often working with server software on my laptop and it can be tricky to get it working without a network.

Fortunately the feature can be disabled. For Windows 7, open a command prompt as an administrator and run:


netsh interface ipv4 set global dhcpmediasense=disabled
netsh interface ipv6 set global dhcpmediasense=disabled

Reboot. The network will still be shown as disconnected by ipconfig, but it will be possible to ping the address (if a static or alternate IP address is used) and run server software that depends on it.

To restore media sense, run:


netsh interface ipv4 set global dhcpmediasense=enabled
netsh interface ipv6 set global dhcpmediasense=enabled

Again a reboot is required.

Advertisements
Categories: Networking, Windows
  1. 2015-03-12 at 11:27

    Do NOT work media sense is NOT disabled (only DHCP auto renew is disabled)

  2. 2015-03-13 at 18:51

    Well, it works well enough for me and Microsoft has the same answer. However, they do say that it depends on the network card and perhaps it does not disable media sense completely – however, I need the computer to keep the interface up and that works. Servers can bind to the address and without the fix they cannot.

  3. 2015-07-01 at 15:24

    We have been having problems with this too. Started about 12 month ago ( June 2014 ). It seems that netsh interface ipv4 set global dhcpmediasense=disabled corresponds to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\DisableDHCPMediaSense registry key, but that unless BOTH ipV4 AND ipV6 set to dhcpmediasense=disabled using netsh then link detection is enabled for IP V4. Whether it works correctly if you only have IPV4 I have not tested.
    I don’t know what the registry key corresponding to netsh interface ipv6 set global dhcpmediasense=disabled is – it does not seem to be in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: