我无法使用Iperf工具设置双方的带宽。
当我使用命令iperf -c 192.168.1.15 -b 10m -l 32k -w 128k时,会得到以下错误:
--iperf: ignoring extra argument -- 10m
--Can't use packet-oriented mode with these settings.我为什么要犯这个错误?
发布于 2014-11-22 15:02:43
我倾向于相信在带宽指定(即-b 10M -l 32K -w 128K)上,这是您的上限/非上限。我不能测试因为我们不知道你在运行什么版本。Iperf确实区分了比特和字节:
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes不过,您要修改的部分严格来说是K或M:
-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec
(default 1 Mbit/sec, implies -u)
-l, --len #[KM] length of buffer to read or write (default 8 KB)
-w, --window #[KM] TCP window size (socket buffer size)不过,我可以告诉你,让你的版本达到最新版本将使这个问题过时。Iperf版本2.0.5 (2010年7月8日)不区分这些字段中的2种不同类型。
下面是您对我的一个私有服务器使用的精确cli语法。
root@AFP001SRV01:~# iperf -s -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 40974
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0-10.0 sec 550 KBytes 449 Kbits/sec 0.017 ms 0/ 383 (0%)
^C
root@AFP001SRV01:~# root@AFP001SRV01:~# iperf -c 127.0.0.1 -b 10m -l 32k -w 128k
WARNING: option -b implies udp testing
------------------------------------------------------------
Client connecting to 127.0.0.1, UDP port 5001
Sending 32768 byte datagrams
UDP buffer size: 256 KByte (WARNING: requested 128 KByte)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 40542 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 12.0 MBytes 10.0 Mbits/sec
[ 3] Sent 383 datagrams
[ 3] Server Report:
[ 3] 0.0-10.0 sec 550 KBytes 449 Kbits/sec 0.008 ms 0/ 383 (0%)
root@AFP001SRV01:~# 发布于 2015-03-20 05:14:24
如果不使用-u,则需要指定iperf3 UDP“面向数据报”模式。
CLIENT SPECIFIC OPTIONS
-b, --bandwidth n[KM]
set target bandwidth to n bits/sec (default 1 Mbit/sec). This
setting requires UDP (-u).http://manpages.ubuntu.com/manpages/precise/en/man1/iperf.1.html
发布于 2014-07-24 19:37:39
你会得到错误,因为你用的是10米而不是10米。尝试:
iperf -c 192.168.1.15 -b 10M -l 32k -w 128khttps://networkengineering.stackexchange.com/questions/7297
复制相似问题