I'm working on sending large data files between two Linux
computers via a 10 Gigabit Ethernet cable and netcat with a UDP
transfer, but seem to be having issues.
After running several tests, I've come to the conclusion that netcat is the issue. I've tested the UDP
transfer using [UDT][1
], [Tsunami-UDP]
2, and a Python UDT
transfer as well, and all of which have not had any packet loss issues.
On the server side, we've been doing:
cat "bigfile.txt" | pv | nc -u IP PORT
then on the client side, we've been doing:
nc -u -l PORT > "outputFile.txt"
A few things that we've noticed:
- On one of the computers, regardless of whether it's the client or server, it just "hangs". That is to say, even once the transfer is complete,
Linux
doesn't kill the process and move to the next line in the terminal. - If we run pipe view on the receiving side as well, the incoming data rate is significantly lower than what the sending side thinks it's sending.
- Running
Wireshark
doesn't show any packet loss. - Running the system performance monitor in
Linux
shows that the incoming data rate (for the receiving side) is the same as the outgoing data rate from the sending side. This is in contrast to what pipe view thinks (see #2)
We're not sure where the issue is with netcat, and if there is a way around it. Any help/insights would be greatly appreciated.
Also, for what it's worth, using netcat with a TCP
transfer works fine. And, I do understand that UDP
isn't known for reliability, and that packet loss should be expected, but it's the protocol we must use.
Thanks