Microsoft KB Archive/273027

= Gethostbyname May Return Wrong IP Address Because NetBIOS Caches Invalid IP Address =

PSS ID Number: 273027

Article Last Modified on 5/13/2003

-

The information in this article applies to:


 * Microsoft Windows NT Workstation 4.0
 * Microsoft Windows NT Workstation 4.0 SP6a
 * Microsoft Windows NT Server 4.0
 * Microsoft Windows NT Server 4.0 SP6a
 * Microsoft Windows NT Server, Enterprise Edition 4.0
 * Microsoft Windows NT Server, Enterprise Edition 4.0 SP6a

-



This article was previously published under Q273027



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When a client computer that is running Windows NT, Microsoft Windows 95, or Microsoft Windows 98 disconnects and then reconnects by using Remote Access Service (RAS) and receives a new IP address from the RAS server, the new IP address is not discovered by a Windows NT 4.0-based server for a variable time interval (usually a few minutes). This problem was initially noted in a Microsoft Message Queue (MSMQ) environment, in which the reconnected MSMQ clients were not discovered by the MSMQ server for a variable time interval.



CAUSE
This problem is caused by the NetBIOS Name Cache management (Netbt.sys) on the Windows NT 4.0-based server. The lifetime of an entry in the NetBIOS Name cache is determined by this registry value :

HKLM\System\CCS\Services\Netbt\Parametes\CacheTimeout

The default value is 600,000 milliseconds (10 minutes).

When a NetBIOS cache entry (such as name00) is used, its remaining lifetime is reinitialized for a new (CacheTimeout + 1 minute) interval. Therefore, if a ping name command is issued at a regular time interval that is shorter than (CacheTimeout +1 minute), the NetBIOS cache entry is revalidated each time; the new IP address is never discovered (by WINS resolution).



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows NT 4.0 service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:   Date        Time    Size     File name  Platform 10/16/2000 07:24p  124,656  Netbt.sys  Intel 10/16/2000 07:22p  224,912  Netbt.sys  Alpha



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

The MSMQ server periodically accesses all the MSMQ clients by using the gethostbyname function to discover the new IP address. You can reduce the discovery latency to two minutes by using the following settings:
 * HKLM\System\CCS\Services\Netbt\Parameters\CacheTimeout = 60000 (60 seconds), type REG_DWORD in milliseconds
 * HKLM\System\CCS\Services\Tcpip\ServiceProvider\MaxHostentCacheSize = 0 (mandatory, disables the DNS host cache), type REG_DWORD
 * HKLM\Software\Microsoft\MSMQ\Parameters\WaitTime = 30000 (30 seconds), type REG_DWORD, in milliseconds

Additional query words: waittime

Keywords: kbbug kbfix kbQFE KB273027

Technology: kbWinNT400search kbWinNTS400 kbWinNTS400search kbWinNTS400sp6 kbWinNTsearch kbWinNTSEnt400 kbWinNTSEnt400SP6a kbWinNTSEntSearch kbWinNTSsearch kbWinNTW400 kbWinNTW400search kbWinNTW400SP6a kbWinNTWsearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.