用 iperf3 檢測兩端網路傳輸速度
- 環境 : Ubuntu 20.04
- 10.20.xx.xx → 1Gbps 網卡
- 192.168.100.xx → 10Gbps 網卡
基本測試
- 每台主機都需要安裝 iperf3
sudo apt install iperf3 -y
- 假設 10.20.2.41 與 10.20.2.252 當 ipfer3 server
iperf3 -s
- 看測試範例訊息
root@iserv-ft-41:~# iperf3 -s ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- Accepted connection from 192.168.100.42, port 54220 [ 5] local 192.168.100.41 port 5201 connected to 192.168.100.42 port 54228 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 1.08 GBytes 9.26 Gbits/sec [ 5] 1.00-2.00 sec 1.09 GBytes 9.40 Gbits/sec [ 5] 2.00-3.00 sec 653 MBytes 5.48 Gbits/sec [ 5] 3.00-4.00 sec 1.04 GBytes 8.92 Gbits/sec [ 5] 4.00-5.00 sec 859 MBytes 7.21 Gbits/sec [ 5] 5.00-6.00 sec 1.07 GBytes 9.23 Gbits/sec [ 5] 6.00-7.00 sec 876 MBytes 7.35 Gbits/sec [ 5] 7.00-8.00 sec 878 MBytes 7.37 Gbits/sec [ 5] 8.00-9.00 sec 1.10 GBytes 9.41 Gbits/sec [ 5] 9.00-10.00 sec 1.07 GBytes 9.19 Gbits/sec [ 5] 10.00-10.00 sec 1.02 MBytes 8.77 Gbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 9.64 GBytes 8.28 Gbits/sec receiver
- 假設 10.20.2.42 與 10.20.2.251 當 ipfer3 client
iperf3 -c 192.168.100.41
- 看測試範例訊息
root@iserv-ft-42:~# iperf3 -c 192.168.100.41 Connecting to host 192.168.100.41, port 5201 [ 5] local 192.168.100.42 port 36620 connected to 192.168.100.41 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 610 MBytes 5.11 Gbits/sec 1231 2.21 MBytes [ 5] 1.00-2.00 sec 1.09 GBytes 9.39 Gbits/sec 0 3.16 MBytes [ 5] 2.00-3.00 sec 1.09 GBytes 9.41 Gbits/sec 0 3.16 MBytes [ 5] 3.00-4.00 sec 876 MBytes 7.35 Gbits/sec 673 3.14 MBytes [ 5] 4.00-5.00 sec 816 MBytes 6.85 Gbits/sec 598 618 KBytes [ 5] 5.00-6.00 sec 440 MBytes 3.69 Gbits/sec 1770 3.14 MBytes [ 5] 6.00-7.00 sec 620 MBytes 5.20 Gbits/sec 2189 1.05 MBytes [ 5] 7.00-8.00 sec 1.09 GBytes 9.39 Gbits/sec 5 1.66 MBytes [ 5] 8.00-9.00 sec 898 MBytes 7.53 Gbits/sec 398 462 KBytes [ 5] 9.00-10.00 sec 846 MBytes 7.10 Gbits/sec 1092 1.44 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 8.27 GBytes 7.10 Gbits/sec 7956 sender [ 5] 0.00-10.00 sec 8.27 GBytes 7.10 Gbits/sec receiver iperf Done.
iperf3 -c 10.20.2.41
- 看測試範例訊息
root@iserv-ft-42:~# iperf3 -c 10.20.2.41 Connecting to host 10.20.2.41, port 5201 [ 5] local 10.20.2.42 port 38162 connected to 10.20.2.41 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 115 MBytes 965 Mbits/sec 32 491 KBytes [ 5] 1.00-2.00 sec 112 MBytes 944 Mbits/sec 25 171 KBytes [ 5] 2.00-3.00 sec 112 MBytes 944 Mbits/sec 18 303 KBytes [ 5] 3.00-4.00 sec 111 MBytes 933 Mbits/sec 18 314 KBytes [ 5] 4.00-5.00 sec 112 MBytes 944 Mbits/sec 7 204 KBytes [ 5] 5.00-6.00 sec 111 MBytes 933 Mbits/sec 2 240 KBytes [ 5] 6.00-7.00 sec 112 MBytes 944 Mbits/sec 2 424 KBytes [ 5] 7.00-8.00 sec 111 MBytes 933 Mbits/sec 8 404 KBytes [ 5] 8.00-9.00 sec 112 MBytes 944 Mbits/sec 0 581 KBytes [ 5] 9.00-10.00 sec 111 MBytes 933 Mbits/sec 7 396 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.10 GBytes 942 Mbits/sec 119 sender [ 5] 0.00-10.00 sec 1.09 GBytes 939 Mbits/sec receiver iperf Done.