红联Linux门户
Linux帮助

在Linux下配置网卡负载均衡功能

发布时间:2014-04-03 21:47:19来源:红联作者:tioced
Linux系统中实现多网卡负载均衡,在Windows下配置复杂的网卡负载均衡功能到了Linux下很简单。

先安装ifenslave,要是在Ubuntu下执行一条命令就可以了:

sudo apt-get install ifenslave

再去编辑/etc/modprobe.d/arch/这个文件,32位的是i386,64位Intel的是x86_64。

加上下面两行:

alias bond0 bonding
options bond0 mode=balance-alb miimon=100 max_bonds=2

最后编辑/etc/network/interfaces文件,把eth0,eth1配置注释掉,加上下面的内容:

auto bond0
iface bond0 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eht0 eth1

重新启动,OK了,让网卡负载均衡功能启用。
文章评论

共有 3 条评论

  1. Motor 于 2014-04-05 10:14:42发表:

    正在攒钱中,也在搜寻知识中,这个真的很详细,支持你!

  2. 947950786 于 2014-04-04 14:14:29发表:

    好贴,顶

  3. fs20090130 于 2014-04-04 11:44:43发表:

    好贴,顶一下。