Psychz - vaibhavs
Votes: 0Posted On: May 29, 2020 07:33:07
iPerf is a command line too that can be used to collect latency and bandwidth statistics for both TCP and UDP traffic. The tool utilizes a a client server model, so that the data can be analyzed from both ends. iPerf is capable of collecting information on – throughput, jitter, and packet loss. This is basically this tool can measure the overall link quality but does not measure application performance.
Note: You need to make sure that this tool is installed on both the devices (Client & Server) before you perform the link quality test. Also, you need to ensure both the machine have same version of iPerf
Step 1: Download the iperf utility from https://iperf.fr/iperf-download.php#windows
Step 2: Now, open the command prompt using "windows + r" and type "cmd" and go to the folder where you have copied the downloaded iperf.exe file
Step 3: Once you are in the folder, run following command
F:\Personal Folder\iperf-3.1.3-win64>iperf3.exe
Output
F:\Personal Folder\iperf-3.1.3-win64>iperf3.exe
iperf3: parameter error - must either be a client (-c) or server (-s)
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Server or Client:
-p, --port # server port to listen on/connect to
-f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes
-i, --interval # seconds between periodic bandwidth reports
-F, --file name xmit/recv the specified file
-B, --bind bind to a specific interface
-V, --verbose more detailed output
-J, --json output in JSON format
--logfile f send output to a log file
-d, --debug emit debugging output
-v, --version show version information and quit
-h, --help show this message and quit
Server specific:
-s, --server run in server mode
-D, --daemon run the server as a daemon
-I, --pidfile file write PID file
-1, --one-off handle one client connection then exit
Client specific:
-c, --client run in client mode, connecting to
-u, --udp use UDP rather than TCP
-b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited)
(default 1 Mbit/sec for UDP, unlimited for TCP)
(optional slash and packet count for burst mode)
-t, --time # time in seconds to transmit for (default 10 secs)
-n, --bytes #[KMG] number of bytes to transmit (instead of -t)
-k, --blockcount #[KMG] number of blocks (packets) to transmit (instead of -t or -n)
-l, --len #[KMG] length of buffer to read or write
(default 128 KB for TCP, 8 KB for UDP)
--cport bind to a specific client port (TCP and UDP, default: ephemeral port)
-P, --parallel # number of parallel client streams to run
-R, --reverse run in reverse mode (server sends, client receives)
-w, --window #[KMG] set window size / socket buffer size
-M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)
-N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm
-4, --version4 only use IPv4
-6, --version6 only use IPv6
-S, --tos N set the IP 'type of service'
-Z, --zerocopy use a 'zero copy' method of sending data
-O, --omit N omit the first n seconds
-T, --title str prefix every output line with this string
--get-server-output get results from server
--udp-counters-64bit use 64-bit counters in UDP test packets
[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-
iperf3 homepage at:
http://software.es.net/iperf/
Report bugs to:
https://github.com/esnet/iperf
Step 4: Now you can test the network throughput between the your machine and the server using following command
F:\Personal Folder\iperf-3.1.3-win64>iperf3 -c 178.XXX.XX.XXX
Output
Connecting to host 178.128.59.154, port 5201
[ 4] local 10.0.0.9 port 59245 connected to 178.XXX.XX.XXX port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 1.88 MBytes 15.7 Mbits/sec
[ 4] 1.00-2.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 2.00-3.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 3.00-4.00 sec 2.12 MBytes 17.8 Mbits/sec
[ 4] 4.00-5.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 5.00-6.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 6.00-7.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 7.00-8.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 8.00-9.00 sec 2.25 MBytes 18.9 Mbits/sec
[ 4] 9.00-10.00 sec 2.25 MBytes 18.9 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 22.0 MBytes 18.5 Mbits/sec sender
[ 4] 0.00-10.00 sec 22.0 MBytes 18.5 Mbits/sec receiver
iperf Done.
For Linux Machines
Installation steps
# sudo apt remove iperf3 libiperf0
# sudo apt install libsctp1
# wget https://iperf.fr/download/ubuntu/libiperf0_3.7-3_amd64.deb
# wget https://iperf.fr/download/ubuntu/iperf3_3.7-3_amd64.deb
# sudo dpkg -i libiperf0_3.7-3_amd64.deb iperf3_3.7-3_amd64.deb
# rm libiperf0_3.7-3_amd64.deb iperf3_3.7-3_amd64.deb
CentOS
Installation steps
# yum install epel-release
# yum update
# yum install iperf3
Output
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
iperf
0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
Need to get 76.5 kB of archives.
After this operation, 213 kB of additional disk space will be used.
Get:1
http://in.archive.ubuntu.com/ubuntu focal/universe amd64 iperf amd64 2.0.13+dfsg1-1build1 [76.5 kB]
Fetched 76.5 kB in 0s (242 kB/s)
Selecting previously unselected package iperf.
(Reading database ... 227276 files and directories currently installed.)
Preparing to unpack .../iperf_2.0.13+dfsg1-1build1_amd64.deb ...
Unpacking iperf (2.0.13+dfsg1-1build1) ...
Setting up iperf (2.0.13+dfsg1-1build1) ...
Processing triggers for man-db (2.9.1-1) …
Now you can test the network throughput using following command
root@server:~# iperf3 -c 178.XXX.XX.XXX
Output
------------------------------------------------------------
Client connecting to 178.XXX.XX.XXX, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 68.183.89.9 port 47038 connected with 178.128.59.154 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 696 MBytes 583 Mbits/sec
Hope the information above helps you in testing your network. Please click on upvote if you like it.