Windows – Modifying Windows cable-unplugged behavior

networkingnicwindows

Is there a way to make windows stop dropping the interface every time a cable comes unplugged? I don't care about those little balloons that pop up when the cable state changes, as annoying as those are. The specific problem is that when a cable is out, while you can still see the network adapter name/properties in the 'Network Connections', the OS seemingly unbinds the IP address from the port, as evidenced by the output of ipconfig.

This wreaks havoc on certain network utilities, such that once the cable is back in place, I then have to go re-tune their settings to get things back to normal. Ideally, the IP address would not evaporate, Windows would just list the interface as 'no link' or something.

This gets especially ugly when it happens on a machine with two nics; for example I only want my TFTP server on one network, but if Windows happens to have taken the IP address away when my TFTP server is started (cable temporarily out), the TFTP server might acquire the IP address of the nic that is up.

Best Answer

You want to disable "Media Sensing" on the interface in question.

http://support.microsoft.com/kb/239924/

The summary: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

Add: Name: DisableDHCPMediaSense Data type: REG_DWORD (Boolean) Value: 1