服务器经常有多个网卡,为了保证网络冗余性,一个网卡出现故障时,不导致网络服务中断,可以懂多网卡网卡绑定来解决此问题。
环境:
系统:Ubuntu16.04
网卡:em1 em2
ip:192.168.0.46
安装ifenslave:
sudo apt-get install ifenslave
echo "bonding" >>/etc/modules

 网卡绑定配置:

vim /etc/network/interfaces
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

配置完成后重启网卡(如果重启不生效,请重启服务器):

/etc/init.d/networking restart

ifconfig 查看配置是否生效:

Ubuntu16.04双网卡绑定

 

相关文章:

  • 2021-04-23
  • 2022-01-08
  • 2021-06-09
  • 2021-11-07
  • 2021-09-14
  • 2021-08-15
  • 2022-03-04
猜你喜欢
  • 2022-12-23
  • 2021-04-07
相关资源
相似解决方案