03-23-2011 03:09 PM
I have two NIC cards (Broadcom & Realtek) installed in my system (Windows XP x64) running LV 8.6 Dev Suite. Whenever I send/receive TCP or UDP traffic, labview always uses the broadcom card. Is there a way to work around this issue so I specify which NIC to use? This is a big deal for me because I'm required to utilize multiple NIC cards for my works. Thanks
03-23-2011 03:23 PM
One way you could force the correct NIC would be to add a persitent route on your PC. This woudl require that you know specifc address ranges that would need to go to a specific route. Anything not specified in the routes would still go to the default route. If you use the FTP Vis you can still run into the problem since the FTP data stream seems to always go to the default NIC.
03-23-2011 03:32 PM
Is there a way to do this in Labview directly so that I don't have to mess around with the routing table?
03-23-2011 04:02 PM
Not that I have found. That doesn't mean its impossible though. I have dug pretty deep though in the newtroking side of things though and haven't come across anything to specify which NIC to use.
03-23-2011 05:09 PM - edited 03-23-2011 05:12 PM
I know this can be done through C/C++. We have such software and saw it's action on Wireshark. So I know it's doable, maybe there is a setting that can be done through the dotNET framework? I'm not too good with using dotNET in labview, maybe someone who has done it ...could you please tell me? My biggest one is whenever I broadcast to 255.255.255.255, it always sends out traffics through the Broadcom card. Modifying the routing table doesn't do much for multicasting so this has to be done using other method such as telling it which card to send out traffics.
03-23-2011 05:36 PM
I have some wrappers for Winsock but these operate on an established connection. You would have to do the entire connection via dotNet or Winsock or whatever. You would not be able to operate on the LabVIEW connection directly since it will already be bound to an interface.
03-24-2011 03:00 AM
Since at least LaVIEW 8.5 there is an extra input "net address" on the TCP Create Listener and UDP Open that allows you to define the network address to bind the underlaying socket to. You shouldn't need that for TCP Open Connection since at connection establishment the according interface is selected automatically based on the routing requirements for the specified remote address.