centos7做bond0
注:bond0为轮询策略,不需要交换机端口做配置
bond1为主备策略,不需要交换机端口做配置
bond4为聚合策略,需要交换机端口做聚合配置
cat >/etc/sysconfig/network-scripts/ifcfg-bond0<< EOF_bond0 NAME=bond0 DEVICE=bond0 TYPE=Bond ONBOOT=yes BOOTPROTO=static IPADDR=10.1.14.96 NETMASK=255.255.255.0 GATEWAY=10.1.14.254 NM_CONTROLLED=no USERCTL=no BONDING_OPTS="mode=0 miimon=100" EOF_bond0 cat >/etc/sysconfig/network-scripts/ifcfg-eno1<< EOF_eno1 TYPE=Ethernet BOOTPROTO=none NAME=eno1 DEVICE=eno1 ONBOOT=yes MASTER=bond0 SLAVE=yes NM_CONTROLLED=no USERCTL=no EOF_eno1 cat >/etc/sysconfig/network-scripts/ifcfg-eno2 <<EOF_eno2 TYPE=Ethernet BOOTPROTO=none NAME=eno2 DEVICE=eno2 ONBOOT=yes MASTER=bond0 SLAVE=yes NM_CONTROLLED=no USERCTL=no EOF_eno2 systemctl enable network --now;systemctl disable NetworkManager --now; systemctl stop network;systemctl start network
#验证 cat /proc/net/bonding/bond0