TCP Connections to and from Multihomed Computers (Windows Embedded CE 6.0)

1/6/2010

When TCP connections are made to a multihomed host, the behavior depends upon the namespace.

In the WINS namespace, the application is responsible for randomizing or load balancing between the provided addresses. The WINS server always returns the list of addresses in the same order, and the WINS client picks one of them for each connection.

In the DNS namespace, the DNS server is usually configured to provide the addresses in round-robin order. The DNR does not attempt to further randomize the addresses. In some situations, it is desirable to connect to a specific interface on a multihomed computer. The best way to accomplish this is to provide the interface with its own DNS entry. For example, a computer named raincity could have one DNS entry listing both IP addresses (actually two separate records in the DNS with the same name), and then records in the DNS for raincity1 and raincity2, each associated with just one of the IP addresses assigned to the computer.

When TCP connections are made from a multihomed host, things get a bit more complicated. If the connection is a WinSock connection using the DNS namespace, once the target IP address for the connection is known, TCP attempts to connect from the best source IP address available. Again the route table is used to make this determination, and if there is an interface in the local computer that is on the same subnet as the target IP address, its IP address is used as the source in the connection request. If there is no best source IP address to use, then the system chooses one randomly.

See Also

Concepts

Transmission Control Protocol (TCP)