前面一篇讲解了Ubuntu14.04双网卡主备配置,没成想变化总是这么快,今日安装某软件,提示最匹配的Ubuntu版本是16.04,作为一个码农能有什么办法,只能不断去适应变化、拥抱变化。
首先16.04的安装与14.04大致相同,个别地方稍有区别,如时区的选择以及默认软件的安装等,安装时需要注意。而且16.04的网卡名称比较怪异,同样需要注意。
其双网卡主备配置方式也基本与14.04相同,唯一的区别在/etc/network/interfaces中,现在假设两块网卡的名称分别为enp130s0f0和enp130s0f1,则需要向/etc/network/interfaces文件中添加以下信息:
autoenp130s0f0ifaceenp130s0f0inetmanualbond-masterbond0autoenp130s0f1ifaceenp130s0f1inetmanualbond-masterbond0autobond0ifacebond0inetstaticaddress 172.17.0.101netmask 255.255.255.0gateway 172.17.0.254dns-nameservers 114.114.114.114bond-slavesenp130s0f0enp130s0f1bond-lacp-rate 1
bond-mode 1
bond-miimon 100并且不需要再向/etc/modules中写入内容。重启服务器后即可,其他不变。
文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/220035.html<

