bonding配置有下面几种方式,业务可供参考:
1)系统配置文件形式(ifcfg-bond0)
[root@h63 ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0        #设备名称
BOOTPROTO=static      #静态IP
ONBOOT=yes          #自动启动
IPADDR=172.16.16.63    #设备绑定的IP
GATEWAY=172.16.23.254       #设备绑定的网关
NETMASK=255.255.248.0    #设备绑定的掩码
TYPE=Ethernet         #设备绑定的类型

编辑需要绑定的网卡:

[root@h63 ~]# vim /etc/sysconfig/network-scripts/ifcfg-em1

DEVICE=em1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0  #绑定后的设备名称
SLAVE=yes
TYPE=Ethernet

[root@h63 ~]# vim /etc/sysconfig/network-scripts/ifcfg-em2

DEVICE=em2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0  #绑定后的设备名称
SLAVE=yes
TYPE=Ethernet

说明:配置网卡时不要填写IP地址和MAC地址

配置加载模式设置:

[root@h63 ~]# vim /etc/modprobe.conf

alias bond0 bonding
options bond0 miimon=100 mode=6

说明:mode是网卡绑定的模式,此处是模式6

也可以在/etc/modprobe.d/下创建一个文件:

[root@h63 ~]# vim /etc/modprobe.d/bond

alias bond0 bonding
options bond0 miimon=100 mode=6

绑定配置完成,重启网络服务

[root@h63 ~]#systemctl restart network

查看网卡绑定的情况:

[root@h63 ~]# cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 78:2b:cb:30:08:03
Slave queue ID: 0

Slave Interface: em2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 78:2b:cb:30:08:05
Slave queue ID: 0

至此,网卡绑定就完成了。

2)通过sysfs配置bonding
添加bond0和bond0
# echo +bond0 > /sys/class/net/bonding_masters
# echo +bond1 > /sys/class/net/bonding_masters
删除bond0
# echo -bond0 > /sys/class/net/bonding_masters
向bond0添加设备
# echo +eth0 > /sys/class/net/bond0/bonding/slaves
删除设备
# echo -eth0 > /sys/class/net/bond0/bonding/slaves
设置bond0参数
#echo balance-alb > /sys/class/net/bond0/bonding/mode
# echo 1000 > /sys/class/net/bond0/bonding/miimon

网卡bonding配置相关推荐

  1. linux下网卡bonding配置

    章节 bonding技术 centos7配置bonding centos6配置bonding 一.bonding技术 bonding(绑定)是一种linux系统下的网卡绑定技术,可以把服务器上n个物理 ...

  2. 网卡bonding模式 - bond0、1、4配置

    网卡bonding简介 网卡绑定就是把多张物理网卡通过软件虚拟成一个虚拟的网卡,配置完毕后,所有的物理网卡的ip和mac将会变成相同的.多网卡同时工作可以提高网络速度,还可以实现网卡的负载均衡.冗余. ...

  3. Oracle 11gR2 RAC 单网卡 转 双网卡绑定 配置步骤

    之前写过一篇双网卡绑定的文章,如下: Oracle RAC 与 网卡绑定 http://blog.csdn.net/tianlesoftware/article/details/6189639 Ora ...

  4. linux redhat配置网卡,Linux_RedHat服务器网卡阵列配置攻略,网卡阵列配置1.修改vi /etc/rc.d/r - phpStudy...

    RedHat服务器网卡阵列配置攻略 网卡阵列配置1.修改vi /etc/rc.d/rc.local文件,增加以下内容(注意这里添加的是eth0.eth1两个网口) 复制代码代码如下: ifenslav ...

  5. Linux 配置网卡、主机名(基础配置、网卡会话配置、网卡绑定配置)

    目录 配置网卡基本信息 通过nmcli命令配置网卡 通过配置网卡文件配置网卡 通过nmtui命令配置网卡 通过nm-connection-editor命令配置网卡 网卡高级配置 配置网络会话 配置网卡 ...

  6. Linux虚拟网卡bond配置

    目录 一.bond概述 1.1.bond的优点 二.bond模式 2.1.mode=0 2.2.mode=1 2.3.mode=2 2.4.mode=3 2.5.mode=4 2.6.mode=5 2 ...

  7. Linux虚拟机网卡bond配置

    文章目录 前言 一.bond概述 1.bond概念 2.bond优点 二.bond模式 1.mode=0 (round-robin) 2.mode=1 (active-backup) 3.mode=2 ...

  8. 网卡bond配置方法

    背景知识 bong可以将多个网卡绑定到一起,可以让两个或多个接口作为一个接口,同时提高带宽,并提供网络链路的冗余,当有其中一块网卡故障的时候,不会中断服务器的业务. 常用的bond模式主要为以下两种: ...

  9. 添加网卡bonding

    添加网卡bonding 1.背景及概述 1.1.背景 当我们在安虚拟机或者使用liunx环境时,存在需要添加网卡或者固定指定ip的场景,比如我们在做组bonding实验时需要添加网卡完成实验. 1.2 ...

  10. Solaris10 for x86网卡替换配置

    Solaris10 for x86网卡替换配置 作者:田逸([email]sery@163.com[/email]) from [url]http://os.51cto.com/art/200706/ ...

最新文章

  1. 2012年欧洲杯德国战车止步四强赛
  2. python3 shell 正则表达式 攫取复杂字符串特定子串
  3. SQL记录-PLSQL异常
  4. 关于 Node.js 应用里使用 winston 进行日志记录的最佳实践
  5. Caffe2 Compilation Error gflags.cc' is being linked both statically and dynamically into this execut
  6. Linux源码安装软件
  7. # 笔记2021-11
  8. 利用git进行word文档的版本管理
  9. HDUOJ 4565 So Easy!
  10. mdadm chuck_面向所有人的Python-Chuck博士提供的14小时免费Python课程
  11. 华为HCNA乱学Round 9:VRRP
  12. 数学建模算法(1)—规划模型及其python实现
  13. 随机函数c语言对打,20165323 学习基础和C语言基础调查
  14. 企业IT管理基础知识巩固系列之(一)路由器
  15. 深度学习GPU选购指南:哪款显卡配得上我的炼丹炉?
  16. Wap Push 源码
  17. OSChina 周二乱弹 ——快晒晒你们公司的圣诞小姐姐啊!
  18. C语言欧界,移动5G套餐出炉了!200GB流量+1000分钟语音,网友:又是套路
  19. 不用微博SDK,直接使用 新浪微博 分享链接进行分享
  20. SpringJDBC之RowMapper通用类

热门文章

  1. 一招解决二级域名下session失效问题
  2. mysql每次update数据,自动更新对应表中时间字段
  3. .7-Vue源码之AST(3)
  4. hammer的初始化及移动端各种滑动
  5. 利用Scrapy爬取拉勾网某职位信息
  6. [置顶] 63行代码完美实现html5 贪吃蛇游戏
  7. gyp安装,及breakpad上的使用方法
  8. selenium+testng+reprotng+ant配置
  9. 轻松搭建Windows8云平台开发环境
  10. Net设计模式实例之享元模式( Flyweight Pattern)(1)