LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-13-2005, 03:50 AM   #1
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Rep: Reputation: 0
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!
 
Old 01-13-2005, 10:46 PM   #2
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Anyone?


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

Last edited by jaraju; 01-13-2005 at 11:28 PM.
 
Old 01-13-2005, 11:30 PM   #3
brettcave
LQ Newbie
 
Registered: Aug 2004
Location: Johannesburg, South Africa
Distribution: Mandrake, RH, Fedora
Posts: 22

Rep: Reputation: 15
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
 
Old 01-14-2005, 09:08 PM   #4
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
thanks! i'll check it out
 
Old 01-20-2005, 02:16 PM   #5
simonsez
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
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>
 
Old 01-24-2005, 06:53 PM   #6
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 01-25-2005, 12:30 PM   #7
simonsez
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
Cool

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.
 
Old 01-28-2005, 11:03 PM   #8
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
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!!!
 
Old 02-03-2005, 05:00 AM   #9
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 02-03-2005, 07:56 PM   #10
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Question

I'm just wondering... is there any other way to do this without editing /etc/rc.d/init.d/network?
 
Old 04-27-2005, 11:26 AM   #11
jrochamtz
LQ Newbie
 
Registered: Apr 2005
Location: México
Distribution: fedora
Posts: 12

Rep: Reputation: 0
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
 
Old 05-05-2005, 07:38 PM   #12
jaraju
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks jrochamtz.

I'll try it out
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
channel bonding wlan cards mungler Linux - Wireless Networking 0 09-13-2005 04:32 AM
Ethernet channel bonding satimis Linux - Networking 3 05-19-2004 10:16 AM
Channel bonding with 2 IPs dark_luder Linux - Networking 0 02-25-2004 09:55 AM
ethernet channel bonding under slackware sublett Linux - Networking 1 05-08-2003 05:36 PM
ISDN Channel Bonding??? ricey Linux - Newbie 4 07-29-2002 04:43 PM


All times are GMT -5. The time now is 11:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration