05-26-2011 01:30 AM
Hi,
I like to send data on a computer who have 2 net. cards (local + "intranet") with Ftp toolkit.
When i use filezilla with the 2 cards active --> no problem.
When i desactive the "internet" card --> no problem
When the 2 cards are active ---> login ok but the error after with the message : 500 Illegal PORT range rejected.
I discover the problem with the sniffer wireshark --> LV choose the wrong card.
How can lock the right card / interface ?
Thanks a lot.
PS : i locked about a solution on the forum : the problem is here but not the answer...
05-26-2011 05:58 AM
You cannot select the NIC to be used from within LabVIEW when establishing a TCP connection.
The best route for a TCP connection is decided by the OS.
See this post: Communicating through two ethernet ports on the same computer
By adding a route, the OS will use the specified interface (IF) to establish the connection. The interface numbers and their respective device names/MAC addresses are shown as part of the command 'route print'.
Ask your IT department for help...
05-26-2011 06:19 AM
When do you get the error? When trying to transmit a file?
Since you can log in to the FTP server the command connection seems to work. The default FTP mode in the toolkit is active mode. It might help to try passive mode so both connections (command and data) are outbound (from the client side of view).
05-26-2011 06:57 AM
yes, i get error only when i transmit the file.
Both Passive / active generate errors.
Cleaning / Adding route table should be the solution.--> Tks Phil !
I 'll try this solution.
Thanks a lot.
05-26-2011 10:11 AM
The FTP protocol actually uses two connections. One connection is the control channel and the other is the data channel. When the FTP VIs open the data channel they use whatever NIC the OS chooses as the preferred route. As a result you can establish a FTP connection on the seconday NIC and the data channel will attempt to be established on the primary. Depending on the network infrastructure this generally means that the data channel does not get established.
05-27-2011 01:06 AM
Hi,
I create a route for the destination adress locking the interface ...
But i think it comes from the negociate mode, should be Passive. (i did mistake ).
Here the Ni Base : http://digital.ni.com/public.nsf/allkb/AE69890A3DB5329386256C4F006F7A5E?OpenDocument
Thanks a lot for your help.
03-08-2012 01:52 PM - edited 03-08-2012 01:54 PM
I am getting this very problem. Windows is opening the connection just find then requests that my NI target send the data on a port from the second NIC. Of course this doesn't work. Short term I have disabled NIC2 and cleared the ARP cache.
I am going to try the above KB.
Thanks
03-08-2012 01:55 PM
The only way would be to manually add a route to your PC to direct traffic from specific addresses to a specific NIC. However this only works if you know the complete range of addresses you will be dealing with and is generally limited to specific subnets.
03-08-2012 02:11 PM
I know the exact range of IP addresses and the subnet as I set them.
I have a HMI with 2 NICs. NIC1 I have setup to be my local network with IP addresses ranging from 10.100.0.1 to 10.100.0.10 with a subnet of 255.255.255.240. In fact all FTP traffic will be between 10.100.0.1 (HMI) to and from 10.100.0.2 (cRIO) and between 10.100.0.1 to and from 10.100.0.3 (cRIO).
Usually NIC2 will be a private network or DHCP network in the client's facility. I won't use that NIC at all through LabVIEW.
03-08-2012 02:18 PM
Shot in the dark...
Have you tried to change the order of the NICs in the Windows config so that the NIC you want to use is listed first?
Done shooting in the dark.
Ben