[root@openldap ~]# ifconfig
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.31.48  netmask 255.255.255.0  broadcast 192.168.31.255
        inet6 fe80::20c:29ff:fe55:5ed3  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:55:5e:d3  txqueuelen 1000  (Ethernet)
        RX packets 4116  bytes 265898 (259.6 KiB)
        RX errors 0  dropped 21  overruns 0  frame 0
        TX packets 83  bytes 11927 (11.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:0c:29:55:5e:d3  txqueuelen 1000  (Ethernet)
        RX packets 828  bytes 52513 (51.2 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 58  bytes 9677 (9.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:0c:29:55:5e:d3  txqueuelen 1000  (Ethernet)
        RX packets 829  bytes 52547 (51.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 166  bytes 14000 (13.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 166  bytes 14000 (13.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[root@openldap ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
BOOTPROTO=static
DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
ONBOOT=yes
IPADDR=192.168.31.48
NETMASK=255.255.255.0
GATEWAY=192.168.31.1
PREFIX=24
BONDING_OPTS="miimon=200 mode=1"
[root@openldap ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=none
DEVICE=eth0
NAME=eth0
BONDING_MASTER=yes
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@openldap ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=none
DEVICE=eth1
NAME=eth1
BONDING_MASTER=yes
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@openldap ~]#
[root@openldap ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 200
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:55:5e:d3
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:55:5e:dd
Slave queue ID: 0
[root@openldap ~]#
[root@openldap ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 200
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:55:5e:d3
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:55:5e:dd
Slave queue ID: 0
[root@openldap ~]#
 

可能会启动失败,bond0的状态不是UP, 查看/var/log/message可看到如下信息

Error: Connection activation failed: Master device bond0 unmanaged or not available for activation
 

需要禁用NetworkManager

 

systemctl stop NetworkManager.service

systemctl disable NetworkManager.service

centos7 bond0 双网卡配置的更多相关文章

  1. CentOS7.3虚拟机双网卡配置

    笔者在学习和工作中经常要用到linux,专门装一个linux主机固然可以,但是毕竟还要用到windows,解决的办法就是用vmware来搭建linux虚拟机.关于linux虚拟机上网的问题,笔者写过很 ...

  2. CentOs7中的网卡配置工具

    CentOs7中的网卡配置工具 摘自:https://blog.51cto.com/13572810/2087991 misslaziness1人评论2715人阅读2018-03-17 22:09:1 ...

  3. centos7下双网卡绑定

    一.进入网卡配置目录 cd /etc/sysconfig/network-scripts 二.备份原有网卡 mv ifcfg-em* /tmp/ 三.配置双网卡 nmcli con add type ...

  4. centos7 搭建双网卡bond1(主备模式)实例

    前景须知: 在redhat6 中网卡叫bond,在redhat7及centos7中改名team,此处只记录centos7中双网卡主备搭建过程. 应用情景:实现网络的高可用,防止一条网线或交换机故障影响 ...

  5. 烂泥:VMWare Workation双网卡配置IP地址

    本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 前几天给一个客户做远程项目实施,客户那边的服务器是Windows OS的,我们这边的业务 ...

  6. Ubuntu16.04双网卡配置,内网外网同时访问

    Ubuntu16.04双网卡配置,内网外网同时访问 配置:vim/etc/network/interface auto lo iface lo inet loopback auto eno1 ifac ...

  7. Centos双网卡配置默认路由

    Centos6.5 双网卡,我们只需要一个默认路由,如果两个都有或都没有会有一系列的问题 [root@centos]# vi /etc/sysconfig/network修改以下内容NETWORKIN ...

  8. windows server 2012 双网卡配置

    别用route 命令!!!!!! 在使用最新版的windows server 2012的时候,当存在两个或者多个网段的时候,就可以采用双网卡的方式来添加和配置路由.具体的设置方法如下: 网段1  19 ...

  9. linux双网卡配置

    一.VM虚拟机添加一个网络适配器. 选择自己需要的模式类型 二.启动虚拟机,配置网卡 按原先配置网卡的方式配置完(ip地址及默认网关还有网卡名不能跟原先的一样) 重启所有网卡(service netw ...

随机推荐

  1. JS判断客户端是否是iOS或者Android或者ipad(三)

     *  * @function: 判断浏览器类型是否是Safari.Firefox.ie.chrome浏览器  * @return: true或false  *  */ function isSafa ...

  2. Unity5.X 开发资源介绍

    Asset 资源 Category 类别 Publisher 开发商 Rating 评级 Version 版本号   Windows → Asset Store 资源商店 [Ctrl + 9]   U ...

  3. javascript编程风格(粗略笔记)

    1.空格 紧凑型: project.MyClass = function(arg1, arg2){ 松散型: for( i = 0; i < length; i++ ){ 2.代码行长度 最多8 ...

  4. Vue学习之路第一篇(学习准备)

    1.开发工具的选择 这个和个人的开发习惯有关,并不做强求,厉害的话用记事本也可以.但是我还是建议用人气比较高的编辑工具,毕竟功能比较全面,开发起来效率比较高. 我之前写前端一直用的是sublimete ...

  5. [USACO18FEB] Snow Boots G (离线+并查集)

    题目大意:略 网上各种神仙做法,本蒟蒻只想了一个离线+并查集的做法 对所有靴子按最大能踩的深度从大到小排序,再把所有地砖按照积雪深度从大到小排序 一个小贪心思想,我们肯定是在 连续不能踩的地砖之前 的 ...

  6. [USACO15DEC]最大流Max Flow

    树剖LCA+树上差分. 树上差分的基本操作. #include <queue> #include <iostream> #include <cstdio> usin ...

  7. (七)u-boot2013.01.01 for s5pv210:《u-boot启动流程》

    转载请注明地址:http://blog.csdn.net/zsy2020314/article/details/9824035 1.关于启动流程 1.1 启动阶段分为3个,bl0,bl1,bl2.下面 ...

  8. poj 2663 Tri Tiling (状压dp+多米诺骨牌问题+滚动数组反思)

    本来直接一波状压dpAC的 #include<cstdio> #include<cstring> #include<algorithm> #define REP(i ...

  9. dbgview

    这两天在看一个问题,matlab打不开摄像头,总是报错. 尝试抓包,打印,分析代码,一直没有找出问题,后来用dbgview打印出来调试信息,找到了问题点. 不得不说,这个工具真不错,以前从来不知道. ...

  10. JavaScript div 上下运动实例

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...