Home

 CapeSoft Cached Page


Q239924 How to Disable Media Sense for TCP/IP in Windows

Original Location: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q239924  
 


How to Disable Media Sense for TCP/IP in Windows (Q239924)


The information in this article applies to:


SUMMARY

Windows contains the "Media Sensing" feature. You may use this feature on a Windows-based computer using Transmission Control Protocol/Internet Protocol (TCP/IP) to detect whether or not your network media is in a "link state". A "link state" is defined as the physical media connecting or inserting itself on the network. For example, assuming a 10bt or 100bt physical media, Ethernet network adapters and hubs typically have a "link" light to indicate the current connection status. This is the same condition in which Windows can detect a link. Whenever Windows detects a "down" state on the media, it removes the bound protocols from that adapter until it is detected as "up" again. There may be situations where you may not want your network adapter to detect this state, and you can configure this by editing the registry.

NOTE : 10b2 or coaxial (RG-58) Ethernet cable is not a connection-based media. Because of this, Windows does not attempt to detect a "connect" state if this type of cabling is used.

MORE INFORMATION

WARNING : Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

To prevent your network adapter from detecting the link state:

NOTE : NetBEUI and IPX do not recognize Media Sense.

  1. Use Registry Editor (Regedt32.exe) to view the following key in the registry:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

    Add the following registry value:

    Value Name: DisableDHCPMediaSense
    Data Type: REG_DWORD -Boolean
    Value Data Range: 0, 1 (False, True) Default: 0 (False)

    Description: This parameter controls DHCP Media Sense behavior. If you set this value data to 1, DHCP, and even non-DHCP, clients ignore Media Sense events from the interface. By default, Media Sense events trigger the DHCP client to take an action, such as attempting to obtain a lease (when a connect event occurs), or invalidating the interface and routes (when a disconnect event occurs).

     

  2. Restart your computer.

     

NOTE : There are some side effects of disabling the "Media Sensing" feature. For example, if you have a machine with two network adapters, and you have the "Media Sensing" feature enabled, if one network adapter does not work, it is unbound, and associated routes are removed so that all traffic goes through the other network adapter (assuming a default gateway is there). Also, if you are a roaming (portable) user, the "Media Sensing" feature is what provides the ability to connect to any network and have everything work, without restarting, release and renewing, and so on. After disabling Media Sense and restarting, Windows still shows the "Network Disconnected" icon on the TaskBar and the 'ipconfig' command still shows a "Media State .....: Cable Disconnected" message when the cable is disconnected. However, the Network Interface is bound to TCP/IP and you can verify this by looking at the route table --you can use the "route print" command-- which shows the interface IP address (you are also able to ping the IP address assigned to the NIC).
 

 


Published Aug 31 1999 4:10PM Issue Type kbhowto
Last Modifed Feb 19 2002 5:56PM Additional Query Words  
Keywords kbnetwork kbtool