键入驱动程序在centos 5.5,模式balancer rr不起作用

我在centos 5.5中创build了一个bonding界面,我select了mode-balance,使用slave eth6和eth7,并且eth6和eth7的连接正常,这里是configuration文件:

[root@50:B3:42:00:00:A3 network-scripts]# cat ifcfg-bond1 DEVICE=bond1 IPADDR=172.16.252.225 NETMASK=255.255.0.0 GATEWAY=172.16.0.1 MTU=9000 ONBOOT==yes BOOTPROTO=none USERCTL=on BONDING_OPTS="mode=balance-rr miimon=100" [root@50:B3:42:00:00:A3 network-scripts]# cat ifcfg-eth6 DEVICE=eth6 USERCTL=no ONBOOT=yes MASTER=bond1 SLAVE=yes BOOTPROTO=none [root@50:B3:42:00:00:A3 network-scripts]# cat ifcfg-eth7 DEVICE=eth7 USERCTL=no ONBOOT=yes MASTER=bond1 SLAVE=yes BOOTPROTO=none 

并且绑定界面已经成功build立,sysfs:

 [root@50:B3:42:00:00:A3 network-scripts]# cat /sys/class/net/bond1/bonding/slaves eth6 eth7 [root@50:B3:42:00:00:A3 network-scripts]# cat /sys/class/net/bond1/bonding/mode balance-rr 0 [root@50:B3:42:00:00:A3 network-scripts]# cat /sys/class/net/bond1/bonding/mii miimon mii_status [root@50:B3:42:00:00:A3 network-scripts]# cat /sys/class/net/bond1/bonding/miimon 100 [root@50:B3:42:00:00:A3 network-scripts]# cat /proc/net/bonding/bond1 Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth6 MII Status: up Link Failure Count: 0 Permanent HW addr: 50:b3:42:00:00:74 Slave Interface: eth7 MII Status: up Link Failure Count: 0 Permanent HW addr: 50:b3:42:00:00:75 

我可以ping通债券接口,链接状态正常:

 # ping 172.16.252.225 PING 172.16.252.225 (172.16.252.225) 56(84) bytes of data. 64 bytes from 172.16.252.225: icmp_seq=1 ttl=64 time=1.88 ms 64 bytes from 172.16.252.225: icmp_seq=2 ttl=64 time=0.122 ms 64 bytes from 172.16.252.225: icmp_seq=3 ttl=64 time=0.112 ms 64 bytes from 172.16.252.225: icmp_seq=4 ttl=64 time=0.110 ms 64 bytes from 172.16.252.225: icmp_seq=5 ttl=64 time=0.117 ms 

然后用IOmeter通过bonding接口对磁盘进行stream读写操作,查看数据stream的分布情况,绑定接口的模式为balance-rr,使用命令分析数据stream:

 sar -n DEV 2 100 

但结果与预期不一样:

 # sar -n DEV 2 100 Linux 2.6.18-194.17.1.el5 (50:B3:42:00:00:A3) 04/28/2012 06:32:32 PM IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s 06:32:34 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 06:32:34 PM eth0 318.78 4316.24 19691.88 439105.58 0.00 0.00 0.00 06:32:34 PM inner0 0.00 0.51 0.00 47.72 0.00 0.00 0.00 06:32:34 PM eth5 1.02 0.00 93.40 0.00 0.00 0.00 0.00 06:32:34 PM eth6 4499.49 0.00 2631274.62 0.00 0.00 0.00 0.00 06:32:34 PM eth7 236.55 0.00 14350.76 0.00 0.00 0.00 0.00 06:32:34 PM eth8 0.00 0.00 0.00 0.00 0.00 0.00 0.00 06:32:34 PM sit0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 06:32:34 PM bond0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 06:32:34 PM bond1 4736.04 0.00 2645625.38 0.00 0.00 0.00 0.00 

我们可以看到数据stream不平衡,大部分数据stream在eth6上,mabye有些参数设置不正确,还有一些其他的错误,你能帮我吗?非常感谢!

机器和系统信息:

 Linux 2.6.18-194.17.1.el5 x86_64 GNU/Linux 

邦定驱动版本:

  v3.4.0 (October 7, 2008) 

网卡:

 intel 82574L 1000Mb/s 

开关:

 H3C S5800 # interface GigabitEthernet1/0/7 port link-aggregation group 1 # interface GigabitEthernet1/0/9 port link-aggregation group 1 # interface GigabitEthernet1/0/12 port link-aggregation group 1 # interface GigabitEthernet1/0/22 port link-aggregation group 

我的机器连接到交换机上的这4个端口。 同时我configuration了相应接口的链路端口types为access

您不显示您的交换机configuration。 通常,balance-rr模式需要交换机上的Etherchannel(Cisco)或中继configuration才能正常工作。 您是否在H3C S5800交换机上build立了一个分组?

在这里看到笔记 。

 The balance-rr, balance-xor and broadcast modes generally require that the switch have the appropriate ports grouped together. The nomenclature for such a group differs between switches, it may be called an "etherchannel" (as in the Cisco example, above), a "trunk group" or some other similar variation.