如何在Ubuntu下实现多个无线网卡的负载平衡(带宽加倍)?
发表于 : 2010-05-10 17:34
各位大大,不知哪位有经验在Ubuntu下尝试过多个无线网卡的负载平衡(带宽加倍)?自己是新手,UB9.10,kernel2.6.31,自己也google了,wiki了,也找了不少资料,但好像多是有线网络的,如下面的方法,好像不太适用无线网卡,哪位能指导一下,不胜感激,非常感谢!
双网卡bonding(聚合),实现负载均衡
1.先安装ifenslave:
sudo apt-get install ifenslave
2.在/etc/modules中添加一行:bonding
然后修改/etc/modprobe.d/arch/<arch> 文件,如果是32位的系统,是i386,如果是64位Intel系统,是x86_64。
加入以下内容:
alias bond0 bonding
options bond0 mode=balance-alb miimon=100 max_bonds=2
3.修改/etc/network/interfaces,将eth0和eth1改为DHCP以及增加bond0设备:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet dhcp
auto bond0
iface bond0 inet static
address 192.168.10.139
netmask 255.255.255.0
gateway 192.168.10.176
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1
4.重启计算机,之后bond0、eth0、eth1的MAC地址均会变成原来eth0的MAC。
5.如果要加多个IP,可用ifconfig bond0:0 ipaddress来增加。
双网卡bonding(聚合),实现负载均衡
1.先安装ifenslave:
sudo apt-get install ifenslave
2.在/etc/modules中添加一行:bonding
然后修改/etc/modprobe.d/arch/<arch> 文件,如果是32位的系统,是i386,如果是64位Intel系统,是x86_64。
加入以下内容:
alias bond0 bonding
options bond0 mode=balance-alb miimon=100 max_bonds=2
3.修改/etc/network/interfaces,将eth0和eth1改为DHCP以及增加bond0设备:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet dhcp
auto bond0
iface bond0 inet static
address 192.168.10.139
netmask 255.255.255.0
gateway 192.168.10.176
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1
4.重启计算机,之后bond0、eth0、eth1的MAC地址均会变成原来eth0的MAC。
5.如果要加多个IP,可用ifconfig bond0:0 ipaddress来增加。