03-17-2010 12:52 PM
Greetings,
Our test PC has three NICs, each configured on a different subnet. Is there a way to scan [only] a specific subnet when using "RT Get Target Information.vi"?
Thanks/Cheers!
03-18-2010 04:43 PM
Usually LabVIEW just uses the primary NIC. Is that not the behavior that you are seeing? Is it actually searching on all three cards?
03-20-2010 03:01 AM
Hi Justin,
> Usually LabVIEW just uses the primary NIC.
This seems to be exactly what's happening.
I just wanted to be able to query a specific subnet, because, as is, the Get Target function is returning some information about RT units it sees on the company LAN - information I'm not interested in, especially if the function puts any traffic on the LAN in order to gather the unwanted information.
I'm not sure what the 'primary' NIC is, but if it's the one used for DNS queries, we certainly don't want to change that OS setting, else, many basic web-things would stop working...
Thanks/Cheers!
03-22-2010 04:42 PM
From the link that Justin posted, NI software uses the system default network card, which is determined in the advanced network settings as shown in the KnowledgeBase article. For utilities such as MAX, or these RT Utility VIs, the address is only specified with the IP, so as far as I know, there is no way to specify a different network card other than the default.
There are some protocols that are able to work around this, such as TCP with Multiple Network Cards, but not every method of communication has something like this. This may be something that would be a good product suggestion for a future capability of the RT Utility VIs.
Regards,
Stephen S.
03-30-2010 11:00 AM
The RT utility VIs that do discovery using broadcast packets are currently designed to discover out of all network interfaces on the system. On Windows XP and previous, they worked as designed. They actually cannot just broadcast out of a specific network interface because Windows XP's network stack doesn't properly bind UDP broadcast traffic to a specific network interface (it always goes through all interfaces).
On Windows Vista and later, due to changes in how the Windows networking stack works where outgoing UDP broadcast traffic is filtered properly, the RT Utility VIs were relying on the broken broadcast behavior of XP and previous and thus now do not properly discover devices off multiple network interfaces on the host PC (internal tracking CARs 175183 and 124544). They will only discover out of a single interface based on whatever order exists in the system's routing table. This is expected to be fixed in an upcoming version of LabVIEW to restore the same behavior with multiple network interfaces as in XP. The ability to target only a specific network interface could be added as an option in the future (but again, would only likely work on Vista and later).
Note that MAX and LabVIEW's built-in target discovery in the project view have had fixes for proper discovery of devices on Vista and later when using multiple network interfaces for quite some time now. The above failure is only present in the RT Utility VIs.
Hope this helps,
Eric
04-03-2010 01:37 AM
Thanks Eric!
It's nice to understand how these things work.