Re: Bind Problem - with multihomed
- From: malachy.moses@xxxxxxxxx
- Date: Thu, 15 May 2008 15:15:35 -0700 (PDT)
On May 14, 2:22 am, Albert <Alb...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Is there a way to bind to a particular interface instead to a particular IP
address?
Many thanks.
You must add an entry to the routing table. A call to bind() will not
have any effect at all, because Windows is built under a weak end
system model (as opposed to strong). The routing table is solely
responsible for the selection of the interface that will be used, and
the selection is made based on the address of the destination.
See this excerpt under the "Multihoming" section from "Microsoft
Windows Server 2003 TCP/IP Implementation Details > Core Protocol
Stack Components and the TDI Interface" at
http://technet2.microsoft.com/WindowsServer/en/Library/823ca085-8b46-4870-a83e-8032637a87c81033.mspx
"Multihoming
"When a computer is configured with more than one IP address, it is
referred to as a multihomed system. ...
"When an IP datagram is sent from a multihomed host, it is passed to
the interface with the best apparent route to the destination.
Accordingly, the datagram may contain the source IP address of one
interface in the multihomed host, yet be placed on the media by a
different interface. The source MAC address on the frame is that of
the interface that actually transmitted the frame to the media, and
the source IP address is the one that the sending application sourced
it from, not necessarily one of the IP addresses assigned to the
sending interface.
"When a computer is multihomed with network interface cards attached
to disjoint networks (networks that are separate from and unaware of
each other, such as a private network using private addressing and the
Internet), routing problems may arise. It is often necessary to set up
static routes to the private networks in this situation. "
So, when sending from a multihomed host, the interface is selected
based on the best routing to the destination, as determined by the
routing table. Add a static entry into the routing table, based on
the destination address, if you want a particular interface to be
selected.
.
- References:
- Bind Problem - with multihomed
- From: Albert
- Re: Bind Problem - with multihomed
- From: Volodymyr M. Shcherbyna
- Re: Bind Problem - with multihomed
- From: Albert
- Bind Problem - with multihomed
- Prev by Date: Re: NTP/NetRemoteTOD And a zone of time
- Next by Date: Problem with file copy over a LAN
- Previous by thread: Re: Bind Problem - with multihomed
- Next by thread: Bluetooth Service Calls
- Index(es):
Relevant Pages
|