Solved

Why bonding not work well? (linux Centos)

Posted on 2011-03-17
8
1,158 Views
Last Modified: 2012-08-13
I config bonding my server like this:
eth0:
eth1 (LAN)
eth2:

I config bonding bond0, eth0 and eth2:
#BOND 0:
DEVICE=bond0
IPADDR=x.x.x.153
NETMASK=255.255.255.0
NETWORK=
BROADCAST=
GATEWAY=x.x.x.158
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

#eth0
# Intel Corporation 82574L Gigabit Network Connection
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:25:90:0d:53:90
TYPE=Ethernet
SLAVE=yes
MASTER=bond0

#eth2
# Intel Corporation 82574L Gigabit Network Connection
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:25:90:0d:53:92
TYPE=Ethernet
SLAVE=yes
MASTER=bond0

#and /etc/modprobe.conf like this:
alias eth0 e1000e
alias eth1 e1000e
alias eth2 e1000e
alias eth3 e1000e
alias scsi_hostadapter ahci
alias bond0 bonding
options bond0 miimon=100 mode=2 use_carrier=1 xmit_hash_policy=1

-------------------------------------------
But when apply, restart server, restart network, I see data go out bond0 with 1000Mbit/s, but only go out eth2 , not pass eth0 (0kbit/s). Bandwidth of system = bond0 = eth2 , have not include eth0 in this case.
Normal of bonding, bond0 must = eth0+ eth2!

Why that?
Thank you!

0
Comment
Question by:redstar01
  • 4
  • 3
8 Comments
 
LVL 3

Assisted Solution

by:Abhishek_Chib
Abhishek_Chib earned 400 total points
ID: 35163033
Hi,

First change Mode to : mode=balance-alb or mode=6 (Balance ALB)

Follow the steps :

# modprobe bonding
# service network restart

Paste the result :
# less /proc/net/bonding/bond0

I am suspecting, you network switch is supporting mode=2 (Balance XOR)

Check URL : http://www.cyberciti.biz/howto/question/static/linux-ethernet-bonding-driver-howto.php

Section : "6. Switch Configuration"

0
 
LVL 3

Assisted Solution

by:Abhishek_Chib
Abhishek_Chib earned 400 total points
ID: 35163047
Sorry, typo problem - I am suspecting, your network switch is not supporting mode=2 (Balance XOR)
0
 
LVL 6

Assisted Solution

by:de2Zotjes
de2Zotjes earned 100 total points
ID: 35163907
The mode 2 (balance xor) does not require any special config or support on the switch.

In your config there is a deviation from the documentation. You have "xmit_hash_policy=1" where the documentation says to use "xmit_hash_policy=layer2" (same url as shown above)

Also the balance xor mode will not put the traffic destined for a single remote host over 2 nics. To see whether traffic is spread over multiple nics you need to set up connections from different mac-addresses (multiple machines). Was that the case during your test?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:redstar01
ID: 35165015
in ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:25:90:0D:53:90
          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Memory:fb3e0000-fb400000

eth2      Link encap:Ethernet  HWaddr 00:25:90:0D:53:90
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:6205161239 errors:0 dropped:11 overruns:0 frame:0
          TX packets:11390153863 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:387930880250 (361.2 GiB)  TX bytes:16718240199110 (15.2 TiB)
          Memory:fb5e0000-fb600000

Yes, Is there any problem with MAC address? because In config file, and In device manager, I found
eth0 is 00:25:90:0D:53:90
eth1 is 00:25:90:0D:53:91
eth2 is 00:25:90:0D:53:92

But when has bonding, the MAC address of eth2 is the same eth0 (eth1 is 00:25:90:0D:53:90), like result!

So, bonding make MAC address change?

0
 

Author Comment

by:redstar01
ID: 35165031
in ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:25:90:0D:53:90
          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Memory:fb3e0000-fb400000

eth2      Link encap:Ethernet  HWaddr 00:25:90:0D:53:90
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:6205161239 errors:0 dropped:11 overruns:0 frame:0
          TX packets:11390153863 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:387930880250 (361.2 GiB)  TX bytes:16718240199110 (15.2 TiB)
          Memory:fb5e0000-fb600000

Yes, Is there any problem with MAC address? because In config file, and In device manager, I found
eth0 is 00:25:90:0D:53:90
eth1 is 00:25:90:0D:53:91
eth2 is 00:25:90:0D:53:92

But when I apply bonding, the MAC address of eth2 is the same eth0 (00:25:90:0D:53:90), like ifconfig result!

So, bonding makes MAC address change?
0
 

Author Comment

by:redstar01
ID: 35165157
And the result of command::
less /proc/net/bonding/bond0


Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)

Bonding Mode: load balancing (xor)
Transmit Hash Policy: layer3+4 (1)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: down
Link Failure Count: 0
Permanent HW addr: 00:25:90:0d:53:90

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:25:90:0d:53:92
0
 

Author Comment

by:redstar01
ID: 35170361
I'm also running VMwareWorkstation on this server, Is It affect?
0
 
LVL 3

Accepted Solution

by:
Abhishek_Chib earned 400 total points
ID: 35174272
redstar01, can you check why eth0 showing down. Check with VMware logs
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 69
Linux hostname change 2 71
Linux/Apache File Ownership/Permissions 1 63
looking for a CENTOS ISO to download with x window installed 2 38
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question