Network-Speed-Test

From DevRandom

Jump to: navigation, search

Testing network speed between two hosts

PING/ICMP

Simple ICMP. This tells you basic connectivity. If you see high latencies then that means something is not right between to the hosts or your network speed is low

host1 # ping -c <num packets> host2

In a local network with 100Mpbs switching pings should average from 0.1 to 0.3 millseconds

Even across the internet this should range between 30 - 50 milliseconds

If the geographic locations are connected via Ipsec or other secure tunnels then expect some more latency resulting from the encrypted tunnel


TCP

Netcat(nc) can help you here.

Create files of diff sizes 1G, 10G

dd if=/dev/zero of=/home/user/dd1g.img count=1048576 bs=1024

dd if=/dev/zero of=/home/user/dd1g.img count=10485760 bs=1024

Then use nc on host1 make nc listen on some port

nc -l -v 1000

Then on host2 time the nc command using Linux time command

time cat dd1g.img | nc -v host1 1000

time cat dd10g.img | nc -v host1 1000

This will give you idea on how fast one can transfer a file from one host to another.

You can use the same file for a FTP or a Secure FTP transfer. Keep in mind with each application there is some additional overhead. Especially SFTP has the encryption overhead.

Also it always good, if possible to test with multiple hosts on source and destination to rule out hardware or other such issues. One source and multiple destinations is also a good idea.

Views
Personal tools
About Me

Blog

Contact Me

Resume

Photos