linux - openwrt wifi udp 多播丢包和限速
问题描述
我在两个路由器之间使用 iperf 进行多播测试。第一张测试图是两台路由器用网线直接连接到两台路由器的LAN口。组播测试正常。
****192.168.3.1****
root@OpenWrt:~# iperf -c 224.0.0.1 -p 8080 -u -T -t 10 -i 1 -b 20M
iperf: ignoring extra argument -- 10
------------------------------------------------------------
Client connecting to 224.0.0.1, UDP port 8080
Sending 1470 byte datagrams, IPG target: 560.76 us (kalman adjust)
Setting multicast TTL to 0
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.3.1 port 57229 connected with 224.0.0.1 port 8080
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 1.0- 2.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 2.0- 3.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 3.0- 4.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 4.0- 5.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 5.0- 6.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 6.0- 7.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 7.0- 8.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 8.0- 9.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 0.0-10.0 sec 25.0 MBytes 21.0 Mbits/sec
[ 3] Sent 0 datagrams
****192.168.3.2****
root@OpenWrt:~# iperf -s -u -B 224.0.0.1 -p 8080 -i 1
multicast join failed: No such device
------------------------------------------------------------
Server listening on UDP port 8080
Binding to local address 224.0.0.1
Joining multicast group 224.0.0.1
Receiving 1470 byte datagrams
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
multicast join failed: No such device
[ 3] local 224.0.0.1 port 8080 connected with 192.168.3.1 port 60332
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 2.50 MBytes 21.0 Mbits/sec 0.076 ms 0/ 1783 (0%)
[ 3] 1.0- 2.0 sec 2.51 MBytes 21.1 Mbits/sec 0.007 ms 0/ 1790 (0%)
[ 3] 2.0- 3.0 sec 2.50 MBytes 21.0 Mbits/sec 0.007 ms 0/ 1783 (0%)
[ 3] 3.0- 4.0 sec 2.50 MBytes 21.0 Mbits/sec 0.005 ms 0/ 1784 (0%)
[ 3] 4.0- 5.0 sec 2.50 MBytes 21.0 Mbits/sec 0.016 ms 0/ 1783 (0%)
[ 3] 5.0- 6.0 sec 2.50 MBytes 20.9 Mbits/sec 0.032 ms 0/ 1780 (0%)
[ 3] 6.0- 7.0 sec 2.50 MBytes 21.0 Mbits/sec 0.076 ms 0/ 1785 (0%)
[ 3] 7.0- 8.0 sec 2.50 MBytes 21.0 Mbits/sec 0.017 ms 0/ 1784 (0%)
[ 3] 8.0- 9.0 sec 2.50 MBytes 21.0 Mbits/sec 0.007 ms 0/ 1784 (0%)
[ 3] 0.0-10.0 sec 25.0 MBytes 21.0 Mbits/sec 0.028 ms 0/17833 (0%)
第二张测试图是两台路由器使用2.4g进行Mesh Point网络连接,点对点测试,发现一切正常(可能由于信号干扰丢包可以接受)。
****192.168.3.1****
root@OpenWrt:~# iperf -c 192.168.3.2 -u -T -t 100 -i 1 -b 20M
iperf: ignoring extra argument -- 100
------------------------------------------------------------
Client connecting to 192.168.3.2, UDP port 5001
Sending 1470 byte datagrams, IPG target: 560.76 us (kalman adjust)
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.3.1 port 39586 connected with 192.168.3.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 1.27 MBytes 10.7 Mbits/sec
[ 3] 1.0- 2.0 sec 2.37 MBytes 19.9 Mbits/sec
[ 3] 2.0- 3.0 sec 1.38 MBytes 11.6 Mbits/sec
[ 3] 3.0- 4.0 sec 2.34 MBytes 19.6 Mbits/sec
[ 3] 4.0- 5.0 sec 1.60 MBytes 13.4 Mbits/sec
[ 3] 5.0- 6.0 sec 2.07 MBytes 17.4 Mbits/sec
[ 3] 6.0- 7.0 sec 1.70 MBytes 14.2 Mbits/sec
[ 3] 7.0- 8.0 sec 1.94 MBytes 16.3 Mbits/sec
[ 3] 8.0- 9.0 sec 1.95 MBytes 16.3 Mbits/sec
[ 3] 0.0-10.0 sec 18.5 MBytes 15.5 Mbits/sec
[ 3] Sent 0 datagrams
[ 3] Server Report:
[ 3] 0.0-10.0 sec 18.3 MBytes 15.3 Mbits/sec 1.554 ms 154/13181 (1.2%)
****192.168.3.2****
root@OpenWrt:~# iperf -s -u -B 192.168.3.2 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 192.168.3.2
Receiving 1470 byte datagrams
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.3.2 port 5001 connected with 192.168.3.1 port 39586
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 1.17 MBytes 9.85 Mbits/sec 4.352 ms 25/ 863 (2.9%)
[ 3] 1.0- 2.0 sec 2.34 MBytes 19.6 Mbits/sec 0.889 ms 5/ 1671 (0.3%)
[ 3] 2.0- 3.0 sec 1.36 MBytes 11.4 Mbits/sec 1.646 ms 14/ 986 (1.4%)
[ 3] 3.0- 4.0 sec 2.33 MBytes 19.6 Mbits/sec 0.442 ms 5/ 1668 (0.3%)
[ 3] 4.0- 5.0 sec 1.59 MBytes 13.3 Mbits/sec 1.294 ms 8/ 1141 (0.7%)
[ 3] 5.0- 6.0 sec 2.09 MBytes 17.5 Mbits/sec 0.941 ms 10/ 1500 (0.67%)
[ 3] 6.0- 7.0 sec 1.62 MBytes 13.6 Mbits/sec 2.204 ms 31/ 1186 (2.6%)
[ 3] 7.0- 8.0 sec 1.92 MBytes 16.1 Mbits/sec 0.532 ms 32/ 1401 (2.3%)
[ 3] 8.0- 9.0 sec 1.95 MBytes 16.4 Mbits/sec 2.025 ms 14/ 1405 (1%)
[ 3] 9.0-10.0 sec 1.81 MBytes 15.2 Mbits/sec 0.534 ms 10/ 1299 (0.77%)
[ 3] 0.0-10.0 sec 18.3 MBytes 15.3 Mbits/sec 1.554 ms 154/13181 (1.2%)
第三张测试图是两台路由器使用2.4g Mesh Point组网连接并进行组播测试,发现速度只有50kbye/s,丢包率非常高。对不起,这是什么问题?
****192.168.3.1****
root@OpenWrt:~# iperf -c 224.0.0.1 -p 8080 -u -T -t 10 -i 1 -b 20M
iperf: ignoring extra argument -- 10
------------------------------------------------------------
Client connecting to 224.0.0.1, UDP port 8080
Sending 1470 byte datagrams, IPG target: 560.76 us (kalman adjust)
Setting multicast TTL to 0
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.3.1 port 59175 connected with 224.0.0.1 port 8080
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 1.0- 2.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 2.0- 3.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 3.0- 4.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 4.0- 5.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 5.0- 6.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 6.0- 7.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 7.0- 8.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 8.0- 9.0 sec 2.50 MBytes 21.0 Mbits/sec
[ 3] 0.0-10.0 sec 25.0 MBytes 21.0 Mbits/sec
[ 3] Sent 0 datagrams
****192.168.3.2****
root@OpenWrt:/# iperf -s -u -B 224.0.0.1 -p 8080 -i 1
multicast join failed: No such device
------------------------------------------------------------
Server listening on UDP port 8080
Binding to local address 224.0.0.1
Joining multicast group 224.0.0.1
Receiving 1470 byte datagrams
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
multicast join failed: No such device
[ 3] local 224.0.0.1 port 8080 connected with 192.168.3.1 port 59175
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 1.0 sec 54.6 KBytes 447 Kbits/sec 24.013 ms 16/ 54 (30%)
[ 3] 1.0- 2.0 sec 53.1 KBytes 435 Kbits/sec 28.932 ms 1260/ 1297 (97%)
[ 3] 2.0- 3.0 sec 51.7 KBytes 423 Kbits/sec 28.925 ms 1766/ 1802 (98%)
[ 3] 3.0- 4.0 sec 51.7 KBytes 423 Kbits/sec 22.785 ms 1741/ 1777 (98%)
[ 3] 4.0- 5.0 sec 53.1 KBytes 435 Kbits/sec 27.523 ms 1727/ 1764 (98%)
[ 3] 5.0- 6.0 sec 51.7 KBytes 423 Kbits/sec 24.211 ms 1723/ 1759 (98%)
[ 3] 6.0- 7.0 sec 57.4 KBytes 470 Kbits/sec 22.281 ms 1876/ 1916 (98%)
[ 3] 7.0- 8.0 sec 48.8 KBytes 400 Kbits/sec 28.154 ms 1593/ 1627 (98%)
[ 3] 8.0- 9.0 sec 56.0 KBytes 459 Kbits/sec 26.905 ms 1874/ 1913 (98%)
[ 3] 9.0-10.0 sec 51.7 KBytes 423 Kbits/sec 27.160 ms 1671/ 1707 (98%)
[ 3] 10.0-11.0 sec 51.7 KBytes 423 Kbits/sec 21.963 ms 747/ 783 (95%)
[ 3] 11.0-12.0 sec 60.3 KBytes 494 Kbits/sec 13.801 ms 631/ 673 (94%)
[ 3] 12.0-13.0 sec 57.4 KBytes 470 Kbits/sec 15.173 ms 625/ 665 (94%)
[ 3] 0.0-13.2 sec 711 KBytes 440 Kbits/sec 17.047 ms 17338/17833 (97%)
/*This is send again*/
multicast join failed: No such device
[ 4] local 224.0.0.1 port 8080 connected with 192.168.3.1 port 47463
[ 4] 0.0- 1.0 sec 54.6 KBytes 447 Kbits/sec 24.254 ms 19/ 57 (33%)
[ 4] 1.0- 2.0 sec 50.2 KBytes 412 Kbits/sec 24.307 ms 1237/ 1272 (97%)
[ 4] 2.0- 3.0 sec 53.1 KBytes 435 Kbits/sec 26.490 ms 1715/ 1752 (98%)
[ 4] 3.0- 4.0 sec 54.6 KBytes 447 Kbits/sec 24.730 ms 1676/ 1714 (98%)
[ 4] 4.0- 5.0 sec 53.1 KBytes 435 Kbits/sec 22.588 ms 1838/ 1875 (98%)
[ 4] 5.0- 6.0 sec 53.1 KBytes 435 Kbits/sec 23.496 ms 1786/ 1823 (98%)
[ 4] 6.0- 7.0 sec 53.1 KBytes 435 Kbits/sec 25.347 ms 1708/ 1745 (98%)
[ 4] 7.0- 8.0 sec 53.1 KBytes 435 Kbits/sec 24.269 ms 1711/ 1748 (98%)
[ 4] 8.0- 9.0 sec 53.1 KBytes 435 Kbits/sec 30.231 ms 1772/ 1809 (98%)
[ 4] 9.0-10.0 sec 54.6 KBytes 447 Kbits/sec 24.565 ms 1741/ 1779 (98%)
[ 4] 10.0-11.0 sec 54.6 KBytes 447 Kbits/sec 20.195 ms 842/ 880 (96%)
[ 4] 11.0-12.0 sec 50.2 KBytes 412 Kbits/sec 18.220 ms 547/ 582 (94%)
[ 4] 12.0-13.0 sec 51.7 KBytes 423 Kbits/sec 18.280 ms 634/ 670 (95%)
[ 4] 0.0-13.3 sec 701 KBytes 433 Kbits/sec 19.081 ms 17345/17833 (97%)
无线UDP组播是否受路由器限制?或者我哪里配置不好。刷了两台路由器后,只修改了192.168.1.1到192.168.3.x,其他没有修改。
解决方案
推荐阅读
- javascript - 在谷歌云功能上写入和读取 json 文件
- javascript - JS - DOM - 访问 SVG 按钮
- opencv - 使用 OpenCV 进行斜角检测
- c# - C# 中的静态结构存储在哪里?
- html - eshop如何连续显示3张以上的图片
- opensuse - pkg-config 无法在 OpenSUSE Leap 15.2 中找到 libmagic 或无法在 Open Suse Leap 15.2 中安装 libmagic
- ios - UIRefreshControl 的 Lottie 动画子视图出现偏离中心
- ios - 如何在 Swift 中合并 4 个以上的数组?
- java - 如果 ArrayList 中的所有对象共享一个公共值,则返回 true
- python - 从现有列表中删除列表