[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# mkdir /tmp/net_bak
[root@localhost network-scripts]# cp ifcfg-*/tmp/net_bak/
[root@localhost network-scripts]# ls /tmp/net_bak/
使用nmcli命令配置bond
创建bond:网卡名称bond0 模式1
root@localhost network-scripts]# nmcli connection add type bond ifname bond0 mode 1
网卡P3P1 加入bond0 .......多网卡更换p3p1
nmcli connection add type bond-slave ifname p3p1 master bond0
查看网卡是否加入
ll /etc/sysconfig/network-scripts/ifcfg-bond-*
如图:
[root@localhost ~]# ll /etc/sysconfig/network-scripts/ifcfg-bond-
-rw-r--r--. 1 root root 189 May 18 06:04 /etc/sysconfig/network-scripts/ifcfg-bond-bond0
-rw-r--r--. 1 root root 121 May 18 03:15 /etc/sysconfig/network-scripts/ifcfg-bond-slave-em1
-rw-r--r--. 1 root root 121 May 18 03:36 /etc/sysconfig/network-scripts/ifcfg-bond-slave-em2
-rw-r--r--. 1 root root 123 May 18 02:50 /etc/sysconfig/network-scripts/ifcfg-bond-slave-p3p1
-rw-r--r--. 1 root root 123 May 18 02:50 /etc/sysconfig/network-scripts/ifcfg-bond-slave-p3p2
说明:em1 em2 p3p1 p3p2 已经加入bond0
........以上配置bond0 配置完成.................
网卡部分
DEVICE=em1
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
em1 em2 p3p1 p3p2 完成上述配置
bond0 配置
DEVICE=bond0
BOOTPROTO=static
NAME=bond0
BONDING_MASTER=yes
TYPE=Bond
NAME=bond0
ONBOOT=yes
IPADDR=10.100.125.9
NETMASK=255.255.255.0
GATEWAY=10.100.125.1
BONDING_OPTS="miimon=100 mode=4"
mode=4 : 说明有4块网卡
原文地址:http://blog.51cto.com/adcit/2118483