如果节点上有多个网络接口时可以通过bonding将多个网络接口虚拟为一个网络接口,bonding可以提供高可用及负载均衡功能,从而提高节点的网络接口性能及可用性。 1、使用如下命令安装 T01-MON11:~# apt-get install ifenslave-2.6 2、修改网络接口配置文件/etc/network/interfaces。 auto lo iface lo inet loopback auto bond0 iface bond0 inet static address 192.168.0.189 netmask 255.255.0.0 gateway 192.168.1.1 slaves eth0 eth1 ① bond-mode balance-rr ② bond-miimon 100 其中: ① slaves eth0 eth1,说明绑定两个“从网卡”eth0和eth1到bond0逻辑接口,如果要绑定多个网络接口,继续在该行附加网络接口名字即可。 ② bond-mode balance-rr,指定绑定模式为采用Round-robin策略的负载均衡模式,两个网络接口会均匀分担网络负载,另一个常用模式为active-backup,也就是hot standby模式,支持网络接口failover。 如果重新启动网络时出现bonding: Warning:的提示,则需要在/etc/modprobe.d目录下新建名为文件aliases-bond.conf的,并加入如下内容。 alias bond0 bonding (zphj1987) |