快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

Ubuntu下的多网卡负载均衡

    自己家里其实用不到这么强悍的配置,不过既然主板自带两个r8168网卡,那闲着也是闲着,干脆还是配置起来。

    在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,重启一下,让网卡负载均衡功能启用。就这么简单了。

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论