系統:Ubuntu16.04 網卡:em1 em2 ip:192.168.0.46
sudo apt-get install ifenslave echo "bonding" >>/etc/modules
網卡綁定配置:vim
auto bond0 iface bond0 inet static address 192.168.0.46 netmask 255.255.255.0 bond-slaves none bond-mode active-backup bond-miimon 100 auto eno1 iface eno1 inet manual bond-master bond0 bond-primary eno1 eno2 auto eno2 iface eno2 inet manual bond-master bond0 bond-primary eno1 eno2
配置完成後重啓網卡(若是重啓不生效,請重啓服務器):bash
/etc/init.d/networking restart
ifconfig 查看配置是否生效:服務器