From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-22-2007 02:45 PM
01-22-2007 03:05 PM
I believe that the network adapter is chosen based on the IP address you give the function.
I'm not sure what happens if you give it a machine name instead of an address.
01-22-2007 04:39 PM
01-23-2007 01:33 AM
I know that. Read the reply again - I believe the adapter is selected based on the address that you do give the function (normally different adapters have different settings, like the subnet mask etc., and this should allow the OS to select a specific card). Note - the OS does this, not LV.
I believe that if the address is not specific to an adapter, the OS will take the adapter with the highest priority. I think there is a way to play with the adapter priorities (at least in Windows) and if you search here, you might even be able to find VIs which will do this.
01-23-2007 04:01 AM
@pwrdesoto wrote:
Only the TCP-Listen allows the user to choose which network adapter to listen. The TCP-Open is require to open an connection to write to and it only has an input on where to connect to but not which network adapter to connect from.
tst is completely right. If you have two network cards they usually have different subnets that should not overlap. If the desired target adress belongs to one of those subnets the TCP/IP routing will automatically select the correct network card to bind the connection to. If you use an address outside of those subnets the default gateway will be selected.
And according to a Microsoft knowledgebase article it is a very bad idea to have more than one default gateway defined in the entire setup. If you do that the default gateway of the default (primary adapter) should be selected automatically but the routing can get really weird sometimes.
If this is not enough for your routing requirements you will have to manipulate the routing tables manually (and no it is no pretty business to do so). Look at http://support.microsoft.com/kb/140859 for a starting point about routing table manipulations under Windows NT (still applicable to XP) based systems.
Rolf Kalbermatter
01-23-2007 05:17 PM