LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FTP with 2 network cards problems.

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...

 

0 Kudos
Message 1 of 14
(6,378 Views)

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...

 

 

 

 

 

0 Kudos
Message 2 of 14
(6,324 Views)

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).

 

0 Kudos
Message 3 of 14
(6,322 Views)

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.

 

 

 

 

 

 

0 Kudos
Message 4 of 14
(6,316 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 14
(6,304 Views)

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 Smiley Sad).

 

Here the Ni Base : http://digital.ni.com/public.nsf/allkb/AE69890A3DB5329386256C4F006F7A5E?OpenDocument

 

Thanks a lot for your help.

 

 

0 Kudos
Message 6 of 14
(6,290 Views)

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

 

 

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 7 of 14
(6,202 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 14
(6,199 Views)

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.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 9 of 14
(6,194 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 14
(6,190 Views)