[CentOS] netcat issue: no UDP transmission

Boris Epstein borepstein at gmail.com
Fri Sep 28 14:13:22 EDT 2012


Hello listamtes,

Here's is a curious issue: netcat (nc) seems to not do UDP for me, even
though TCP works flawlessly. Not even on the local host.

Here's the "server session" I am running:

cat test.dd | nc -l -u -n -k -v 2456

(test.dd is just a large file with random data)

Here's the client:

nc -v -u 127.0.0.1 2456 | dd of=/dev/null
^C0+0 records in
0+0 records out
0 bytes (0 B) copied, 219.944 s, 0.0 kB/s

Here's what netstat reports:

netstat -a -n | grep 2456
udp        0      0 0.0.0.0:2456                0.0.0.0:*

udp        0      0 127.0.0.1:52394             127.0.0.1:2456
 ESTABLISHED
unix  3      [ ]         STREAM     CONNECTED     12456

So the connection is established - but no data appears to be getting
transferred.

This behaviour seems to be the same on CentOS 6 and LinuxMint. Any idea
what may be going on?

Thanks.

Boris.


More information about the CentOS mailing list