centos7的双网卡绑定
- 关闭NetworkManager
systemcstl stop NetworkManager
systemctl disable NetworkManager
- 修改配置文件
vim ifcfg-bond0
DEVICE=bond0
TYPE=bond
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.100.0.30
NETMASK=255.255.255.0
GATEWAY=10.100.0.254
BONDING_OPTS="mode=1 miion=100"
BONDING_MASTER=yes
vim ifcfg-em1
TYPE=Ethernet
BOOTPROTO=none
DEVICE=em1
MASTER=bond0
SLAVE=yes
ONBOOT=yes
vim ifcfg-em2
TYPE=Ethernet
BOOTPROTO=none
DEVICE=em2
MASTER=bond0
SLAVE=yes
ONBOOT=yes
- 然后再重启网卡
systemctl restart network
- 查看bond0是否配置正常
ifconfig
评论区