I am developing an application that uses FTP (Internet Toolkit) to download files to our hardware. The client IP address is fixed at 10.0.0.240 and the server IP address is fixed at 10.0.0.81. When we run this on a laptop which also has wireless enabled, it sends an IP of 126.96.36.199 in the PORT command, which is on the wireless subnet, not the client/server subnet, and it therefore fails. When we disable the wireless interface, it correctly sends 10.0.0.241. Why would the FTP client use that IP to try to talk to a server on a different subnet? Is there a configuration setting I don't know about in either LabView or the laptop network config? Thanks -- Ray
Have you looked in the FTP Vi's diagram? At some point these VIs determine the local IP adres to send with the PORT command. The local IP adres of a system is by default the default adapter in that system. If you want a different adres to be sent you will need to modify the FTP VIs to send that adres (or change your computer configuartion in such a way that your desired interface gets the default device). Bascially you would need to modify the FTP Open Data Connection.vi to take a "local address" parameter and wire that to the "address" input of the FTP (PORT).vi. And then add another "local address" parameter to all the other VIs above the FTP Open Data Connection.vi in your hierarchy too.
The reason for this is twofold. The FTP VIs date from a time when one single network adapter was the norm rather than the exception so there was no need to specify explicitedly a local address when opening a data connection. And determining the local address to use automatically in a multi-adapter setup is anything but trivial, as it can depend on the actual routing configuration of your network. The low level access into the network driver to do this reliably is simply non-existent in LabVIEW (and even if LabVIEW would support it beyond the ability of most non-network admins).
This is one of the reasons the Internet Toolkit (and the FTP VIs) are currently discontinued and only provided as an unsupported VI package anymore.
Actually I just checked in the FTP VIs that are included in LabVIEW 2012. They seem to do something special to determine the actual local adress of the connection to open. Are you using that version or the old (and discontinued) Internet Toolkit?
Thanks for your kind and informative response! I drilled down into the code like you suggested and find the FTP[Port] VI. It's 'address' input is unwired so, like you say, it will use the default interface. I will try wiring my client address to it. I'm stuck with Labview 2009 because my customer won't spring for updates. Thanks again -- Ray