systemadmin.es > Redes > iperf: Test de rendimiento de red

iperf: Test de rendimiento de red

Mediante iperf podemos realizar pruebas de rendimiento de red. Vamos a ver un ejemplo de cómo usarlo

iperf funciona con dos roles: cliente y servidor, para el servidor deberemos usar la opción -s. Con la opción -i podemos indicar el tiempo que espera para darnos la media de tranferencia.

Por lo tanto en el servidor podemos usar, por ejemplo:

# iperf -s -i 5

En el lado cliente deberemos indicar la IP del servidor con la opción -c, el tiempo total del test mediante la opción -t y el intervalo para ir viendo como va el test mediante la opción -i. Por ejemplo:

# iperf -c 172.18.1.13 -t 30 -i 5
------------------------------------------------------------
Client connecting to 172.18.1.13, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 172.18.1.14 port 46680 connected with 172.18.1.13 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec   558 MBytes   937 Mbits/sec
[  3]  5.0-10.0 sec   557 MBytes   934 Mbits/sec
[  3] 10.0-15.0 sec   556 MBytes   933 Mbits/sec
[  3] 15.0-20.0 sec   557 MBytes   934 Mbits/sec
[  3] 20.0-25.0 sec   556 MBytes   933 Mbits/sec
[  3] 25.0-30.0 sec   556 MBytes   933 Mbits/sec
[  3]  0.0-30.0 sec  3.26 GBytes   934 Mbits/sec
# iperf -c 172.18.1.13 -t 120 -i 5
------------------------------------------------------------
Client connecting to 172.18.1.13, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 172.18.1.14 port 46682 connected with 172.18.1.13 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec   557 MBytes   934 Mbits/sec
[  3]  5.0-10.0 sec   557 MBytes   935 Mbits/sec
[  3] 10.0-15.0 sec   557 MBytes   934 Mbits/sec
[  3] 15.0-20.0 sec   558 MBytes   935 Mbits/sec
[  3] 20.0-25.0 sec   556 MBytes   934 Mbits/sec
[  3] 25.0-30.0 sec   558 MBytes   936 Mbits/sec
[  3] 30.0-35.0 sec   556 MBytes   933 Mbits/sec
[  3] 35.0-40.0 sec   557 MBytes   935 Mbits/sec
[  3] 40.0-45.0 sec   557 MBytes   935 Mbits/sec
[  3] 45.0-50.0 sec   557 MBytes   935 Mbits/sec
[  3] 50.0-55.0 sec   557 MBytes   934 Mbits/sec
[  3] 55.0-60.0 sec   558 MBytes   936 Mbits/sec
[  3] 60.0-65.0 sec   557 MBytes   935 Mbits/sec
[  3] 65.0-70.0 sec   556 MBytes   933 Mbits/sec
[  3] 70.0-75.0 sec   557 MBytes   935 Mbits/sec
[  3] 75.0-80.0 sec   558 MBytes   936 Mbits/sec
[  3] 80.0-85.0 sec   556 MBytes   934 Mbits/sec
[  3] 85.0-90.0 sec   556 MBytes   934 Mbits/sec
[  3] 90.0-95.0 sec   558 MBytes   935 Mbits/sec
[  3] 95.0-100.0 sec   556 MBytes   933 Mbits/sec
[  3] 100.0-105.0 sec   558 MBytes   935 Mbits/sec
[  3] 105.0-110.0 sec   557 MBytes   934 Mbits/sec
[  3] 110.0-115.0 sec   557 MBytes   934 Mbits/sec
[  3] 115.0-120.0 sec   557 MBytes   935 Mbits/sec
[  3]  0.0-120.0 sec  13.1 GBytes   935 Mbits/sec

El test se puede hacer bidireccional mediante la opción -d, pero suelen ocurrir cosas raras, por lo que es mejor intercambiar los roles para hacer el test en la dirección contraria:

# iperf -c 172.18.1.13 -t 120 -i 5 -d
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 172.18.1.13, TCP port 5001
TCP window size:  366 KByte (default)
------------------------------------------------------------
[  5] local 172.18.1.14 port 46725 connected with 172.18.1.13 port 5001
[  4] local 172.18.1.14 port 5001 connected with 172.18.1.13 port 58964
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0- 5.0 sec   558 MBytes   937 Mbits/sec
[  4]  0.0- 5.0 sec   228 MBytes   383 Mbits/sec
[  5]  5.0-10.0 sec   555 MBytes   931 Mbits/sec
[  4]  5.0-10.0 sec   473 MBytes   793 Mbits/sec
[  5] 10.0-15.0 sec   553 MBytes   928 Mbits/sec
[  4] 10.0-15.0 sec   536 MBytes   899 Mbits/sec
[  5] 15.0-20.0 sec   552 MBytes   927 Mbits/sec
[  4] 15.0-20.0 sec   526 MBytes   883 Mbits/sec
[  5] 20.0-25.0 sec   548 MBytes   920 Mbits/sec
[  4] 20.0-25.0 sec   525 MBytes   882 Mbits/sec
[  4] 25.0-30.0 sec   535 MBytes   897 Mbits/sec
[  5] 25.0-30.0 sec   554 MBytes   930 Mbits/sec
[  5] 30.0-35.0 sec   554 MBytes   930 Mbits/sec
[  4] 30.0-35.0 sec   536 MBytes   899 Mbits/sec

2 comments to “iperf: Test de rendimiento de red”

  1. Hola Jordi,

    Interesante articulo, una herramienta más para el arsenal de todo admin T.I.

    Por otra parte, quisiera comentarte que ví un error ortográfico “intercanviar” es “intercambiar”

    Saludos…

  2. Muchas gracias por el aviso! Ya esta corregido

Deja un comentario:

XHTML - Tags permitidos:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>