分页: 1 / 2

双网卡bonding配置,实现负载均衡

发表于 : 2006-11-07 17:23
sinoyster
/etc/network/interfaces
auto lo
iface lo inet loopback

iface eth0 inet dhcp
iface eth1 inet dhcp

auto bond0
iface bond0 inet static
address 64.0.177.20
netmask 255.255.255.0
gateway 64.0.177.254
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1

/etc/modules中添加
bonding

发表于 : 2007-01-28 0:01
雕啸长空
当年在windows下搞过三网卡阵列 ,性能所有提 升,不过实在是麻烦,那时就听说linux下多网卡阵列很简便,今天终于得见 :D

Re: 双网卡bonding配置,实现负载均衡

发表于 : 2007-02-02 20:28
mrsteven
sinoyster 写了:/etc/network/interfaces
auto lo
iface lo inet loopback

iface eth0 inet dhcp
iface eth1 inet dhcp

auto bond0
iface bond0 inet static
address 64.0.177.20
netmask 255.255.255.0
gateway 64.0.177.254
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1

/etc/modules中添加
bonding
新建立ubuntu系统,请问

/etc/modules中添加
bonding

这句是要写一个bonding文本文档的意思吗?我的ubuntu系统没有发现/etc/modules这个目录,是否要在/etc/目录建一个modules目录,然后把
auto lo
iface lo inet loopback

iface eth0 inet dhcp
iface eth1 inet dhcp

auto bond0
iface bond0 inet static
address 64.0.177.20
netmask 255.255.255.0
gateway 64.0.177.254
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1

这段代码写入bonding?bonding应存档为什么格式?另外在ubuntu系统下,网卡能象windows xp系统那样编辑传送接收缓存及连网速率、MTU等参数吗?请指教一下ubuntu系统下网卡可以做些什么优化加速的设置,比如象cfosspeed
http://www.cfos.de/beta/


谢谢。

Re: 双网卡bonding配置,实现负载均衡

发表于 : 2007-02-05 23:05
mrsteven
sinoyster 写了:/etc/network/interfaces
auto lo
iface lo inet loopback

iface eth0 inet dhcp
iface eth1 inet dhcp

auto bond0
iface bond0 inet static
address 64.0.177.20
netmask 255.255.255.0
gateway 64.0.177.254
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1

/etc/modules中添加
bonding
在modules文档末添加bonding,重新启动电脑,不能上互联网,删除bonding则可上互联网,请问应如何配置才能开启双网卡bonding实现负载均衡?如果是三块以上的网卡配置有否不同?谢谢。

发表于 : 2007-02-09 0:30
icyleaf1026
没人回这个贴吗??

发表于 : 2007-03-15 15:04
sinoyster
/etc/modules是文件,里面加个bonding就可以了

/etc/network/interfaces
auto lo
iface lo inet loopback

iface eth0 inet dhcp
iface eth1 inet dhcp

auto bond0
iface bond0 inet static
address 64.0.177.20
netmask 255.255.255.0
gateway 64.0.177.254
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1
上面这一段是在/etc/network/interfaces里面做修改的

发表于 : 2007-05-09 13:14
Jennal
重点是这段吧?
auto bond0
iface bond0 inet static
address 64.0.177.20
netmask 255.255.255.0
gateway 64.0.177.254
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1
不过不是很明白,能不能解释一下每一句的意思?是通用的吗?

发表于 : 2007-05-09 13:55
Jennal
按照楼主的设置不行阿。。。
Failed to bring up bond0.
发现是没有装ifenslave
sudo apt-get install ifenslave-2.6
然后出现跟楼上兄弟一样的情况。。。不能上网。。。去掉bonding就行了

发表于 : 2007-07-16 14:57
loesprite
这个技术很有吸引力,关注中!

发表于 : 2007-07-28 18:46
蓝蓝
速度很快么?

解决DNS

发表于 : 2007-08-06 11:01
gzprof
不能上网是没有解决DNS问题

auto lo
iface lo inet loopback

iface eth0 inet dhcp
iface eth1 inet dhcp
iface bond0 inet dhcp
#iface bond0 inet static
#address 64.0.177.20
#netmask 255.255.255.0
#gateway 64.0.177.254
#nameserver …… ……

auto bond0
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1
在DHCP情况下不用设置DNS,静态IP地址就必须设置nameserver,例如
nameserver 202.96.128.68 202.96.134.133

静态IP地址情况下设置

发表于 : 2007-08-06 11:03
gzprof
auto lo
iface lo inet loopback

iface eth0 inet static
address 172.16.1.149
netmask 255.255.255.0
gateway 172.16.1.11
iface eth1 inet static
address 172.16.1.146
netmask 255.255.255.0
gateway 172.16.1.11

iface bond0 inet static
address 172.16.1.149
netmask 255.255.255.0
gateway 172.16.1.11
nameserver 202.96.128.68 202.96.134.133

auto bond0
up ifenslave bond0 eth0 eth1
down ifenslave -d bond0 eth0 eth1

如果DNS没有问题就是路由问题

发表于 : 2007-08-07 13:24
gzprof
route add default gw 172.16.1.11 -dev bond0
这样内外网络应该可以访问了。

发表于 : 2007-08-19 9:39
euking
关注一下!

发表于 : 2007-09-09 13:47
狼牧
lz应该说一下为什么要这么做,让我等新手也能明白这样做的好处。