Applications Calling GetHostByName() for the Local Host Name May See the List of IP Addresses In an Order that Does Not Match the Binding Order. (164023)
The information in this article applies to:
- Microsoft Windows NT Server 4.0 Terminal Server Edition
- Microsoft Windows NT Workstation 4.0
- Microsoft Windows NT Server 4.0
This article was previously published under Q164023 SYMPTOMS
When a Windows Sockets application calls gethostbyname() to resolve the
local hostname to a list of IP addresses on a multihomed computer, the list
may be returned in an order that does not match the binding order displayed
in Control Panel, or the order that IP addresses were assigned to network
interface cards (NICs).
CAUSE
Changes made to support Windows Sockets 2 produced this behavior.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Windows NT 4.0 or Windows NT Server 4.0, Terminal Server Edition. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
152734 How to Obtain the Latest Windows NT 4.0 Service Pack
When the new fix is applied, and gethostbyname() is used to resolve the
local hostname on a multihomed computer, the list of IP addresses will be
returned in the following order:
- The first address from each NIC in the system. You can see the order in
which they will appear by clicking the Bindings tab in the Control
Panel Network tool.
- The remainder of the IP addresses from each NIC. You can see the order
in which they will appear by clicking the Bindings tab in the Control
Panel Network tool.
- Additional addresses, such as those dynmically assumed by a cluster
server.
So if you had a computer similar to the following:
Card A - Addresses 1,2,3
Card B - Addresses 4,5,6
The order returned would be 1,4,2,3,5,6. That is, the first address from
each NIC (1,4) and then the remainder from each NIC (2,3,5,6).
STATUSMicrosoft has confirmed that this is a problem in Windows NT 4.0 and Windows NT Server 4.0, Terminal Server Edition. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.
Modification Type: | Minor | Last Reviewed: | 9/23/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbnetwork KB164023 |
---|
|