點對點網路測速軟體 iPerf3
文章目錄
需求
需要一個測試點對點網路速度的軟體, 要有以下幾項功能
- 免費
- 支援 Windows 和 Linux
- 只測網路, 不測 I/O
- 有簡易報表
找了一下, iPerf3 算是符合需求
安裝方法 (Server 和 Client 是同一個程式)
- 連線到 https://iperf.fr/iperf-download.php, 選擇需要的作業系統
- 如果是 Windows, 直接下載 iperf-3..-win64.zip 即可, 免安裝, server/client 是同一個執行檔
- 以 Ubuntu 為例, 理論上是執行這個指令就可以了
1sudo apt-get install iperf3
- 若是無法安裝, 可能是缺了某些 library, 可參考官網指示, 如下 (這是我執行時候的範本, 請參考官網看最新的指令)
1sudo apt remove iperf3 libiperf0 2sudo apt install libsctp1 3wget https://iperf.fr/download/ubuntu/libiperf0_3.9-1_amd64.deb 4wget https://iperf.fr/download/ubuntu/iperf3_3.9-1_amd64.deb 5sudo dpkg -i libiperf0_3.9-1_amd64.deb iperf3_3.9-1_amd64.deb 6rm libiperf0_3.9-1_amd64.deb iperf3_3.9-1_amd64.deb
測試 (Server 端)
- 不論 Windows 或是 Ubuntu, 指令都是一樣的簡單, 加上 -s 就可以了. 有需要的話, 可以加上 -p 指定 port
1$ iperf3 -s -p 5201 2----------------------------------------------------------- 3Server listening on 5201 4-----------------------------------------------------------
測試 (Client 端)
- 執行時指定 server 的 IP, port, 還有測試的時間長度就好, 他會顯示每秒的測速結果還有最後的平均值
1$iperf3.exe -c 192.168.1.3 -t 20 2Connecting to host 192.168.1.3, port 5201 3[ 4] local 192.168.1.4 port 56034 connected to 192.168.1.3 port 5201 4[ ID] Interval Transfer Bandwidth 5[ 4] 0.00-1.00 sec 46.0 MBytes 385 Mbits/sec 6[ 4] 1.00-2.00 sec 48.1 MBytes 403 Mbits/sec 7[ 4] 2.00-3.00 sec 48.8 MBytes 410 Mbits/sec 8[ 4] 3.00-4.00 sec 48.2 MBytes 404 Mbits/sec 9[ 4] 4.00-5.00 sec 48.2 MBytes 404 Mbits/sec 10[ 4] 5.00-6.00 sec 48.8 MBytes 410 Mbits/sec 11[ 4] 6.00-7.00 sec 49.1 MBytes 411 Mbits/sec 12[ 4] 7.00-8.00 sec 49.1 MBytes 413 Mbits/sec 13[ 4] 8.00-9.00 sec 48.4 MBytes 406 Mbits/sec 14[ 4] 9.00-10.00 sec 48.4 MBytes 406 Mbits/sec 15[ 4] 10.00-11.00 sec 49.4 MBytes 413 Mbits/sec 16[ 4] 11.00-12.00 sec 45.1 MBytes 379 Mbits/sec 17[ 4] 12.00-13.00 sec 49.5 MBytes 415 Mbits/sec 18[ 4] 13.00-14.00 sec 49.1 MBytes 411 Mbits/sec 19[ 4] 14.00-15.00 sec 50.0 MBytes 419 Mbits/sec 20[ 4] 15.00-16.00 sec 50.0 MBytes 420 Mbits/sec 21[ 4] 16.00-17.00 sec 49.5 MBytes 415 Mbits/sec 22[ 4] 17.00-18.00 sec 46.9 MBytes 393 Mbits/sec 23[ 4] 18.00-19.00 sec 49.1 MBytes 413 Mbits/sec 24[ 4] 19.00-20.00 sec 49.4 MBytes 414 Mbits/sec 25- - - - - - - - - - - - - - - - - - - - - - - - - 26[ ID] Interval Transfer Bandwidth 27[ 4] 0.00-20.00 sec 971 MBytes 407 Mbits/sec sender 28[ 4] 0.00-20.00 sec 971 MBytes 407 Mbits/sec receiver 29 30iperf Done.
後記
- iPerf3 預設是測試 upload 的速度, 若要測試 download, 請記得加上 -R 參數
- 有個不錯的地方是, 他的 server 端也會有 log, 如下, 這樣很方便.
1----------------------------------------------------------- 2Server listening on 5201 3----------------------------------------------------------- 4Accepted connection from 192.168.1.4, port 56033 5[ 5] local 192.168.1.3 port 5201 connected to 192.168.1.4 port 56034 6[ ID] Interval Transfer Bitrate 7[ 5] 0.00-1.00 sec 44.9 MBytes 377 Mbits/sec 8[ 5] 1.00-2.00 sec 48.2 MBytes 404 Mbits/sec 9[ 5] 2.00-3.00 sec 48.7 MBytes 408 Mbits/sec 10[ 5] 3.00-4.00 sec 48.2 MBytes 404 Mbits/sec 11[ 5] 4.00-5.00 sec 48.2 MBytes 404 Mbits/sec 12[ 5] 5.00-6.00 sec 48.8 MBytes 409 Mbits/sec 13[ 5] 6.00-7.00 sec 49.1 MBytes 412 Mbits/sec 14[ 5] 7.00-8.00 sec 49.1 MBytes 412 Mbits/sec 15[ 5] 8.00-9.00 sec 48.5 MBytes 407 Mbits/sec 16[ 5] 9.00-10.00 sec 48.2 MBytes 405 Mbits/sec 17[ 5] 10.00-11.00 sec 49.5 MBytes 415 Mbits/sec 18[ 5] 11.00-12.00 sec 45.2 MBytes 380 Mbits/sec 19[ 5] 12.00-13.00 sec 49.5 MBytes 415 Mbits/sec 20[ 5] 13.00-14.00 sec 49.0 MBytes 411 Mbits/sec 21[ 5] 14.00-15.00 sec 49.8 MBytes 418 Mbits/sec 22[ 5] 15.00-16.00 sec 50.1 MBytes 420 Mbits/sec 23[ 5] 16.00-17.00 sec 49.5 MBytes 415 Mbits/sec 24[ 5] 17.00-18.00 sec 46.9 MBytes 393 Mbits/sec 25[ 5] 18.00-19.00 sec 49.1 MBytes 412 Mbits/sec 26[ 5] 19.00-20.00 sec 49.5 MBytes 415 Mbits/sec 27[ 5] 20.00-20.02 sec 1.12 MBytes 420 Mbits/sec 28- - - - - - - - - - - - - - - - - - - - - - - - - 29[ ID] Interval Transfer Bitrate 30[ 5] 0.00-20.02 sec 971 MBytes 407 Mbits/sec receiver