Come misurare le prestazioni della LAN con Iperf
IntroIperf è un'applicazione a riga di comando usata comunemente per misurare le prestazioni di una rete per quanto riguarda l'ampiezza della banda passante.
L'applicazione è di tipo client-server e genera un flusso di dati (
TCPwiki e
UDPwiki) fra il client e il server che viene quindi misurato per determinare le prestazioni.
Iperf è scritto in C++ ed è disponibile per varie piattaforme (Win, Linux, Mac)
LinkSito ufficialeDownloadMirrorTestPer eseguire un test ho installato Iperf 2.0.2 sul mio server con Debian Linux e Iperf 1.7.0 sul mio desktop con Window XP Pro, collegati tramite switch su una rete Fast Ethernet a 100 Mbit
Ho impostato il server con Debian Linux come server per Iperf e il desktop con Windows XP Pro come client per Iperf.
La sintassi dei comandi è molto intuitiva:
- per avviare Iperf come server:
iperf -s
- per avviare Iperf come client:
iperf -c <IP Iperf server>
dove con
<IP Iperf server> si intende l'indirizzo IP del host sul quale è avviato Iperf come server.
Ecco i risultati:
Sul desktop, con Iper avviato come client:
C:\>iperf -c 192.168.0.1
------------------------------------------------------------
Client connecting to 192.168.0.1, TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[1912] local 192.168.0.2 port 4621 connected with 192.168.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[1912] 0.0-10.0 sec 110 MBytes 92.1 Mbits/sec
Sul server, con Iper avviato come server:
server:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.0.1 port 5001 connected with 192.168.0.2 port 4621
[ 4] 0.0-10.0 sec 110 MBytes 92.1 Mbits/sec
Invertendo i ruoli:
C:\>iperf.exe -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 8.00 KByte (default)
------------------------------------------------------------
[1868] local 192.168.0.2 port 5001 connected with 192.168.0.1 port 50352
[ ID] Interval Transfer Bandwidth
[1868] 0.0-10.0 sec 113 MBytes 94.8 Mbits/sec
server:~# iperf -c 192.168.0.2
------------------------------------------------------------
Client connecting to 192.168.0.2, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.1 port 50353 connected with 192.168.0.2 port 5001
[ 3] 0.0-10.0 sec 113 MBytes 94.8 Mbits/sec
Si può notare come le prestazioni si avvicinino molto al massimo teorico di 100 Mbit/sec