#1 2009-10-11 18:46:13
安裝 Iperf 網路效能測試工具
關於網路效能測試,大家應該都會想到免費又簡單操作的 Iperf ,Iperf 是由 NLANR( National Laboratory for Applied Network Research)所開發出來的工具,主要是用來量測網路的最大的 TCP / UDP  網路頻寬/效能。這套工具是在各種平台都找得到,包括在Windows、Linux、Mac OS 等常見的作業系統,連 opware ipkg 套件也有這套工具。
$ ipkg list | grep iperf
iperf - 2.0.4-1 - A tool for measuring TCP and UDP bandwidth performance.
果然有,這真是太神奇了!! 那就嘗試把它安裝上去吧
$ ipkg install iperf
Installing iperf (2.0.4-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/iperf_2.0.4-1_mipsel.ipk
Configuring iperf
Successfully terminated.
安裝完成,看一下操作說明,操作方式和在windows下操作方式大同小異。
$ iperf --help
Usage: iperf [-s|-c host] [options]
       iperf [-h|--help] [-v|--version]
Client/Server:
  -f, --format    [kmKM]   format to report: Kbits, Mbits, KBytes, MBytes
  -i, --interval  #        seconds between periodic bandwidth reports
  -l, --len       #[KM]    length of buffer to read or write (default 8 KB)
  -m, --print_mss          print TCP maximum segment size (MTU - TCP/IP header)
  -o, --output     output the report or error message to this specified file
  -p, --port      #        server port to listen on/connect to
  -u, --udp                use UDP rather than TCP
  -w, --window    #[KM]    TCP window size (socket buffer size)
  -B, --bind         bind to , an interface or multicast address
  -C, --compatibility      for use with older versions does not sent extra msgs
  -M, --mss       #        set TCP maximum segment size (MTU - 40 bytes)
  -N, --nodelay            set TCP no delay, disabling Nagle's Algorithm
  -V, --IPv6Version        Set the domain to IPv6
Server specific:
  -s, --server             run in server mode
  -U, --single_udp         run in single threaded UDP mode
  -D, --daemon             run the server as a daemon
Client specific:
  -b, --bandwidth #[KM]    for UDP, bandwidth to send at in bits/sec
                           (default 1 Mbit/sec, implies -u)
  -c, --client       run in client mode, connecting to 
  -d, --dualtest           Do a bidirectional test simultaneously
  -n, --num       #[KM]    number of bytes to transmit (instead of -t)
  -r, --tradeoff           Do a bidirectional test individually
  -t, --time      #        time in seconds to transmit for (default 10 secs)
  -F, --fileinput    input the data to be transmitted from a file
  -I, --stdin              input the data to be transmitted from stdin
  -L, --listenport #       port to recieve bidirectional tests back on
  -P, --parallel  #        number of parallel client threads to run
  -T, --ttl       #        time-to-live, for multicast (default 1)
  -Z, --linux-congestion   set TCP congestion control algorithm (Linux only)
Miscellaneous:
  -x, --reportexclude [CDMSV]   exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
  -y, --reportstyle C      report as a Comma-Separated Values
  -h, --help               print this message and quit
  -v, --version            print version information and quit
[KM] Indicates options that support a K or M suffix for kilo- or mega-
The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.
Report bugs to        
我們馬上試一下效能,先啟動 server 端 iperf
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 42.7 KByte (default)
------------------------------------------------------------
再到 client 端執行設定測試參數
D:\>iperf -c 192.168.2.10 -w 128k -t 60 -P 5
------------------------------------------------------------
Client connecting to 192.168.2.10, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[1912] local 192.168.2.252 port 4783 connected with 192.168.2.10 port 5001
[1880] local 192.168.2.252 port 4784 connected with 192.168.2.10 port 5001
[1864] local 192.168.2.252 port 4785 connected with 192.168.2.10 port 5001
[1848] local 192.168.2.252 port 4786 connected with 192.168.2.10 port 5001
[1832] local 192.168.2.252 port 4787 connected with 192.168.2.10 port 5001
[ ID] Interval       Transfer     Bandwidth
[1880]  0.0-60.2 sec  43.6 MBytes  6.08 Mbits/sec
[1864]  0.0-60.2 sec  43.2 MBytes  6.02 Mbits/sec
[1912]  0.0-60.2 sec  43.9 MBytes  6.11 Mbits/sec
[1832]  0.0-60.2 sec  43.6 MBytes  6.08 Mbits/sec
[1848]  0.0-60.2 sec  43.5 MBytes  6.05 Mbits/sec
[SUM]  0.0-60.3 sec   218 MBytes  30.3 Mbits/sec
D:\>
server 端(WL-500gx)畫面
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 42.7 KByte (default)
------------------------------------------------------------
[  6] local 192.168.2.10 port 5001 connected with 192.168.2.252 port 4783
[  8] local 192.168.2.10 port 5001 connected with 192.168.2.252 port 4784
[  9] local 192.168.2.10 port 5001 connected with 192.168.2.252 port 4785
[ 10] local 192.168.2.10 port 5001 connected with 192.168.2.252 port 4786
[ 11] local 192.168.2.10 port 5001 connected with 192.168.2.252 port 4787
[ ID] Interval       Transfer     Bandwidth
[  8]  0.0-60.1 sec  43.6 MBytes  6.09 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  9]  0.0-60.0 sec  43.2 MBytes  6.03 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  6]  0.0-60.1 sec  43.9 MBytes  6.12 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 11]  0.0-60.1 sec  43.6 MBytes  6.09 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 10]  0.0-60.2 sec  43.5 MBytes  6.06 Mbits/sec
[SUM]  0.0-60.2 sec    218 MBytes  30.4 Mbits/sec
想知道您家裡的 Router 笑能效能如何嗎? 馬上就去安裝測試吧。
技術問題請於論壇上集眾人之力公開討論,感恩

離線
#2 2009-10-12 22:33:07
Re: 安裝 Iperf 網路效能測試工具
我家的WL500W
server:
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 42.7 KByte (default)
------------------------------------------------------------
[  6] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3158
[  8] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3159
[  9] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3160
[ 10] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3161
[ 11] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3162
[ ID] Interval       Transfer     Bandwidth
[  6]  0.0-58.4 sec  61.5 MBytes  8.83 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  8]  0.0-58.4 sec  61.9 MBytes  8.89 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  9]  0.0-58.4 sec  61.4 MBytes  8.82 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 10]  0.0-58.4 sec  62.9 MBytes  9.03 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 11]  0.0-58.4 sec  60.8 MBytes  8.74 Mbits/sec
[SUM]  0.0-58.4 sec    309 MBytes  44.3 Mbits/sec
client
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 42.7 KByte (default)
------------------------------------------------------------
[  6] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3158
[  8] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3159
[  9] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3160
[ 10] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3161
[ 11] local 192.168.2.1 port 5001 connected with 192.168.2.11 port 3162
[ ID] Interval       Transfer     Bandwidth
[  6]  0.0-58.4 sec  61.5 MBytes  8.83 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  8]  0.0-58.4 sec  61.9 MBytes  8.89 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  9]  0.0-58.4 sec  61.4 MBytes  8.82 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 10]  0.0-58.4 sec  62.9 MBytes  9.03 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 11]  0.0-58.4 sec  60.8 MBytes  8.74 Mbits/sec
[SUM]  0.0-58.4 sec    309 MBytes  44.3 Mbits/sec離線
#3 2009-10-13 13:17:05
Re: 安裝 Iperf 網路效能測試工具
ASUS WL-500GP V1 128MB的"笑"能來了....呵呵~
Client端:Windows 7 64bits 8GB RAM
------------------------------------------------------------
Client connecting to 192.168.1.1, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[180] local 192.168.1.2 port 49562 connected with 192.168.1.1 port 5001
[156] local 192.168.1.2 port 49559 connected with 192.168.1.1 port 5001
[172] local 192.168.1.2 port 49561 connected with 192.168.1.1 port 5001
[164] local 192.168.1.2 port 49560 connected with 192.168.1.1 port 5001
[148] local 192.168.1.2 port 49558 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[180]  0.0-60.1 sec  87.7 MBytes  12.2 Mbits/sec
[148]  0.0-60.1 sec  88.1 MBytes  12.3 Mbits/sec
[164]  0.0-60.1 sec  88.6 MBytes  12.4 Mbits/sec
[172]  0.0-60.1 sec  88.3 MBytes  12.3 Mbits/sec
[156]  0.0-60.1 sec  87.1 MBytes  12.2 Mbits/sec
[SUM]  0.0-60.1 sec   440 MBytes  61.4 Mbits/sec
Server端:WL-500GP V1 128MB
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  7] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 49558
[  8] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 49559
[  9] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 49560
[ 10] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 49561
[ 11] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 49562
[ ID] Interval       Transfer     Bandwidth
[ 11]  0.0-60.1 sec  87.7 MBytes  12.2 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  7]  0.0-60.0 sec  88.1 MBytes  12.3 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  9]  0.0-60.0 sec  88.6 MBytes  12.4 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[ 10]  0.0-60.1 sec  88.3 MBytes  12.3 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  8]  0.0-60.1 sec  87.1 MBytes  12.2 Mbits/sec
[SUM]  0.0-60.1 sec    440 MBytes  61.4 Mbits/sec
------------------------------------------------------------
離線
#4 2013-06-11 20:12:14
Re: 安裝 Iperf 網路效能測試工具
3com OfficeConnect Wireles 11G 
Wan to LAN  
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  100 MByte
------------------------------------------------------------
[  3] local 192.168.10.164 port 54185 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   150 MBytes   126 Mbits/sec
[  3] 10.0-20.0 sec  50.2 MBytes  42.2 Mbits/sec
[  3] 20.0-30.0 sec  48.4 MBytes  40.6 Mbits/sec
[  3] 30.0-40.0 sec  50.1 MBytes  42.0 Mbits/sec
[  3] 40.0-50.0 sec  48.0 MBytes  40.3 Mbits/sec
[  3] 50.0-60.0 sec  47.2 MBytes  39.6 Mbits/sec
[  3]  0.0-60.0 sec   394 MBytes  55.1 Mbits/sec離線
#5 2013-06-11 20:34:44
Re: 安裝 Iperf 網路效能測試工具
ASUS WL-500GX 
Wan to LAN 
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[  7] local 192.168.10.227 port 56464 connected with 192.168.1.22 port 5001
[  6] local 192.168.10.227 port 56463 connected with 192.168.1.22 port 5001
[  4] local 192.168.10.227 port 56460 connected with 192.168.1.22 port 5001
[  5] local 192.168.10.227 port 56462 connected with 192.168.1.22 port 5001
[  3] local 192.168.10.227 port 56461 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  7]  0.0-60.1 sec  35.2 MBytes  4.92 Mbits/sec
[  6]  0.0-60.5 sec  30.6 MBytes  4.25 Mbits/sec
[  4]  0.0-60.5 sec  41.6 MBytes  5.77 Mbits/sec
[  3]  0.0-60.7 sec  24.9 MBytes  3.44 Mbits/sec
[  5]  0.0-61.9 sec  33.8 MBytes  4.58 Mbits/sec
[SUM]  0.0-61.9 sec   166 MBytes  22.5 Mbits/sec離線
#6 2013-06-12 19:19:32
Re: 安裝 Iperf 網路效能測試工具
華碩 RT-N10+
原廠韌體 
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[  7] local 192.168.10.40 port 50138 connected with 192.168.1.22 port 5001
[  4] local 192.168.10.40 port 50135 connected with 192.168.1.22 port 5001
[  6] local 192.168.10.40 port 50137 connected with 192.168.1.22 port 5001
[  3] local 192.168.10.40 port 50134 connected with 192.168.1.22 port 5001
[  5] local 192.168.10.40 port 50136 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-60.1 sec  85.2 MBytes  11.9 Mbits/sec
[  7]  0.0-60.2 sec  88.0 MBytes  12.3 Mbits/sec
[  4]  0.0-60.2 sec  67.5 MBytes  9.41 Mbits/sec
[  6]  0.0-60.2 sec  69.1 MBytes  9.63 Mbits/sec
[  3]  0.0-60.2 sec  79.1 MBytes  11.0 Mbits/sec
[SUM]  0.0-60.2 sec   389 MBytes  54.2 Mbits/sec
DD-WRT v24-sp2 (05/27/13) std - build 21676
WAN to LAN  
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[  7] local 192.168.10.125 port 54219 connected with 192.168.1.22 port 5001
[  4] local 192.168.10.125 port 54216 connected with 192.168.1.22 port 5001
[  6] local 192.168.10.125 port 54218 connected with 192.168.1.22 port 5001
[  5] local 192.168.10.125 port 54217 connected with 192.168.1.22 port 5001
[  3] local 192.168.10.125 port 54215 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-60.1 sec  66.9 MBytes  9.33 Mbits/sec
[  5]  0.0-60.2 sec  53.9 MBytes  7.51 Mbits/sec
[  3]  0.0-60.1 sec  45.0 MBytes  6.28 Mbits/sec
[  7]  0.0-60.3 sec  51.5 MBytes  7.16 Mbits/sec
[  6]  0.0-60.3 sec  43.9 MBytes  6.10 Mbits/sec
[SUM]  0.0-60.3 sec   261 MBytes  36.3 Mbits/sec
DD-WRT v24-sp2 (05/27/13) std - build 21676
WAN to WLAN
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[  5] local 192.168.10.114 port 57681 connected with 192.168.1.22 port 5001
[  7] local 192.168.10.114 port 57683 connected with 192.168.1.22 port 5001
[  4] local 192.168.10.114 port 57680 connected with 192.168.1.22 port 5001
[  6] local 192.168.10.114 port 57682 connected with 192.168.1.22 port 5001
[  3] local 192.168.10.114 port 57679 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-60.2 sec  45.0 MBytes  6.27 Mbits/sec
[  7]  0.0-60.2 sec  42.4 MBytes  5.90 Mbits/sec
[  5]  0.0-60.2 sec  45.6 MBytes  6.35 Mbits/sec
[  6]  0.0-60.2 sec  53.8 MBytes  7.49 Mbits/sec
[  4]  0.0-60.5 sec  36.9 MBytes  5.11 Mbits/sec
[SUM]  0.0-60.5 sec   224 MBytes  31.0 Mbits/sec最後修改: anla (2013-06-12 21:14:39)
離線
#7 2013-06-12 20:57:47
Re: 安裝 Iperf 網路效能測試工具
Planet WDRT-731U 
WAN   to LAN
D:\iperf-2.0.5-2-win32>iperf.exe -c 192.168.1.22 -w 128k -t 60 -P 5
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[  3] local 192.168.10.166 port 57014 connected with 192.168.1.22 port 5001
[  4] local 192.168.10.166 port 57015 connected with 192.168.1.22 port 5001
[  7] local 192.168.10.166 port 57018 connected with 192.168.1.22 port 5001
[  5] local 192.168.10.166 port 57016 connected with 192.168.1.22 port 5001
[  6] local 192.168.10.166 port 57017 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  6]  0.0-57.0 sec   111 MBytes  16.3 Mbits/sec
[  7]  0.0-57.1 sec   137 MBytes  20.2 Mbits/sec
[  5]  0.0-57.1 sec   113 MBytes  16.7 Mbits/sec
[  4]  0.0-60.0 sec   125 MBytes  17.5 Mbits/sec
[  3]  0.0-60.0 sec   126 MBytes  17.6 Mbits/sec
[SUM]  0.0-60.0 sec   613 MBytes  85.6 Mbits/sec
WAN to WLAN 
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 5001
TCP window size:  128 KByte
------------------------------------------------------------
[  4] local 192.168.10.164 port 57545 connected with 192.168.1.22 port 5001
[  6] local 192.168.10.164 port 57547 connected with 192.168.1.22 port 5001
[  7] local 192.168.10.164 port 57548 connected with 192.168.1.22 port 5001
[  5] local 192.168.10.164 port 57546 connected with 192.168.1.22 port 5001
[  3] local 192.168.10.164 port 57544 connected with 192.168.1.22 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-60.1 sec  76.1 MBytes  10.6 Mbits/sec
[  7]  0.0-60.1 sec  69.6 MBytes  9.72 Mbits/sec
[  4]  0.0-60.1 sec  81.0 MBytes  11.3 Mbits/sec
[  6]  0.0-60.2 sec  85.6 MBytes  11.9 Mbits/sec
[  5]  0.0-60.3 sec  74.5 MBytes  10.4 Mbits/sec
[SUM]  0.0-60.3 sec   387 MBytes  53.8 Mbits/sec最後修改: anla (2013-06-12 21:07:36)
離線











