Quick and Easy Linux Internal Network Speedtest

I found a quick and easy way to setup a way to test network speed on my internal network using the linux command line tool netcat (or nc), I used this for node to node testing of my wireless network under a variety of conditions. It required no extra tools or software to be installed on my Ubuntu linux machines. It gives me transmit speeds I can understand and easily allows me to size the payload to the type of network I'm testing.

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.

UPDATE 04-17-2017:
I moved from a wireless AC connection (with ~78%signal) to a wired gigabit connection this week. My speeds improved about 10 times. Here is the latest output (1 GB of data) speed test between those two machines. Proves tou just can't beat copper for pure speed (not to mention reliability).

Connection to 192.168.0.188 2112 port [tcp/*] succeeded!
6250+0 records in
6250+0 records out
1000000000 bytes (1.0 GB, 954 MiB) copied, 8.58417 s, 116 MB/s

Hope this helps you out I thought it was really cool and adapted what I found at this link:
http://tuxtweaks.com/2014/11/linux-network-speed-test/

Popular posts from this blog

Comcast Xfinity HD uDTA Pace DC60Xu Unboxing and Setup Instructions

DIY - Make your own Permethrin Mosquito Yard Spray

Outdoor Temperature - Waiting for Update Honeywell WiFI Thermostat (RTH9580WF)