bingoohuang/blog

iPerf3局域网测速

Opened this issue · 2 comments

  1. 官网下载CentOS 64 Iperf3
  2. 上传服务器 bssh scp -H root18 ~/Downloads/iperf* r:bingoohuang/bssh scp -H root182 ~/Downloads/iperf* r:bingoohuang/
  3. 分别安装
    [root@fs18 bingoohuang]# rpm -ivh iperf3-3.1.3-1.fc24.x86_64.rpm
    准备中...                          ################################# [100%]
    正在升级/安装...
       1:iperf3-3.1.3-1.fc24              ################################# [100%]
    [root@fs18 bingoohuang]# iperf3
    iperf3: parameter error - must either be a client (-c) or server (-s)
  4. 开始测速

服务端:

[root@fs18 bingoohuang]# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.1.182, port 35166
[  5] local 192.168.126.18 port 5201 connected to 192.168.1.182 port 35168
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec   108 MBytes   905 Mbits/sec
[  5]   1.00-2.00   sec   112 MBytes   938 Mbits/sec
[  5]   2.00-3.00   sec   111 MBytes   932 Mbits/sec
[  5]   3.00-4.00   sec   110 MBytes   924 Mbits/sec
[  5]   4.00-5.00   sec   112 MBytes   939 Mbits/sec
[  5]   5.00-6.00   sec   111 MBytes   934 Mbits/sec
[  5]   6.00-7.00   sec   112 MBytes   936 Mbits/sec
[  5]   7.00-8.00   sec   111 MBytes   935 Mbits/sec
[  5]   8.00-9.00   sec   112 MBytes   941 Mbits/sec
[  5]   9.00-10.00  sec   111 MBytes   931 Mbits/sec
[  5]  10.00-10.04  sec  4.24 MBytes   940 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.04  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.04  sec  1.09 GBytes   931 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201

客户端:

[root@fs182 bingoohuang]# iperf3 -c 192.168.1.18
Connecting to host 192.168.1.18, port 5201
[  4] local 192.168.1.182 port 35168 connected to 192.168.1.18 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   114 MBytes   960 Mbits/sec    0    399 KBytes
[  4]   1.00-2.00   sec   112 MBytes   941 Mbits/sec    0    465 KBytes
[  4]   2.00-3.00   sec   111 MBytes   935 Mbits/sec    0    546 KBytes
[  4]   3.00-4.00   sec   111 MBytes   930 Mbits/sec    0    686 KBytes
[  4]   4.00-5.00   sec   112 MBytes   939 Mbits/sec    0    686 KBytes
[  4]   5.00-6.00   sec   111 MBytes   933 Mbits/sec    0    710 KBytes
[  4]   6.00-7.00   sec   112 MBytes   936 Mbits/sec    0    714 KBytes
[  4]   7.00-8.00   sec   111 MBytes   935 Mbits/sec    0    805 KBytes
[  4]   8.00-9.00   sec   112 MBytes   939 Mbits/sec    0    805 KBytes
[  4]   9.00-10.00  sec   111 MBytes   933 Mbits/sec    0    810 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  1.09 GBytes   935 Mbits/sec                  receiver

iperf Done.

从结果中的Bandwidth看来,二者之间是千兆网卡。

GO开发的工具,全面的网络测量和分析工具, ethr,微软出品,测带宽、测连接数、测延迟率、多线程测等。

  • Server: ethr -s
  • Client: ethr -c <server ip>
[footstone@fs03-192-168-1-18 bingoohuang]$ ./ethr -c 192.168.1.182

Ethr: Comprehensive Network Performance Measurement Tool (Version: v1.0.0)
Maintainer: Pankaj Garg (ipankajg @ LinkedIn | GitHub | Gmail | Twitter)

Using destination: 192.168.1.182, ip: 192.168.1.182, port: 8888
[  5] local 192.168.1.18 port 44443 connected to 192.168.1.182 port 8888
- - - - - - - - - - - - - - - - - - - - - - -
[  ID ]   Protocol    Interval      Bits/s
[    5]     TCP      000-001 sec   954.37M
[    5]     TCP      001-002 sec   949.76M
[    5]     TCP      002-003 sec   943.10M
[    5]     TCP      003-004 sec   947.58M
[    5]     TCP      004-005 sec   952.83M
[    5]     TCP      005-006 sec   943.10M
[    5]     TCP      006-007 sec   949.12M
[    5]     TCP      007-008 sec   946.18M
Ethr done, connection terminated.

也很好用啊

udhos/goben

goben is a golang tool to measure TCP/UDP transport layer throughput between hosts.

Start server:

server$ goben
Start client:

client$ goben -hosts 1.1.1.1 ;# 1.1.1.1 is server's address