LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RHEL 4 Bonding problem (https://www.linuxquestions.org/questions/linux-newbie-8/rhel-4-bonding-problem-644292/)

vivekanandank 05-23-2008 09:01 AM

RHEL 4 Bonding problem
 
Hi All,

I am trying to bond the ethernets. The first bond0 is working fine and the bond1 is not working, it shows error which is shown below. I have attached in this, what I have done for in my server. Please give me a solution ASAP.

Step #1: Create a bond1 configuration file
Red Hat Linux stores network configuration in /etc/sysconfig/network-scripts/ directory. First, you need to create bond1 config file:
# vi /etc/sysconfig/network-scripts/ifcfg-bond1Append following lines to it:

DEVICE=bond1
IPADDR=192.168.1.20
NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

Replace above IP address with your actual IP address. Save file and exit to shell prompt.

Step #2: Modify eth4 and eth5 config files:
Open both configuration using vi text editor and make sure file read as follows for eth4 interface

# vi /etc/sysconfig/network-scripts/ifcfg-eth4Modify/append directive as follows:

DEVICE=eth4
USERCTL=no
ONBOOT=yes
MASTER=bond1
SLAVE=yes
BOOTPROTO=none

Open eth5 configuration file using vi text editor:# vi /etc/sysconfig/network-scripts/ifcfg-eth5Make sure file read as follows for eth5 interface:

DEVICE=eth5
USERCTL=no
ONBOOT=yes
MASTER=bond1
SLAVE=yes
BOOTPROTO=none

Save file and exit to shell prompt.

Step # 3: Load bond driver/module
Make sure bonding module is loaded when the channel-bonding interface (bond1) is brought up. You need to modify kernel modules configuration file:

# vi /etc/modprobe.conf

Append following two lines:

alias bond1 bonding
options bond1 mode=balance-alb miimon=100

Save file and exit to shell prompt. You can learn more about all bounding options in kernel source documentation file (click here to read file online).

Step # 4: Test configuration
First, load the bonding module:

# modprobe bonding

Restart networking service in order to bring up bond1 interface:

# service network restart


"Bringing up interface bond1: bonding device bond1 does not seem to be present, delaying initialization.

[FAILED] "

codeape 05-26-2008 07:01 AM

I'm suffering from the same affliction (RHEL5). Google is surprisingly quiet on the subject. A few dead-ends where other people post the same question, but don't get a satisfying reply.

These guys claim to have gotten somewhere (CentOS).

Unfortunately the suggestions there didn't make the issue disappear on my system.
Maybe it can help you, please let me know if it did!

I'm 99,99% certain it has something to do with the modules. Any module-savvy guys around that could help us out?

Kind regards,
Ape

===============================================================
Similar config as by vivekanandank, except that bond0 = eth0 + eth2 and bond1 = eth1.

root@host# cat /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=1 miimon=100
alias bond1 bonding
options bond1 mode=1 miimon=100
alias eth0 tg3
alias eth1 tg3
alias eth2 e1000
alias eth3 e1000
alias scsi_hostadapter cciss
alias usb-controller usb-ohci
root@host# modprobe -c | grep bond
alias bond0 bonding
options bond0 mode=1 miimon=100
alias bond1 bonding
options bond1 mode=1 miimon=100
alias pci:v000011F6d00002011sv*sd*bc*sc*i* winbond-840
alias pci:v00001050d00000840sv*sd*bc*sc*i* winbond-840
alias pci:v00001050d00000840sv*sd00008153bc*sc*i* winbond-840
root@host# lsmod | grep bond
bonding 114593 0

root@host# modprobe -o bond1 bonding mode=1 miimon=100
FATAL: Error inserting bonding (/lib/modules/2.6.18-8.el5/kernel/drivers/net/bonding/bonding.ko): Operation not permitted

root@host# locate ifenslave
/sbin/ifenslave
/usr/share/man/man8/ifenslave.8.gz

root@host# modprobe bonding

root@host# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
modprobe bonding
modprobe -o bond0 bonding mode=1 miimon=100
modprobe -o bond1 bonding mode=1 miimon=100

root@host# /etc/rc.d/init.d/network restart
Shutting down interface bond0: [ OK ]
Shutting down interface eth3: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: [ OK ]
Bringing up interface bond1: bonding device bond1 does not seem to be present, delaying initialization.
[FAILED]
Bringing up interface eth3: [ OK ]

codeape 05-26-2008 09:20 AM

Got it!
 
Another case of RTFM..

This was very helpful:
/usr/share/doc/iputils-20020927/README.bonding

Creating and Destroying Bonds
-----------------------------
To add a new bond foo:
# echo +foo > /sys/class/net/bonding_masters

To remove an existing bond bar:
# echo -bar > /sys/class/net/bonding_masters

To show all existing bonds:
# cat /sys/class/net/bonding_masters


It turns out that in /sys/class/net/bonding_masters, you *need* to have bond1 listed. If not then a manual bond will fail (and of course so will an automatic bond).

So:
root@host# echo +bond1 > /sys/class/net/bonding_masters
root@host# ifconfig bond1 <IP> netmask <MASK>
root@host# ifenslave bond1 eth1

HTH,
Ape

sabumd 06-08-2008 08:20 AM

Quote:

Originally Posted by codeape (Post 3164875)
I
root@host# cat /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=1 miimon=100
alias bond1 bonding
options bond1 mode=1 miimon=100

Try changing

options bond0 mode=1 miimon=100

TO

options bonding mode=1 miimon=100

I am using rhel 5 and is working fine with bonding :cool:


All times are GMT -5. The time now is 06:40 PM.