Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

How to measure your Network performance or Bandwidth

Date: 2007-09-25 00:00:00 -0400

Introduction

If you are planning to create a VPN or Install Asterisk for VoIP you will need to know the performance of the Network, specially if it is the Internet and not your LAN, but there are also times when it is important to measure your LAN performance, whenever you may need to accomplish this task, you will find iperf as a good tool.

Installing iperf

iperf can be installed on Debian or Ubuntu

apt-get install iperf

and on CentOS

yum install iperf

How it works

iperf works in a client/server configuration, so you will need one PC on each side of the network to measure, one will be listening (Server) and the other (client) will connect to the server.

iperf will then transmit data between the two PCs, for an amount of time (10 seconds is the default) and let you know the amount of data transmited, and therefore the speed of your network.

You can use either tcp or udp to perform the tests.

The command

The most simple way to use it is On the server side

iperf -s

On the client side

iperf -c [server_ip]

the -s options implies that is will run as server and will listen on port 5000, the -c implies it will run as client and will connect to the given IP on the port 5000.

You can specify a different port in case you have 5000 blocked, and you can also choose a lot of other parameters, such as:

-w to change the size of the packages sent.

give iperf man page a read.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.