Solved

Why bonding not work well? (linux Centos)

Posted on 2011-03-17
8
1,157 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
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.

863 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

20 Experts available now in Live!

Get 1:1 Help Now