2

i've creat a bonding interface in centos 5.5,i chose mode balance-rr,using slave eth6 and eth7,and the link of eth6 and eth7 is ok,here is the configuration file:

[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

and the bonding interface is been created succeefully,the parameters in 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

and i can ping the bond interface ,the link status is normal:

# 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

then, i use IOmeter to do flow reading and writing to disks via the bonding interface ,to see the distribution of the data flow,the mode of the bonding interface is balance-rr,i use command to analyse the data flow:

sar -n DEV 2 100

but the result is not the same as expected:

# 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

we can see that the data flow is not balance ,most of the data flow is on eth6, mabye some parameters was not been set correctly, or there be some other errors ,can you help me?thank you very much!!!

machine and system info:

Linux 2.6.18-194.17.1.el5 x86_64  GNU/Linux

bonding driver version:

 v3.4.0 (October 7, 2008)

NIC:

intel 82574L 1000Mb/s

switch:

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 

My machine is connected to these 4 ports on the switch. At the same time I configured the link-port type of corresponding interface to be access.

Nils
  • 7,695
  • 3
  • 34
  • 73
Jak.Ding
  • 21
  • 2

1 Answers1

0

You don't show your switch configuration. Generally, the balance-rr mode requires an Etherchannel (Cisco) or trunk configuration on the switch to work properly. Do you have a grouping established on the H3C S5800 switch?

See the notes here.

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.
ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • thanks very much for your reply,i've have my switch configrured, but i'm not sure whether it was right or not,here is the configuration:`# 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 1 ` my machine connected to this 4 ports on the switch.at the same time,i configured the **link-port** type of corresponding interface to be **access** – Jak.Ding May 05 '12 at 03:17
  • And the terminal printed messages like this **Port member GigabitEthernet1/0/7 of aggregation group BAGG1 becomes ACTIVE!** but this still not work. – Jak.Ding May 05 '12 at 03:20
  • @Jak.Ding I have the certain feeling that there is something missing on the switch-side - something that corresponds to the balance-rr mode. – Nils Oct 16 '13 at 21:10