抑郁症健康,内容丰富有趣,生活中的好帮手!
抑郁症健康 > 网络质量指标及测试工具iperf

网络质量指标及测试工具iperf

时间:2023-12-03 14:27:19

相关推荐

网络质量的指标,主要有以下几个:

A. 带宽(throughput),网络的吞吐率,端到端之间可以传输的最大速率。

B. 延时(latency),数据包从本地传输到对端之间需要的时间,一般是来回的时间RTT。中美海底光纤RTT一般在170ms左右。

C. 丢包(loss),丢包率超过10%以后,网络质量会迅速劣化。

D. 延时抖动(jitter),如果延时不稳定,忽快忽慢,网络就存在抖动。在VOIP,视频会议等场合,往往声音和图像也会抖动。

视讯直播对这四个指标都很敏感。基于UDP的srt协议直播,在部署前,需要确认网络质量参数。

网络质量测试工具iperf, 可以测试真实载荷下的网络质量,可以测试端到端的网络质量,可以测试一定吞吐率下的丢包、抖动。

iperf网站:https://iperf.fr/iperf-download.php

-b, --bitrate #[KMG][/#] target bitrate in bits/sec (0 for unlimited)

-w, --window #[KMG] set window size / socket buffer size

-u, --udp use UDP rather than TCP

-c, --client <host> run in client mode, connecting to <host>

-s, --server run in server mode

-D, --daemon run the server as a daemon

-d, --dualtestDo a bidirectional test simultaneously // client only

-P, --parallel # number of parallel client threads to run

Source of the IPERF 3 project can be found at /esnet/iperf

Source of the IPERF 2 project can be found at /projects/iperf2/

Source of the IPERF project can be found at /projects/iperf/

git clone git@:esnet/iperf.git

不要用iperf3,直接用iperf2来测。

服务器上启动:# iperf -s -u -p 17029

windows client上面测试:

# iperf2 -u -c 107.150.28.246 -b 800k -i 5 -t 30 -p 17029

# iperf2 -u -c 107.150.28.246 -b 2M -i 5 -t 30 -p 17029

# iperf2 -u -c 107.150.28.246 -b 2.4M -i 5 -t 30 -p 17029

# iperf2 -u -c 107.150.28.246 -b 800k -i 5 -t 30 -p 17029 -P 3

# iperf2 -u -c 107.150.28.246 -b 800k -i 5 -t 30 -p 17029 -P 9

服务器上面生成统计报告:

^C(cmm_owms) [root@usasvr2 iperf2-code]# iperf -s -p 17029 -u

------------------------------------------------------------

Server listening on UDP port 17029

Receiving 1470 byte datagrams

UDP buffer size: 208 KByte (default)

------------------------------------------------------------

[ 3] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 61053 (peer 2.0.14-alpha)

[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams

[ 3] 0.0-10.0 sec 979 KBytes 799 Kbits/sec 6.481 ms 2/ 684 (0.29%)

[ 4] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 61700 (peer 2.0.14-alpha)

[ 4] 0.0-30.0 sec 7.50 MBytes 2.09 Mbits/sec 3.060 ms 6/ 5353 (0.11%)

[ 3] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 52546 (peer 2.0.14-alpha)

[ 3] 0.0-30.0 sec 8.98 MBytes 2.51 Mbits/sec 2.661 ms 16/ 6423 (0.25%)

[ 4] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 51827 (peer 2.0.14-alpha)

[ 3] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 51825 (peer 2.0.14-alpha)

[ 5] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 51826 (peer 2.0.14-alpha)

[ 4] 0.0-30.0 sec 2.86 MBytes 799 Kbits/sec 4.828 ms 5/ 2044 (0.24%)

[ 5] 0.0-30.0 sec 2.86 MBytes 799 Kbits/sec 5.347 ms 5/ 2044 (0.24%)

[ 3] 0.0-30.0 sec 2.86 MBytes 799 Kbits/sec 5.736 ms 4/ 2044 (0.2%)

[SUM] 0.0-30.0 sec 8.58 MBytes 2.40 Mbits/sec 5.736 ms 14/ 6132 (0.23%)

[ 6] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58768 (peer 2.0.14-alpha)

[ 5] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58771 (peer 2.0.14-alpha)

[ 4] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58774 (peer 2.0.14-alpha)

[ 3] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58772 (peer 2.0.14-alpha)

[ 7] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58775 (peer 2.0.14-alpha)

[ 8] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58767 (peer 2.0.14-alpha)

[ 9] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58769 (peer 2.0.14-alpha)

[ 10] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58773 (peer 2.0.14-alpha)

[ 11] local 107.150.28.246 port 17029 connected with 114.108.219.36 port 58770 (peer 2.0.14-alpha)

[ 3] 0.0-30.4 sec 1.25 MBytes 344 Kbits/sec 34.867 ms 1155/ 2044 (57%)

[ 7] 0.0-30.4 sec 1.11 MBytes 307 Kbits/sec 25.823 ms 1249/ 2044 (61%)

[ 9] 0.0-30.4 sec 1.05 MBytes 289 Kbits/sec 29.907 ms 1296/ 2044 (63%)

[ 11] 0.0-30.4 sec 1.11 MBytes 305 Kbits/sec 33.732 ms 1255/ 2044 (61%)

如果觉得《网络质量指标及测试工具iperf》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。