bonding mode 4 测试
mode 4 定义
IEEE 802.3ad Dynamic link aggregation. Createsaggregation groups that share the same speed andduplex settings. Utilizes all slaves in the activeaggregator according to the 802.3ad specification.Slave selection for outgoing traffic is done accordingto the transmit hash policy, which may be changed fromthe default simple XOR policy via the xmit_hash_policyoption, documented below. Note that not all transmitpolicies may be 802.3ad compliant, particularly inregards to the packet mis-ordering requirements ofsection 43.2.4 of the 802.3ad standard. Differingpeer implementations will have varying tolerances fornoncompliance.Prerequisites:1. Ethtool support in the base drivers for retrievingthe speed and duplex of each slave.2. A switch that supports IEEE 802.3ad Dynamic linkaggregation.Most switches will require some type of configurationto enable 802.3ad mode.
配置方法
eth0
DEVICE=eth0
IPV6INIT=no
MTU=1500
NM_CONTROLLED=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
eth1
DEVICE=eth1
IPV6INIT=no
MTU=1500
NM_CONTROLLED=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
bond0 [注, rhel6, rhel7 中, bonding 模式需要在该配置文件中进行指定]
由于当前用于 docker container , 因此用到 openvswitch 作为容器之间的网络转换
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
BONDING_MASTER=yes
BONDING_OPTS="miimon=100 mode=4 lacp_rate=fast xmit_hash_policy=layer2+3"
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=vlanbr0
bond0.vlan
DEVICE=bond0.vlan
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=x.x.x.x
NETMASK=255.255.255.0
GATEWAY=x.x.x.x
VLAN=yes
/etc/modprobe.d/bond.conf [切记配置改文件, 否则会有问题]
alias bond0 bonding
测试
iperf server :[容器] x.x.x.95容器 (4b085ae77152) [宿主机位置, x.x.x.192 ]iperf client: [物理机]x.x.x.182 x.x.x.183 x.x.x.184 x.x.x.185
测试结果:
当前网络通道有 eth0, eth1 (1000M)
多个主机并发访问, 可以同时利用 eth0, eth1 进行网络通讯
假设在多个主机并发访问容器时候, 可能会出现, 其中一个主机独享eth0, 而其他主机在共享 eth1,
mode 4 没有负载均衡功能, 由接收方进行 hash 确定数据由那个通道进行通讯
测试过程
启动 iperf server:
[root@xxxx ~]# docker exec 4b085ae77152 /usr/bin/iperf -s -p 2345
连接 iperf server:
iperf -c x.x.x.95 -p 2345
单主机连接
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.182 port 28680
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 28830
[ 5] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec
两次独立测试, 连接带宽最大 937Mbits/sec, 只使用到一个[随机]网卡流量
两台主机连接容器测试,
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.182 port 28928
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 45644
[ 4] 0.0-10.0 sec 979 MBytes 818 Mbits/sec
[ 5] 0.0-10.0 sec 288 MBytes 241 Mbits/sec <- 共 1000M
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.182 port 29070
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.183 port 45762
[ 6] 0.0-10.0 sec 935 MBytes 781 Mbits/sec
[ 4] 0.0-10.0 sec 367 MBytes 307 Mbits/sec <- 共 1000M
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.184 port 4054
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.183 port 45854
[ 5] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 共 2000M
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.184 port 4524
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.183 port 45914
[ 6] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 共 2000M
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 46148
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 6406
[ 5] 0.0-10.0 sec 968 MBytes 808 Mbits/sec
[ 4] 0.0-10.0 sec 444 MBytes 372 Mbits/sec <- 共 1000M
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.183 port 46210
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 6878
[ 6] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 共 2000M
连接时候, iperf client 会随机选择通道, 因此, 双机并发连接时候, 流量为 1000 ~ 2000 Mibits/sec
三台主机同时连接
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.185 port 26094
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 24020
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.183 port 48464
[ 5] 0.0-10.0 sec 949 MBytes 793 Mbits/sec
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 6] 0.0-10.0 sec 384 MBytes 321 Mbits/sec
[ 7] local 10.197.244.95 port 2345 connected with x.x.x.185 port 26648
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 24928
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 48596
[ 7] 0.0-10.0 sec 941 MBytes 786 Mbits/sec
[ 4] 0.0-10.0 sec 246 MBytes 206 Mbits/sec
[ 5] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.185 port 27116
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 25706
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 48692
[ 6] 0.0-10.0 sec 960 MBytes 802 Mbits/sec
[ 4] 0.0-10.0 sec 215 MBytes 180 Mbits/sec
[ 5] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 7] local 10.197.244.95 port 2345 connected with x.x.x.185 port 27606
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 26558
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 48810
[ 7] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 4] 0.0-10.0 sec 942 MBytes 786 Mbits/sec
[ 5] 0.0-10.0 sec 239 MBytes 200 Mbits/sec
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.186 port 4406
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 28322
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.182 port 33646
[ 6] 0.0-10.0 sec 979 MBytes 819 Mbits/sec
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 5] 0.0-10.0 sec 328 MBytes 275 Mbits/sec
三台主机同时连接, 流量为 1000 ~ 2000 Mibits/sec
[ 明显地, 在共享同一网络通道的两个 CLIENT 的流量并不平均 ]
四台主机测试
[ 7] local 10.197.244.95 port 2345 connected with x.x.x.185 port 29964
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 30564
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 49332
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.182 port 34068
[ 7] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 4] 0.0-10.1 sec 563 MBytes 469 Mbits/sec
[ 5] 0.0-10.0 sec 194 MBytes 163 Mbits/sec
[ 6] 0.0-10.0 sec 482 MBytes 404 Mbits/sec
[ 8] local 10.197.244.95 port 2345 connected with x.x.x.185 port 30360
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 31230
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 49422
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.182 port 34194
[ 8] 0.0-10.1 sec 709 MBytes 591 Mbits/sec
[ 4] 0.0-10.0 sec 206 MBytes 173 Mbits/sec
[ 5] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 6] 0.0-10.0 sec 377 MBytes 316 Mbits/sec
[ 7] local 10.197.244.95 port 2345 connected with x.x.x.185 port 30682
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.184 port 31774
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.183 port 49500
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.182 port 34280
[ 7] 0.0-10.1 sec 568 MBytes 472 Mbits/sec
[ 4] 0.0-10.0 sec 157 MBytes 131 Mbits/sec
[ 5] 0.0-10.0 sec 518 MBytes 434 Mbits/sec
[ 6] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 8] local 10.197.244.95 port 2345 connected with x.x.x.182 port 34408
[ 4] local 10.197.244.95 port 2345 connected with x.x.x.183 port 49794
[ 5] local 10.197.244.95 port 2345 connected with x.x.x.184 port 32418
[ 6] local 10.197.244.95 port 2345 connected with x.x.x.185 port 31080
[ 8] 0.0-10.1 sec 622 MBytes 518 Mbits/sec
[ 4] 0.0-10.0 sec 1.09 GBytes 937 Mbits/sec <- 独享 1000M
[ 5] 0.0-10.0 sec 173 MBytes 144 Mbits/sec
[ 6] 0.0-10.0 sec 491 MBytes 411 Mbits/sec
四台主机同时连接, 流量为 1000 ~ 2000 Mibits/sec
[ 明显地, 三台主机在同一通道, 而另外一个主机独享流量] 即, 没有负载均衡功能
bonding mode 4 测试相关推荐
- 英特尔核显驱动hd630_跳票数年,英特尔10nm终现身:重新定义晶体管架构,性能提升超15%...
SuperFin是英特尔10nm最大的亮点,它是FinFET结构的升级版.英特尔将增强型FinFET晶体.Super MIM(金属-绝缘体-金属)电容器相结合,打造了全新的SuperFin,能够提供增 ...
- Linux基础命令-网络配置和相关命令
Linux基础命令-网络配置和相关命令 网络配置和相关命令 一.基本网络配置 二.网卡名称 1. 网卡别名 2. 设备别名 3. 实验 三.网络配置方式 1. ifconfig命令 2. route命 ...
- linux bonding 测试,Linux 双网卡bonding测试
原文:http://www.cnblogs.com/killkill/archive/2009/02/15/1390717.html 先介绍一下情况,服务器A和服务器B都是CentOS 4.6的系统, ...
- Linux 双网卡绑定测试
Linux 双网卡绑定测试 先介绍一下情况,服务器A和服务器B都是CentOS 4.6的系统,现在要做HA Cluster,为了避免裂脑的发生,要提高心跳链路的可靠性,下图是现时的连接情况,服务器A的 ...
- Linux下双网卡绑定(bonding技术)
Linux网卡绑定探析 2013-08-20 15:39:31 现在很多服务器都自带双千兆网口,利用网卡绑定既能增加网络带宽,同时又能做相应的冗余,目前应用于很多的场景.linux操作系统下自带的网卡 ...
- 这安全测试的面试题目也太简单了吧,分分钟入职成功
看看这些面试题目,目的是了解安全测试的基本概念.每一道题目都可以展开到一定的深度和广度. 这里仅仅是一个抛砖引玉,点到为止. Question 1. 什么是安全测试(Security Testing) ...
- linux 双网卡绑定(bonding)实现负载均衡或故障转移
linux 双网卡绑定(bonding)实现负载均衡或故障转移 我们在这介绍的Linux双网卡绑定实现就是使用两块网卡虚拟成为一块网卡,这个聚合起来的设备看起来是一个单独的以太网接口设备,通俗点讲就是 ...
- linux网卡顺序问题,linux网卡绑定及网卡顺序变更测试.docx
Linux网卡顺序变更导致网卡绑定出错及解决办法测试 2012/2/21 描述:linux中新安装网卡会导致原网卡识别顺序紊乱,影响网络及网卡绑定正常工作,此时可以更改/etc/sysconfig/n ...
- F-Stack实现UDP服务端、客户端,并进行吞吐量测试的实现
Table of Contents 怎么个加速法? 我的网络拓扑 开始编码 服务端 server.c common.h Makefile 配置文件server.ini 客户端代码 client.c c ...
最新文章
- 在ASP.NET MVC下实现树形导航菜单
- DeepLearning索引
- python | 三种可变参数简述
- P3577-[POI2014]TUR-Tourism【状压dp】
- ×××网络连接安全性以及协议支持介绍
- c语言 给结构体赋初值,c/c++ 结构体赋初值的小技巧
- 一些常用的字符串方法
- Navicat获取注册码
- 用XOM编写GraphML?
- zool网关多个组件配置路由
- 手指静脉图像分类识别
- 编译内核报错 bison not found
- flash的计算机知识,初中信息技术FLASH基础知识.ppt
- Shadowing Japanese 中上 Unit 4
- Type-C接口原理图,附引脚说明
- TensorFlow错误:fatal error: tensorflow/core/framework/op.h: 没有那个文件或目录(PointCNN遇到的错误)
- 程序员专用经典语录—看完笑一阵可以,千万不要死循环哦!
- IDM 下载工具利器 – 经典好用优秀的 Windows 多线程加速下载软件
- linux跑火车的命令sl
- 【笔记】excel做累计到天的销售公式匹配原理
热门文章
- IntelliJ IDEA 详细中文教程
- 【Hudi】数据湖Hudi核心概念与架构设计总结
- 集训第一周 Linux
- @Valid的用法详解
- 全球防护情报平台行业调研及趋势分析报告
- 彻底关闭Windows10_21h1任务栏里的资讯和兴趣广告
- Android4.4 wifi代理流程
- 服务器僵尸猪人刷怪塔怎么制作,我的世界僵尸猪人刷怪塔制作思路 猪人塔介绍...
- 教室灯光也会“随机应变”?涂鸦商用照明,点亮孩子们的“光明未来”!
- 群主发普通红包.007