Solved

Why bonding not work well? (linux Centos)

Posted on 2011-03-17
8
1,154 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
 

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now