[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. zabbix-server端监控MySQL服务

    Zabbix 监控MySQL数据库 为server.zabbix,com 添加服务模块 创建MySQL服务图形 Server.zabbix.com 服务器操作 [root@server ~]# cd ...

  2. HDU 3068 最长回文( Manacher模板题 )

    链接:传送门 思路:Manacher模板题,寻找串中的最长回文子串 /***************************************************************** ...

  3. CVX安装使用

    CVX下载 下载地址 使用手册 Using Gurobi with CVX Using MOSEK with CVX CVX安装 下载压缩文件后解压缩至任意地址,打开matlab,进入解压缩后的地址, ...

  4. 20130910.Windows上安装和配置MongoDB

    官方文档:http://docs.mongodb.org/manual/tutorial/ 1.下载软件 http://www.mongodb.org/downloads 2.解压 解压后进入bin目 ...

  5. [AngularJS]Chapter 3 使用AngularJS构建应用程序

    本章内容提要: 如何布置AngularJS进行快速开发 开启服务器进行测试 使用Karma进行单元测试用例测试 编译压缩AngularJS进行生产 使用Batarang进行Debug 如何简化开发工作 ...

  6. shell如何更改当前工作路径

    转载: http://imysqldba.blog.51cto.com/1222376/616805 shell 脚本执行有三种方法 bash 脚本名 sh 脚本名 chmod +x 脚本名 使用下面 ...

  7. cocos2d_x_03_经常使用类的使用_事件_画图

    一.TextFieldTTF输入框的使用 #pragma mark - 自己定义方法 // 自己定义方法,加入一个 TextField void TextFieldScene::addOneTextF ...

  8. poj2385(dp)

    题目链接:http://poj.org/problem?id=2385 Apple Catching Time Limit: 1000MS   Memory Limit: 65536K Total S ...

  9. 高速排序算法C++实现

    //quick sort //STL中也有现成的高速排序算法.内部实现採用了下面技巧 //1)枢轴的选择採取三数取中的方式 //2)后半段採取循环的方式实现 //3)高速排序与插入排序结合 #incl ...

  10. h5缓存之数据库

    /*======================================================= 函数功能:保存日志到本地数据库 ========================== ...