cump 回复于:2003-11-24 16:52:33 |
绑定好后,有什么用途? |
cgweb 回复于:2003-11-24 17:04:55 |
多网卡之间实现冗于,增强server网络出口带宽...... |
双眼皮的猪 回复于:2003-11-24 17:12:26 |
好东东....但能不能把冗余的想关link也搞上来...大家也清楚点....??? |
cgweb 回复于:2003-11-24 17:16:49 |
"想关link"指的是什么???? |
双眼皮的猪 回复于:2003-11-24 17:22:23 |
哦,不好意思,相关的link..... |
cgweb 回复于:2003-11-24 17:29:09 |
http://www1.ap.dell.com/content/topics/topic.aspx/ap/topics/power/zhcn/ps1q03_bhutani?c=cn&l=zh&s=lca |
cgweb 回复于:2003-11-25 12:39:02 |
ok |
好好先生 回复于:2003-11-25 12:49:19 |
鼓励原创. |
david5337 回复于:2003-11-25 14:41:44 |
不错,好东西! |
cgweb 回复于:2003-11-25 15:28:10 |
今天试了试在rh9.0 rhas3.0 同样适用. |
dwq123 回复于:2003-11-26 09:58:28 |
好,谢谢楼主,顶 |
zorrozolo 回复于:2003-11-26 13:36:08 |
我在advanced server 2.1 里安你的方法不行 |
cgweb 回复于:2003-11-26 13:52:40 |
说看到那一步不行,屏幕提示信息是什么. |
panlm 回复于:2003-11-26 13:57:57 |
挺 |
真心求教 回复于:2003-11-26 13:58:17 |
:oops: |
真心求教 回复于:2003-11-26 14:02:05 |
:D |
zorrozolo 回复于:2003-11-26 14:06:01 |
可能是os版本问题,我在as3下就行了,在as2下报错 [root@ascluster1 root]# /etc/init.d/network start Setting network parameters: [ OK ] Bringing up interface lo: [ OK ] Bringing up interface bond0: bonding device does not seem to be present, delaying bond0 initialization. [FAILED] Bringing up interface eth0: [ OK ] Bringing up interface eth1: [ OK ] 我是用vmware添加两个网卡试的,as3虽然可以但和主机就ping不通了可能是vmware的问题。但as2可能不能这样配,谢谢。 |
jeffyan 回复于:2003-11-27 23:43:49 |
how to link cable and swich ? |
bb8848 回复于:2003-12-03 18:48:05 |
有個問題,樓主提到可以增加服務器出口帶寬,我用兩片10M的網卡bond,可是還是隻有10M的速度,請問怎麼回事啊?? |
bb8848 回复于:2003-12-04 09:17:25 |
搞定了, 關於雙網卡 [color=red:09edf9837b]負載均衡[/color:09edf9837b] 和 [color=red:09edf9837b]冗余[/color:09edf9837b]。 [code:1:09edf9837b][root@localhost root]# cat /etc/modules.conf alias eth0 8139too alias eth1 8139too alias bond0 bonding #=========================================# options bond0 miimon=100 mode=0 #options bond0 miimon=100 mode=1 #=========================================# alias usb-controller ehci-hcd alias sound-slot-0 i810_audio post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || : pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || : alias usb-controller1 usb-uhci [root@localhost root]#[/code:1:09edf9837b] [color=red:09edf9837b]mode=0[/color:09edf9837b]雙網卡負載均衡 [color=red:09edf9837b]mode=1[/color:09edf9837b]雙網卡冗余 ++++++++++++ 我的網卡配置 [code:1:09edf9837b][root@localhost root]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.250.55 NETMASK=255.255.255.0 [root@localhost root]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=0.0.0.0 [root@localhost root]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 ONBOOT=yes BOOTPROTO=static IPADDR=0.0.0.0 [root@localhost root]#[/code:1:09edf9837b] 當[color=red:09edf9837b]mode=0[/color:09edf9837b]時 [code:1:09edf9837b][root@localhost root]# ifconfig bond0 Link encap:Ethernet HWaddr 00:0A:EB:20:4A:8F inet addr:192.168.250.55 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:98050 errors:0 dropped:0 overruns:0 frame:0 TX packets:106613 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:91719644 (87.4 Mb) TX bytes:91895765 (87.6 Mb) eth0 Link encap:Ethernet HWaddr 00:0A:EB:20:4A:8F inet addr:192.168.250.55 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:66340 errors:0 dropped:0 overruns:0 frame:0 TX packets:70755 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:62999539 (60.0 Mb) TX bytes:63440842 (60.5 Mb) Interrupt:9 Base address:0x4000 eth1 Link encap:Ethernet HWaddr 00:0A:EB:20:4A:8F Media:unknown(auto) inet addr:192.168.250.55 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST DEBUG NOTRAILERS RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:31710 errors:0 dropped:0 overruns:0 frame:0 TX packets:35858 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:28720105 (27.3 Mb) TX bytes:28454923 (27.1 Mb) Interrupt:9 Base address:0x6000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1264 (1.2 Kb) TX bytes:1264 (1.2 Kb) [root@localhost root]#[/code:1:09edf9837b] 當[color=red:09edf9837b]mode=1[/color:09edf9837b]時 [code:1:09edf9837b][root@localhost root]# ifconfig bond0 Link encap:Ethernet HWaddr 00:0A:EB:20:4A:8F inet addr:192.168.250.55 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:151339 errors:0 dropped:0 overruns:0 frame:0 TX packets:122827 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:176177703 (168.0 Mb) TX bytes:100056637 (95.4 Mb) eth0 Link encap:Ethernet HWaddr 00:0A:EB:20:4A:8F inet addr:192.168.250.55 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:123792 errors:0 dropped:0 overruns:0 frame:0 TX packets:92270 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:152707097 (145.6 Mb) TX bytes:65678127 (62.6 Mb) Interrupt:9 Base address:0x4000 eth1 Link encap:Ethernet HWaddr 00:0A:EB:20:4A:8F Media:unknown(auto) inet addr:192.168.250.55 Bcast:192.168.250.255 Mask:255.255.255.0 UP BROADCAST DEBUG NOTRAILERS RUNNING NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:27547 errors:0 dropped:0 overruns:0 frame:0 TX packets:30557 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:23470606 (22.3 Mb) TX bytes:34378510 (32.7 Mb) Interrupt:9 Base address:0x6000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:14 errors:0 dropped:0 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1088 (1.0 Kb) TX bytes:1088 (1.0 Kb) [root@localhost root]#[/code:1:09edf9837b] 注意這兩行 [code:1:09edf9837b]UP BROADCAST DEBUG NOTRAILERS RUNNING SLAVE MULTICAST MTU:1500 Metric:1[/code:1:09edf9837b] [code:1:09edf9837b]UP BROADCAST DEBUG NOTRAILERS RUNNING NOARP SLAVE MULTICAST MTU:1500 Metric:1[/code:1:09edf9837b] |
bb8848 回复于:2003-12-04 09:53:07 |
小弟又做了四塊網卡實驗,除得到以上的結果外。還有.... 當[color=red:c27cd4adcd]mode=0[/color:c27cd4adcd]時,四塊網卡負載均衡,拔出非主網卡eth0都不會出現網絡中斷,隻是帶寬下降了。 當[color=red:c27cd4adcd]mode=1[/color:c27cd4adcd]時,四塊網卡冗余,默認是第一塊網卡工作,不管拔出那條網線,系統會按[color=blue:c27cd4adcd]cat /etc/rc.local [/color:c27cd4adcd]中的順序來選擇網卡, [code:1:c27cd4adcd][root@localhost root]# cat /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local #mii-tool --advertise=100baseT-FD eth3 ifenslave bond0 eth0 eth1 eth2 eth3 route add -net 192.168.250.0 netmask 255.255.255.0 bond0 [root@localhost root]#[/code:1:c27cd4adcd] 有個怪問題,我做實驗兩台機,一台rh90,一台win2kserver,用d-link 1008d相連,測試帶款兩台同時從對方主機下載一個300m的文件. 發關和接收隻能用到網卡速度的一半,比如,兩邊同時下載,發送接收是18M,如果停掉一邊,速度之和還是18M,真是不明白,請高手釋疑? |
xinyv 回复于:2003-12-04 10:09:43 |
我很想知道怎么能在实现负载均衡以后在实现冗余,请高手释疑。 |
wulm 回复于:2003-12-04 11:17:23 |
谢了,俺在你的帮助下也成功了 |
wjlxsl 回复于:2003-12-04 15:49:50 |
按楼主的办法。 在7.2上实现了绑定。 [root@firewall /]# ifconfig bond0 Link encap:Ethernet HWaddr 00:C0:26:F0:12:81 inet addr:192.168.1.222 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:301 errors:0 dropped:4 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:36252 (35.4 Kb) eth0 Link encap:Ethernet HWaddr 00:C0:26:F0:12:81 inet addr:192.168.1.222 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:344 errors:0 dropped:0 overruns:0 frame:0 TX packets:155 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:34439 (33.6 Kb) TX bytes:18427 (17.9 Kb) Interrupt:11 Base address:0xe000 eth1 Link encap:Ethernet HWaddr 00:C0:26:F0:12:81 Media:unknown(auto) inet addr:192.168.1.222 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST DEBUG NOTRAILERS RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:353 errors:0 dropped:0 overruns:0 frame:0 TX packets:154 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:35013 (34.1 Kb) TX bytes:18509 (18.0 Kb) Interrupt:10 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:561 (561.0 b) TX bytes:561 (561.0 b) 我看到第二块网卡的MAC同eth0一样? |
xinyv 回复于:2003-12-05 11:33:11 |
请问在/etc/modules.conf 中配置中 options bond0 miimon=100 mode=0 其中mode可以付0、1、2、3这些值都有什么用途。 如何测试我现在mode的值是什么。如何测试我加载的模块。 如果单纯要把一个ip帮定在多个网卡上实现冗余,我看用下面的方法比较简单。 touch bonding.sh chmod 755 bonding.sh mv bonding.sh /etc/rc.d/ echo '/etc/rc.d/bonding.sh'>>/etc/rc.d/rc.local cat >/etc/rc.d/bonding<<! #!/bin/sh ifdown eth0 eth1 eth2 …… ifconfig bond0 addr xxx.xxx.xxx.xxx/xx ifenslave bond0 eth0 eth1 eth2 …… ! 就这样就能实现。我想知道那些miimon=100 是默认的,mode=那些值的用法和如何测试。请高手释疑! |
LES28 回复于:2004-02-03 11:12:59 |
/etc/modules.conf 中options这一行可以不写。系统自动默认为: mode=0 miimon=0 miimon是用来进行链路监测的。 比如:miimon=100,那么系统每100ms监测一次链路连接状态,如果有一条线路不通就转入另一条线路。 mode的参数可以设置为0,1,2,3 一般情况下都只用到0和1,除非你的网卡不支持miimon。而现在通用的网卡基本上都是支持miimon即链路监测的。 注意:bonding只能提供链路监测,即从主机到交换机的链路是否接通。如果只是交换机对外的链路down掉了,而交换机本身并没有故障,那么bonding会认为链路没有问题而继续使用,这时如果你的mode=0,那么会丢一半的数据包,如果mode=1,那么网络就会全部不通了。 其实具体的文档在内核版本高于2.4的linux中都有。位于/usr/src/linux-2.4.18/Document/network/bonding.txt 。 |
shfjaxl 回复于:2004-11-26 10:27:02 |
在HP-UNIX上怎么绑定啊? |