Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to configure the OS (Windows XP or Linux) or the NIC itself so that the NIC/interface remains enabled when the ethernet cable is unplugged?

Often, especially when I'm tinkering, it's really annoying to have all my open TCP connections drop out just because I have unplugged the cable.

share|improve this question
    
At least in XP, unplugging your NIC should set its state to "disconnected" not "disabled". –  Mark Allen Oct 13 '12 at 1:47
    
XP is horribly broken in this regard. This is one of Microsoft's most foolish design decisions. One of the primary design goals of the TCP protocol is that temporary interruptions in network connectivity don't break connections. (You shouldn't have to do anything in Linux. The connections shouldn't break.) –  David Schwartz Oct 13 '12 at 1:55
    
Whatever its state, I would like it to have no effect on open TCP connections that are not currently sending data. –  Adrian Pronk Oct 13 '12 at 1:55

1 Answer 1

I can think of two ways which may solve your issue.

One way is to make use of a small / cheap network switch or hub, which sits between your computer and your "upstream" router or switch. That way, if you need to disconnect or unpower that switch, the computer won't (can't) notice the link state change, because it's connected to its own hub. This does have the disadvantage of being clumsy, requiring a separate device, its power supply, and at least one extra wire.

Another way which might work, is to configure the windows TCP/IP stack to ignore the ethernet media sense. You can do this by changing a registry setting ... under the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters , change or set the DisableDHCPMediaSense value to 1 (REG_DWORD). See How to disable the Media Sensing feature for TCP/IP in Windows . This is supposed to prevent the TCP/IP stack from unbinding from the adapter when it goes to disconnected state, which ideally will keep existing TCP connections from being dropped due to a transient disconnect.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.