# 概念

服务器存在多块网卡时,可以通过bond来实现多块网卡并在一起使用;

# 模式

mode 0:load balancing (round-robin)

Support:需要Switch支持 <H3C5510支持>

负载均衡<IN/OUT>:是

冗余:是

bond MAC: 所有slave MAC相同

工作模式:Transmit packets in sequential order from the first available slave through the last.

mode 1:  fault-tolerance (active-backup)

Support:无

负载均衡<IN/OUT>:否

冗余:是

bond MAC: 所有slave MAC相同

工作模式:同时只有一块网卡被激活,另一块网卡为backup,不工作

active抢夺:否

工作模式:Only one slave in the bond is active.

mode 4: lacp

802.3ad模式是IEEE标准 。

交换机端配置: interface AggregatePort 1 配置聚合口 interface GigabitEthernet 0/23 port-   group 1 mode active 接口下开启lacp

主动模式 interface GigabitEthernet 0/24 port-group 1

mode active

mode 5: transmit load balancing

Support:Ethtool

ingoing:active-backup

outgoing:一块网卡用完,另一块网卡开始

mode 6: adaptive load balancing

IN/OUT:一块网卡用完,另一块网卡开始

这里配置了 bond4 模式 ,交换机开启 lacp, 配置聚合

# 配置

1. 网卡配置

# cat /etc/sysconfig/network-scripts/ifcfg-em1

DEVICE=em1

NAME=em1

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

MASTER=bond4

SLAVE=yes

# cat /etc/sysconfig/network-scripts/ifcfg-em2

DEVICE=em2

NAME=em2

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

MASTER=bond4

SLAVE=yes

# cat /etc/sysconfig/network-scripts/ifcfg-em3

DEVICE=em3

NAME=em3

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

MASTER=bond4

SLAVE=yes

# cat /etc/sysconfig/network-scripts/ifcfg-bond4

DEVICE=bond4

NAME=bond4

TYPE=Bond

BONDING_MASTER=yes

IPADDR=172.16.32.51

GATEWAY=172.16.32.1

NETMASK=255.255.255.0

DNS1=172.16.32.241

DNS2=172.16.32.243

PEERDNS=yes

ONBOOT=yes

BOOTPROTO=static

BONDING_OPTS="mode=802.3ad miimon=100 lacp_rate=fast"

# bonding生效

方法1:重启系统

# bonding状态查看

# cat /proc/net/bonding/bond4

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation

Transmit Hash Policy: layer2 (0)

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

802.3ad info

LACP rate: fast

Min links: 0

Aggregator selection policy (ad_select): stable

Active Aggregator Info:

Aggregator ID: 3

Number of ports: 3

Actor Key: 17

Partner Key: 7985

Partner Mac Address: e4:c2:d1:e5:29:40

Slave Interface: em1

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 44:a8:42:21:87:ec

Aggregator ID: 3

Slave queue ID: 0

Slave Interface: em2

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 44:a8:42:21:87:ed

Aggregator ID: 3

Slave queue ID: 0

Slave Interface: em3

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 44:a8:42:21:87:ee

Aggregator ID: 3

Slave queue ID: 0

2. USB网卡不能加入bonding,不生效

centos7双网卡绑定的更多相关文章

  1. Centos7双网卡绑定配置 bonding

    bonding的七种工作模式: bonding技术提供了七种工作模式,在使用的时候需要指定,每种有各自的优缺点,我们使用的是 mode=4 balance-rr (mode=0) 默认, 有高可用 ( ...

  2. CentOS7双网卡绑定配置

    step1:创建绑定文件 [root@node-1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-bond0 TYPE="bond"BOO ...

  3. Centos7 / RHEL 7 双网卡绑定

    http://www.cnblogs.com/hukey/p/6224969.html 1. 简要    双网卡绑定技术在centos7中使用了teaming技术,而在rhel6/centos7中使用 ...

  4. Centos 7.2 双网卡绑定之踩坑

    线上服务器,安装centos7.2 x64最小化安装,需要做链路聚合,双网卡绑定.在centos 6.x 和 centos 7上测试都OK,于是直接开搞. 说明下,以下环境是在虚拟机中实现的: 系统: ...

  5. cnetos 网卡绑定 eth0+eth1做双网卡绑定到bond0

    1.网卡绑定:eth0+eth1做双网卡绑定到bond0 二.网络配置 网卡绑定1./etc/sysconfig/network-scripts/目录下建立ifcfg-bond0文件,内容如下DEVI ...

  6. Linux下双网卡绑定bond0

    一:原理: linux操作系统下双网卡绑定有七种模式.现在一般的企业都会使用双网卡接入,这样既能添加网络带宽,同时又能做相应的冗余,可以说是好处多多.而一般企业都会使用linux操作系统下自带的网卡绑 ...

  7. Linux 双网卡绑定

    Linux 双网卡绑定 Linux 双网卡绑定双网卡绑定的常用模式:mode1:active-backup 模式,即主备模式.mode0:round-broin 模式,即负载均衡模式(需要交换机配置聚 ...

  8. (转)深度分析Linux下双网卡绑定七种模式

    现在一般的企业都会 使用双网卡接入,这样既能添加网络带宽,同时又能做相应的冗余,可以说是好处多多.而一般企业都会使用linux操作系统下自带的网卡绑定模式,当然现在 网卡产商也会出一些针对window ...

  9. Linux下双网卡绑定(bonding技术)

    Linux网卡绑定探析   2013-08-20 15:39:31 现在很多服务器都自带双千兆网口,利用网卡绑定既能增加网络带宽,同时又能做相应的冗余,目前应用于很多的场景.linux操作系统下自带的 ...

随机推荐

  1. 搭建java环境时,DOS输入java有反应,javac没反应的解决办法。

    2018-11-12 搭java环境踩了许多坑,之前搭环境时在命令台输入java有反应,javac没反应,后来试了很多方法都一样,然后就把java的所有的环境变量都删了,在控制面板里的卸载程序把所有的 ...

  2. 验证码破解 | Selenium模拟登陆微博

    模拟登陆微博相对来说,并不难.验证码是常规的5个随机数字字母的组合,识别起来也比较容易.主要是用到许多Selenium中的知识,如定位标签.输入信息.点击等.如对Selenium的使用并不熟悉,请先移 ...

  3. JS的ES6的Promise

    一.Promise 1.什么是Promise对象:代表未来某个将要发生的事件,一般指的是异步操作. 2.Promise对象 存在的目的:将异步操作以同步的流程表达出来,避免层层嵌套的回调函数(俗称回调 ...

  4. stack的简单用法总结

    stack中常见方法 top():返回一个栈顶元素的引用,类型为 T&.如果栈为空,返回值未定义. push(const T& obj):可以将对象副本压入栈顶.这是通过调用底层容器的 ...

  5. vue-axios interceptors

    import axios from 'axios' import cookie from 'js-cookie' const options = { baseURL: window.location. ...

  6. 状压dp专题复习

    状压dp专题复习 (有些题过于水,我直接跳了) 技巧总结 : 1.矩阵状压上一行的选择情况 \(n * 2^n\) D [BZOJ2734][HNOI2012]集合选数 蒻得不行的我觉得这是一道比较难 ...

  7. docker删除名称为<none>的镜像

    docker rmi $(docker images | awk '/^<none>/ { print $3 }')

  8. 【Node.js】Node.js的调试

    目录结构: contents structure [-] 使用console.log() 使用Chrome DevTools 使用Visual Studio Code 与JavaScript运行在浏览 ...

  9. 【Python】解析Python中的文件操作

    目录结构: contents structure [-] 简介 Python中的文件类型 内置函数的文件操作 open()函数 Mode 创建文本文件 读取文本文件 循环文件对象 关闭文件 With语 ...

  10. iOS App转让、转移、迁移(App transfer) -- 仅需四步

    当需要将某个 App 出售给其他开发人员,或想要将其移至其他 App Store Connect 组织,则您需要转让该 App.您无需将 App 从 App Store 下架,即可将其所有权转让给另一 ...