よーし、おじさん iperf3 でネットワークの帯域測定しちゃうぞー(上り編)

iperfの使い方 | CCNA対策から学ぶネットワーク運用ガイド

$ iperf3 -v
iperf 3.1.3
Darwin Wataru-no-MacBook-Air.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
Optional features available: sendfile / zerocopy

上り側(サーバー)

その前に F/W のポートをあけておく。

別に永続的に開けたいわけではないので --permanent はつけない

firewall-cmd --zone=public --add-port=5201/tcp
# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

iperf3 ではデフォルトリッスンポート 5201/tcp なのだろうか。

下り側(クライアント)

iperf3 -c 192.0.3.4
Connecting to host 192.0.3.4, port 5201
[  4] local 192.168.0.2 port 63051 connected to 192.0.3.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  10.9 MBytes  91.6 Mbits/sec
[  4]   1.00-2.00   sec  11.1 MBytes  93.3 Mbits/sec
[  4]   2.00-3.00   sec  9.70 MBytes  81.4 Mbits/sec
[  4]   3.00-4.00   sec  11.4 MBytes  96.0 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  93.7 Mbits/sec
[  4]   5.00-6.00   sec  11.3 MBytes  94.7 Mbits/sec
[  4]   6.00-7.00   sec  11.3 MBytes  94.5 Mbits/sec
[  4]   7.00-8.00   sec  11.0 MBytes  92.7 Mbits/sec
[  4]   8.00-9.00   sec  11.4 MBytes  96.0 Mbits/sec
[  4]   9.00-10.00  sec  11.3 MBytes  95.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   111 MBytes  92.9 Mbits/sec                  sender
[  4]   0.00-10.00  sec   110 MBytes  92.5 Mbits/sec                  receiver

iperf Done.

上り側では次のような結果が出ている

-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.0.2.123, port 63050
[  5] local 192.0.3.4 port 5201 connected to 192.0.2.123 port 63051
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  10.4 MBytes  87.2 Mbits/sec
[  5]   1.00-2.00   sec  11.2 MBytes  93.8 Mbits/sec
[  5]   2.00-3.00   sec  9.68 MBytes  81.2 Mbits/sec
[  5]   3.00-4.00   sec  11.3 MBytes  95.1 Mbits/sec
[  5]   4.00-5.00   sec  11.1 MBytes  93.4 Mbits/sec
[  5]   5.00-6.00   sec  11.3 MBytes  95.0 Mbits/sec
[  5]   6.00-7.00   sec  11.3 MBytes  94.5 Mbits/sec
[  5]   7.00-8.00   sec  11.2 MBytes  93.7 Mbits/sec
[  5]   8.00-9.00   sec  11.3 MBytes  94.9 Mbits/sec
[  5]   9.00-10.00  sec  11.3 MBytes  95.0 Mbits/sec
[  5]  10.00-10.01  sec   112 KBytes   102 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.01  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.01  sec   110 MBytes  92.4 Mbits/sec                  receiver

用が済んだら Ctrl+C でプロセス殺す。

ポートも閉じる。

firewall-cmd --zone=public --remove-port=5201/tcp