Put the first machine in listening mode (this example machine 192.168.0.188):
nc -lk 2112 >/dev/null
Put the second machine in transmit mode to send packets to first machine 192.168.0.188:
dd if=/dev/zero bs=16000 count=6250 | nc -v 192.168.0.188 2112
The first part of the command tells the machine to copy 100 MB of data from /dev/zero in 16 KB blocks. The part after the pipe tells it to send that to the first machine (192.168.0.188) over port 2112.
The output for this test on the second machine returns:
Connection to 192.168.0.188 2112 port [tcp/*] succeeded! 6250+0 records in 6250+0 records out 100000000 bytes (100 MB) copied, 8.38876 s, 11.9 MB/s
Essentially we sent 100MB of data from one machine to the other at a speed of 11.9 MB/second.
When done with the tests, end the listening mode on the first machine by pressing CTRL-C.
Hope this helps you out I thought it was really cool and addapted ewhat I found at this link: