LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Help with channel bonding (https://www.linuxquestions.org/questions/linux-networking-3/help-with-channel-bonding-277239/)

jaraju 01-13-2005 03:50 AM

Help with channel bonding
 
Hi guys!
I'm trying to get my Linux box with 2 NIC to channel bond. I've read most of the websites on it but im still having some trouble making it work. I hope you guys can help me out :)

I'm using the following system:
Linux kernel 2.6.8.1-12
Mandrake 10.1 PowerPack+
With two network interface card
1. Realtek RTL-8139 (eth0)
2. VT6105 [Rhine III 10/100] (eth1)

I followed the instructions i found here:
/usr/share/doc/iputils-20020927/bonding.txt

1. I made the following changes:
Edited /etc/modprobe.conf and added the following line:
alias bond0 bonding

2. Created an ifcfg-bond0 file in /etc/sysconfig/network-scripts directory with the following entries:
DEVICE=bond0
IPADDR=192.168.0.17
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

3. chmod 775 ifcfg-bond0

4. Edited ifcfg-eth0 file in /etc/sysconfig/network-scripts directory
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

5. Edited ifcfg-eth1 file in /etc/sysconfig/network-scripts directory
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

6. Rebooted the machine

7. ifconfig after the bonding:
bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.0.17 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MASTER 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:75 errors:0 dropped:0 overruns:0 frame:0
TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5034 (4.9 Kb) TX bytes:5034 (4.9 Kb)

It all seems to be ok until i tried to ping another computer with ip 192.168.0.100. It didnt work :(

Did i miss any step? Please help!

jaraju 01-13-2005 10:46 PM

Anyone?
:cry:

oh, and these are the files i have in my system for bonding:
$ locate bonding
/usr/share/doc/iputils-20020927/bonding.txt
/usr/include/linux/if_bonding.h
/lib/modules/2.6.8.1-12mdk/kernel/drivers/net/bonding
/lib/modules/2.6.8.1-12mdk/kernel/drivers/net/bonding/bonding.ko.gz

$ locate ifenslave
/usr/share/man/man8/ifenslave.8.bz2
/sbin/ifenslave

brettcave 01-13-2005 11:30 PM

Have a look at the following - it gives options for configuring the module and checking compatibility of network cards.

http://www.redhat.com/docs/manuals/e...ING-DIRECTIVES

jaraju 01-14-2005 09:08 PM

thanks! i'll check it out

simonsez 01-20-2005 02:16 PM

hey...

just bopping around the net looking for a solution to my own bonding problem when i saw your message.

i am pretty sure this will fix your issue. first restart your network:

/etc/init.d/network restart

next bring up eth0 and eth1 manually:

ifup eth0
ifup eth1
...
ifup ethx (as many times as you need)

for each one you should get a message "enslaving eth0 to bond0" for example. why doesn't mandake do this automatically? i have no idea, and there in lies my problem. my bond works great, but i can't get the bond interface to bring up eth0 and eth1 automatically when it comes up.

<sigh>

jaraju 01-24-2005 06:53 PM

I replaced the Realtek NIC with another VT6105 NIC hoping that there wont be any incompatibility issue.
But i still cant get the 2 NICs to be slaves. I'll try your suggestion simonsez.

Thanks.

simonsez 01-25-2005 12:30 PM

Quote:

Originally posted by jaraju
I replaced the Realtek NIC with another VT6105 NIC hoping that there wont be any incompatibility issue.
But i still cant get the 2 NICs to be slaves. I'll try your suggestion simonsez.

Thanks.

well when you look at ifconfig -a you should see all your interfaces. so for example mine shows bond0, eth0, eth1 and sit0. when you get bonding working eth0 and eth1 will have no ip address defined and will show a status of "up broadcast running salve". for example here's my eth0 and eth1:

eth0 Link encap:Ethernet HWaddr 00:04:23:AF:3E:5A
inet6 addr: fe80::204:23ff:feaf:3e5a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:3428 errors:0 dropped:0 overruns:0 frame:0
TX packets:43311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:557234 (544.1 Kb) TX bytes:5096051 (4.8 Mb)
Base address:0xcc00 Memory:dff80000-dffa0000

eth1 Link encap:Ethernet HWaddr 00:04:23:AF:3E:5A
inet6 addr: fe80::204:23ff:feaf:3e5a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:77351 errors:0 dropped:0 overruns:0 frame:0
TX packets:43311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13080945 (12.4 Mb) TX bytes:5057316 (4.8 Mb)
Base address:0xd000 Memory:dffa0000-dffc0000

and my bond0:

bond0 Link encap:Ethernet HWaddr 00:04:23:AF:3E:5A
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx
inet6 addr: fe80::204:23ff:feaf:3e5a/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:80779 errors:0 dropped:0 overruns:0 frame:0
TX packets:86622 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13638179 (13.0 Mb) TX bytes:10153367 (9.6 Mb)

notice the "up broadcast running master"?

i just rebooted so the RX/TX isin't too impressive. i looked at your earlier post and it's pretty wierd that your eth0 and eth1 don't show up. make sure your cards work before you attempt getting bonding configured like i said you should be able to see all your cards before when you do an 'ifconfig -a'. if you can't something else may be wrong, like the right module may not be loaded.

the trick that seemed to fix my problem getting the cards to auto enslave when bond0 came up was this in modules.conf:

#- Network Card Setup ----------------------------------------------------------
alias bond0 bonding
probeall bond0 eth0 eth1 bonding
#-------------------------------------------------------------------------------

additionally i also have this in modprobe.preload:

bonding

my /etc/sysconfig/network has:

HOSTNAME=myhostname
NETWORKING=yes
GATEWAY=xxx.xxx.xxx.xxx
GATEWAYDEV=bond0 <-- don't forget this

my /etc/sysconfig/network-scripts/ifcfg-bond0:

DEVICE=bond0
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
NETWORK=xxx.xxx.xxx.xxx
BROADCAST=xxx.xxx.xxx.xxx
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

oe of my etc/sysconfig/network-scripts/ifcfg-eth0 scripts:

DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

thats about it. works beautifully on two systems for both of which are Mandrake 10.1 community. one has an Intel PRO/1000 Dual adapter (sweet card), and the other system has an onboard elcheapo SIS900 adapter and a 3c59x. previously i also bonded a DFE530TX four port 10/100 ethernet card on Mandrake 9.2 with no problems.

let us know how you make out. :)

jaraju 01-28-2005 11:03 PM

Wow! That worked!!! Thanks simon!

I was able to get my bonding up when i did ifup eth0 and ifup eth1. Worked like a charm :)

But, as u mentioned earlier, i have to manually up my eth0 and eth1 everytime i boot.
Then i tried your auto enslave trick, but it didnt work :(

I inserted the following line into modprobe.preload:
bonding

I also inserted the following line into modules.conf:
alias bond0 bonding
probeall bond0 eth0 eth1 bonding

When i rebooted the system, i still had to manually up my eth0 and eth1 for my network to work :(

Atleast the bond is working now :)
Thanks again simon!!!

jaraju 02-03-2005 05:00 AM

ok... my solution to autoenslave eth0 and eth1:

- i edited /etc/init.d/network using vi

- inserted the following script just before this line: # Bring up xDSL and CIPE interfaces
# Starting up eth0 and eth1
if [ -x /etc/sysconfig/network-scripts/ifup ]; then
echo "Bringing up eth0 and eth1..."
/etc/sysconfig/network-scripts/ifup eth0
/etc/sysconfig/network-scripts/ifup eth1
fi

- saved and quit vi.

- typed: service network restart

and it worked :)
It also automatically enslaves eth0 and eth1 when you reboot the system.

jaraju 02-03-2005 07:56 PM

I'm just wondering... is there any other way to do this without editing /etc/rc.d/init.d/network?

jrochamtz 04-27-2005 11:26 AM

Hi!!

i use fedora core 2 & 3 actually. i had the same problem and now is solved for me.

just add TYPE=bonding to /etc/sysconfig/network-scripts/ifcfg-bond0

and now my devices startup auto.

please let me know if it works for you. best regards!

Jorge Rocha

jaraju 05-05-2005 07:38 PM

Thanks jrochamtz.

I'll try it out :)


All times are GMT -5. The time now is 08:17 PM.