How to disable the "Media Sensing" feature for TCP/IP in Windows (239924)



The information in this article applies to:

  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows Server 2003, Datacenter Edition
  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows XP Professional 64-Bit Edition (Itanium)
  • Microsoft Windows XP Service Pack 1, when used with:
    • Microsoft Windows XP Professional 64-Bit Edition (Itanium)
  • Microsoft Windows XP Professional 64-Bit Edition (Itanium) 2003
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Home Edition SP1
  • Microsoft Windows XP Home Edition SP1a
  • Microsoft Windows XP Home Edition SP2
  • Microsoft Windows XP Media Center Edition
  • Microsoft Windows XP Media Center Edition 2004
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Professional SP1
  • Microsoft Windows XP Professional SP1a
  • Microsoft Windows XP Professional SP2
  • Microsoft Windows XP Tablet PC Edition
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Professional
  • Microsoft Systems Management Server 2003
  • Microsoft Systems Management Server 2.0

This article was previously published under Q239924
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

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 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 Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To prevent your network adapter from detecting the link state, follow these steps.

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 In Windows Server 2003, the function which controls Media Sense was added to the cluster system. Even if the DisableDHCPMediaSense is not set or 0 (False) is set in the registry, the cluster system is changing Media Sense into disabled. Then, because of the system which wants to make Media Sense enable, the DisableClusSvcMediaSense registry value was introduced in the SP1. You can set ON/OFF of the control function of the cluster system by using the following registry subkey:

- Key: HKEY_LOCAL_MACHINE\Cluster\Parameters
- Value Name: DisableClusSvcMediaSense
- Data Type: REG_DWORD -Boolean
- Data Range: 0, 1 (False, True) - Default: 0 (False).

The DisableClusSvcMediaSense is default 0 (False). Therefore, the control function is ON and Media Sense is disabled. You can set the DisableClusSvcMediaSense to 1 (True). Then, the control function is OFF. After that, you can use the DisableDHCPMediaSense registry to set enable/disable of Media Sense. This is similar to the cluster environment of the Windows 2000 Server.

Note If you disable the "Media Sensing" feature, you may experience problems. For example, if you have a computer that has two network adapters and you disable the "Media Sensing" feature, if one network adapter does not work, it is unbound. Additionally, if a default gateway is configured, associated routes are removed so that all traffic goes through the other network adapter.

In another example, if the "Media Sensing" feature is disabled when you disconnect the network cable from the computer, the "Local Area Connection" icon in the notification area displays a "Network cable is unplugged" status message. Additionally, you receive a "Media State .....: Cable Disconnected" message when you run the ipconfig command. However, in this case, the network adapter is bound to TCP/IP. To verify that the network adapter is bound to TCP/IP, view the route table. To view the route table, use the route print command. The route table shows the IP address of the network adapter. You can also use the ping command to ping the IP address of your network adaptor to verify that the network adapter is bound to TCP/IP.

Modification Type:MajorLast Reviewed:4/13/2006
Keywords:kbhowto kbnetwork KB239924