日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用 Iperf 测试软路由性能

發布時間:2023/12/20 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用 Iperf 测试软路由性能 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

  • 目標
  • Iperf
    • 官網
    • 版本
    • 軟件安裝
    • 命令行幫助信息
  • 測試方案
    • 拓撲
    • 打開ulimit
    • 服務器端命令
    • 客戶端命令
      • 裸機包轉發速率測試
      • 限制網絡速度/IP 效果測試
      • 限制 連接數/IP 效果測試

目標

有 openwrt、pfsense、ikuai、routeros 等4個軟路由,希望通過iperf工具對他們的純包轉發速率、帶寬限制/IP、連接數限制/IP 效果進行比對。

Iperf

Iperf 是網絡測速工具。官網地址: https://github.com/esnet/iperf

官網

https://github.com/esnet/iperf

版本

有iperf 和iperf3 兩個版本,因為iperf3 限制客戶端最大連接數128,所以這里選擇使用iperf。

軟件安裝

sudo apt install iperf

命令行幫助信息

Usage: iperf [-s|-c host] [options]iperf [-h|--help] [-v|--version]Client/Server:-b, --bandwidth #[kmgKMG | pps] bandwidth to send at in bits/sec or packets per second-e, --enhancedreports use enhanced reporting giving more tcp/udp and traffic information-f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes-i, --interval # seconds between periodic bandwidth reports-l, --len #[kmKM] length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)-o, --output <filename> output the report or error message to this specified file-p, --port # server port to listen on/connect to-u, --udp use UDP rather than TCP--udp-counters-64bit use 64 bit sequence numbers with UDP-w, --window #[KM] TCP window size (socket buffer size)-z, --realtime request realtime scheduler-B, --bind <host>[:<port>][%<dev>] bind to <host>, ip addr (including multicast address) and optional port and device-C, --compatibility for use with older versions does not sent extra msgs-M, --mss # set TCP maximum segment size (MTU - 40 bytes)-N, --nodelay set TCP no delay, disabling Nagle's Algorithm-S, --tos # set the socket's IP_TOS (byte) fieldServer specific:-s, --server run in server mode-t, --time # time in seconds to listen for new connections as well as to receive traffic (default not set)--udp-histogram #,# enable UDP latency histogram(s) with bin width and count, e.g. 1,1000=1(ms),1000(bins)-B, --bind <ip>[%<dev>] bind to multicast address and optional device-H, --ssm-host <ip> set the SSM source, use with -B for (S,G) -U, --single_udp run in single threaded UDP mode-D, --daemon run the server as a daemon-V, --ipv6_domain Enable IPv6 reception by setting the domain and socket to AF_INET6 (Can receive on both IPv4 and IPv6)Client specific:-c, --client <host> run in client mode, connecting to <host>-d, --dualtest Do a bidirectional test simultaneously--ipg set the the interpacket gap (milliseconds) for packets within an isochronous frame--isochronous <frames-per-second>:<mean>,<stddev> send traffic in bursts (frames - emulate video traffic)-n, --num #[kmgKMG] number of bytes to transmit (instead of -t)-r, --tradeoff Do a bidirectional test individually-t, --time # time in seconds to transmit for (default 10 secs)-B, --bind [<ip> | <ip:port>] bind ip (and optional port) from which to source traffic-F, --fileinput <name> input the data to be transmitted from a file-I, --stdin input the data to be transmitted from stdin-L, --listenport # port to receive bidirectional tests back on-P, --parallel # number of parallel client threads to run-R, --reverse reverse the test (client receives, server sends)-T, --ttl # time-to-live, for multicast (default 1)-V, --ipv6_domain Set the domain to IPv6 (send packets over IPv6)-X, --peer-detect perform server version detection and version exchange-Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only)Miscellaneous:-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports-y, --reportstyle C report as a Comma-Separated Values-h, --help print this message and quit-v, --version print version information and quit[kmgKMG] Indicates options that support a k,m,g,K,M or G suffix Lowercase format characters are 10^3 based and uppercase are 2^n based (e.g. 1k = 1000, 1K = 1024, 1m = 1,000,000 and 1M = 1,048,576)The TCP window size option can be set by the environment variable TCP_WINDOW_SIZE. Most other options can be set by an environment variable IPERF_<long option name>, such as IPERF_BANDWIDTH.Source at <http://sourceforge.net/projects/iperf2/> Report bugs to <iperf-users@lists.sourceforge.net>

測試方案

因為我們的目標是比較各軟路由的性能,所以只需要關注端口、連接數、數據發送的大小、數據發送的時間等參數即可,TCP\UDP的其他參數,Linux內核的參數等均不在此次測試的范圍內。

拓撲

為排除其他干擾,在單獨的交換機上搭建以下服務。

Ubuntu-server(iperf 服務端) --WAN–軟路由–LAN-- Ubuntu-server(iperf 客戶端)

打開ulimit

對于linux來講,打開連接就是打開文件,此時需要將測試用戶(root)的文件打開數限制打開,服務器和客戶端都要打開。

ulimit -n 10000

服務器端命令

iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 128 KByte (default) ------------------------------------------------------------

客戶端命令

# 單連接連續測試120秒 iperf -c x.x.x.x -t 120 # 100 連接連續測試120秒 iperf -c x.x.x.x -t 120 -P 100 # 1000 連接連續測試120秒 iperf -c x.x.x.x -t 120 -P 1000 # 2000 連接連續測試120秒 iperf -c x.x.x.x -t 120 -P 2000 # 根據服務器性能將連接數最高加到1W

裸機包轉發速率測試

以上軟路由主要依賴內核的包過濾功能進行數據轉發,網絡策略越復雜,對性能的影響越大。我們首先清空4種路由器的網絡策略,使用空白的策略進行包轉發測試。

限制網絡速度/IP 效果測試

限制 連接數/IP 效果測試

總結

以上是生活随笔為你收集整理的使用 Iperf 测试软路由性能的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产8区 | 天天操狠狠操 | 日本高清有码 | 国产主播喷水 | 国产精品毛片 | 天堂精品一区二区三区 | 色综合999| 婷婷99 | 波多野结衣视频免费 | 9i看片成人免费看片 | 秘密爱大尺度做爰呻吟 | 亚洲精品久久久蜜桃 | 极品少妇一区二区三区 | 亚洲国产精品成人av | 成人 黄 色 免费播放 | 狠狠久| 韩国午夜av | 欧美色悠悠 | 久操福利视频 | 欧美一区二区在线免费观看 | 成人激情文学 | 亚洲无毛视频 | 爱爱动态图 | 久久成人午夜 | 亚洲色图五月天 | 大尺度做爰呻吟舌吻网站 | 久久久国产高清 | 国产一区二区毛片 | 久久国产热视频 | 97香蕉 | 男人天堂你懂的 | 日本一区二区三区免费视频 | 免费福利视频在线观看 | 日韩av中文字幕在线 | 黄色av免费在线观看 | 亚洲精品视频久久久 | 久热伊人 | 色婷婷综合久久久久中文字幕 | 精品久久久久久亚洲精品 | 日韩精品视频在线观看免费 | 潮喷失禁大喷水aⅴ无码 | 国产精品三级在线观看无码 | 成人激情文学 | 日b视频免费 | 精品一区二区久久久久久久网站 | 中国女人做爰视频 | av高清在线免费观看 | 中文字幕av免费在线观看 | 波多野结衣50连登视频 | 亚洲日本黄色 | 少妇太爽了在线观看 | 在线视频播放大全 | 男人天堂tv | 成人v片| 熟女性饥渴一区二区三区 | 日韩精品久久久久久久酒店 | 亚洲区欧美 | 日皮在线观看 | 男女网站视频 | 99国产在线视频 | 欧美极品第一页 | jzz在线观看 | 日韩在线欧美 | 国产精品激情偷乱一区二区∴ | 亚洲美女在线播放 | 白白色视频在线 | 四虎在线观看视频 | 久久99精品国产 | 日韩福利视频导航 | 亚洲av无码国产精品麻豆天美 | 久久人人添人人爽添人人片 | 无人在线观看高清视频 | 超碰成人免费电影 | 免费看a| 日本欧美中文字幕 | 日本在线观看 | 黄色小视频免费观看 | 国产一级黄色片子 | 欧美激情国产在线 | 一区二区在线不卡 | 久久综合区 | 能在线观看的av | 国产精品视频全国免费观看 | 日韩午夜激情电影 | 精品毛片一区二区三区 | 变态 另类 国产 亚洲 | 欧美视频在线一区二区三区 | 老熟妇仑乱视频一区二区 | 免费在线h | 人人妻人人做人人爽 | 中国videosex高潮hd | 一道本在线观看 | 丁香花在线影院观看在线播放 | 成人拍拍拍 | 可以免费看的av毛片 | 国产白浆在线观看 | 少妇久久精品 | 国产18在线观看 | 91麻豆精品一区二区三区 |