Home > World Of ICT > Iperf – tool untuk mengecek performance jaringan

Iperf – tool untuk mengecek performance jaringan


Ketika kita telah selesai membangun sebuah Network Link, pertanyaan yang kerap muncul adalah bagaimana mengukur performance dari link tersebut, dalam istilah commisioning test network ada muncul istilah – (BERT) A bit error rate tester , nah istilah BERT test ini sering kita dengar dilingkungan ISP, NAP, Network Provider, tools untuk pengujian ini pun bermacam-macam, sebut saja bandwidthtes Mikrotik,Iperf, NetIQ Cheriot,tGEN (traffik Generator), Pathchar, dsb.

Iperf adalah salah satu tool untuk mengukur troughput bandwidth dalam sebuah link network, agar bisa dilakukan pengukuran diperlukan Iperf yang terinstall point to point, baik disisi server maupun client. Iperf sendiri bisa digunakan untuk mengukur performance link dari sisi TCP maupun UDP. diubuntu bisa menggunakan perintah apt-get install iperf, di FreeBSD bisa menggunakan perintah pkg_add iperf. Untuk ujicoba pastikan bahwa komputer tujuan terinstall dengan baik ipperf dan client testnya.

Syntax yang biasa digunakan adalah sebagai berikut,
Iperf tests:

no arg. Default settings
-b Data format
-r Bi-directional bandwidth
-d Simultaneous bi-directional bandwidth
-w TCP Window size

-p, -t, -i  Port, timing and interval
-u, -b      UDP tests, bandwidth settings
-m   Maximum Segment Size display
-M   Maximum Segment Size settings
-P   Parallel tests
-h   help

Cara Menggunakan

Server side:
root@ubuntu:~# iperf -s
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————

Client Side:
root@repo:~# iperf -c 192.168.1.204
————————————————————
Client connecting to 192.168.1.204, TCP port 5001
TCP window size: 16.0 KByte (default)
————————————————————
[  3] local 192.168.1.160 port 43559 connected with 192.168.1.204 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec    704 MBytes    591 Mbits/sec
root@repo:~#Data formatting: (-f argument)

Client side:
root@repo:~# iperf -c 192.168.1.204  -f -b
————————————————————
Client connecting to 192.168.1.204, TCP port 5001
TCP window size:   131 Kbit (default)
————————————————————
[  3] local 192.168.1.160 port 43560 connected with 192.168.1.204 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  5.88 Gbits    588 Mbits/sec
root@repo:~#

Bi-directional bandwidth measurement: (-r argument)
root@repo:~# iperf -c 192.168.1.204  -r
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
————————————————————
Client connecting to 192.168.1.204, TCP port 5001
TCP window size: 70.7 KByte (default)
————————————————————
[  3] local 192.168.1.160 port 43564 connected with 192.168.1.204 port 5001
Waiting for server threads to complete. Interrupt again to force quit.
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec    699 MBytes    586 Mbits/sec
root@repo:~#
root@repo:~# iperf -c 192.168.1.204  -d
————————————————————
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————————————
————————————————————
Client connecting to 192.168.1.204, TCP port 5001
TCP window size: 62.9 KByte (default)
————————————————————
[  4] local 192.168.1.160 port 43565 connected with 192.168.1.204 port 5001
[  5] local 192.168.1.160 port 5001 connected with 192.168.1.204 port 44344
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec    153 MBytes    128 Mbits/sec
[  5]  0.0-10.0 sec    504 MBytes    422 Mbits/sec

TCP Window size: (-w argument)
root@repo:~# iperf -c 192.168.1.204  -w 2000
WARNING: TCP window size set to 2000 bytes. A small window size
will give poor performance. See the Iperf documentation.
————————————————————
Client connecting to 192.168.1.204, TCP port 5001
TCP window size: 3.91 KByte (WARNING: requested 1.95 KByte)
————————————————————
[  3] local 192.168.1.160 port 60246 connected with 192.168.1.204 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec    306 MBytes    256 Mbits/sec
root@repo:~#

Communication port (-p), timing (-t) and interval (-i):

Client Side:
root@repo:~# iperf -c 192.168.1.204  -p 12000 -t 20 -i 2
————————————————————
Client connecting to 192.168.1.204, TCP port 12000
TCP window size: 16.0 KByte (default)
————————————————————
[  3] local 192.168.1.160 port 57048 connected with 192.168.1.204 port 12000
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec    140 MBytes    587 Mbits/sec
[  3]  2.0- 4.0 sec    141 MBytes    590 Mbits/sec
[  3]  4.0- 6.0 sec    140 MBytes    589 Mbits/sec
[  3]  6.0- 8.0 sec    140 MBytes    586 Mbits/sec
[  3]  8.0-10.0 sec    139 MBytes    584 Mbits/sec
[  3] 10.0-12.0 sec    139 MBytes    582 Mbits/sec
[  3] 12.0-14.0 sec    140 MBytes    589 Mbits/sec
[  3] 14.0-16.0 sec    140 MBytes    589 Mbits/sec
[  3] 16.0-18.0 sec    141 MBytes    591 Mbits/sec
[  3] 18.0-20.0 sec    141 MBytes    590 Mbits/sec
[  3]  0.0-20.0 sec  1.37 GBytes    588 Mbits/sec
root@repo:~#

server side

root@ubuntu:~# iperf -s -p 12000
————————————————————
Server listening on TCP port 12000
TCP window size: 85.3 KByte (default)
————————————————————

UDP tests: (-u), bandwidth settings (-b)

Server side:
root@ubuntu:~# iperf -s -u -i 1
————————————————————
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:   126 KByte (default)
————————————————————
[  3] local 192.168.1.204 port 5001 connected with 192.168.1.160 port 43399
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec  1.19 MBytes  10.0 Mbits/sec  0.009 ms    0/  850 (0%)
[  3]  1.0- 2.0 sec  1.19 MBytes  10.0 Mbits/sec  0.006 ms    0/  851 (0%)
[  3]  2.0- 3.0 sec  1.19 MBytes  10.0 Mbits/sec  0.010 ms    0/  850 (0%)
[  3]  3.0- 4.0 sec  1.19 MBytes  10.0 Mbits/sec  0.001 ms    0/  850 (0%)
[  3]  4.0- 5.0 sec  1.19 MBytes  10.0 Mbits/sec  0.002 ms    0/  851 (0%)
[  3]  5.0- 6.0 sec  1.19 MBytes  10.0 Mbits/sec  0.001 ms    0/  850 (0%)
[  3]  6.0- 7.0 sec  1.19 MBytes  10.0 Mbits/sec  0.001 ms    0/  851 (0%)
[  3]  7.0- 8.0 sec  1.19 MBytes  10.0 Mbits/sec  0.003 ms    0/  850 (0%)
[  3]  8.0- 9.0 sec  1.19 MBytes  10.0 Mbits/sec  0.001 ms    0/  851 (0%)
[  3]  9.0-10.0 sec  1.19 MBytes  10.0 Mbits/sec  0.001 ms    0/  850 (0%)
[  3]  0.0-10.0 sec  11.9 MBytes  10.0 Mbits/sec  0.001 ms    0/ 8504 (0%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order

client side
root@repo:~# iperf -c 192.168.1.204  -u -b 10m
————————————————————
Client connecting to 192.168.1.204, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:   122 KByte (default)
————————————————————
[  3] local 192.168.1.160 port 43399 connected with 192.168.1.204 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  11.9 MBytes  10.0 Mbits/sec
[  3] Sent 8505 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  11.9 MBytes  10.0 Mbits/sec  0.001 ms    0/ 8504 (0%)
[  3]  0.0-10.0 sec  1 datagrams received out-of-order
root@repo:~#

Dan masih banyak fungsi fungsi lain yang bisa diujicobakan

Silahkan mencoba

Categories: World Of ICT
  1. dikshie
    February 14, 2011 at 12:48 pm

    utk FreeBSD pasang iperf patch dari http://caia.swin.edu.au/urp/newtcp/tools.html
    “A patch for the Iperf network benchmarking tool that provides greater and more accurate contol over buffer sizes.”

  2. February 16, 2011 at 1:28 am

    hehe iya bang dikshie by default si BSD ketika running Iperf sering bermasalah Buffer over Flow, ok saya coba install yg baru nih

    ===> Vulnerability check disabled, database not found
    ===> License check disabled, port has not defined LICENSE
    ===> Found saved configuration for iperf-2.0.4
    => iperf-2.0.4.tar.gz doesn’t seem to exist in /usr/ports/distfiles/.
    => Attempting to fetch from http://heanet.dl.sourceforge.net/project/iperf/iperf/2.0.4%20source/.
    iperf-2.0.4.tar.gz 100% of 242 kB 78 kBps
    ===> Extracting for iperf-2.0.4
    => MD5 Checksum OK for iperf-2.0.4.tar.gz.
    => SHA256 Checksum OK for iperf-2.0.4.tar.gz.
    ===> Patching for iperf-2.0.4
    ===> Applying FreeBSD patches for iperf-2.0.4
    ===> Configuring for iperf-2.0.4
    checking for a BSD-compatible install… /usr/bin/install -c -o root -g wheel
    checking whether build environment is sane… yes

    eng# pkg_info | grep iperf
    iperf-2.0.4 A tool to measure maximum TCP and UDP bandwidth
    eng#

    eng# iperf -c 192.168.1.204 -w 20000
    ————————————————————
    Client connecting to 192.168.1.204, TCP port 5001
    TCP window size: 19.8 KByte (WARNING: requested 19.5 KByte)
    ————————————————————
    [ 3] local 192.168.1.72 port 54080 connected with 192.168.1.204 port 5001
    [ ID] Interval Transfer Bandwidth
    [ 3] 0.0-10.0 sec 489 MBytes 409 Mbits/sec

  3. tweene
    November 30, 2012 at 6:48 am

    waah,, ini yg ane cari,, makasih infonya,,
    oia mas,, kl pake iperf kan scr otomatis ntar throughputnya muncul ndiri,,
    trs ane mau nanya nih, rumus manual bwt ndapetin hsl kaya’ di iperf gimana sih?

    matur suwuun,,,

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: