LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-21-2008, 09:20 AM   #1
mstjohn1974
LQ Newbie
 
Registered: Sep 2005
Location: Albuquerque
Distribution: Ubuntu
Posts: 15

Rep: Reputation: 5
Nic Bonding


Hi all,

I am wondering if someone knows how to configure nic bonding under Slackware 12.1. I am setting up a HA NFS Server and the last thing I want to do is nic bonding. I found this instructions and followed the as far as possible but there is a change in SLackware 12.1 that has not been in Slackware 12. The init script rc.inet1 has changed.

I followed this steps: (http://www.pervasive.jku.at/About_Us...irtualization/)

Network device bonding
Aggregating multiple network links into a single link, using a variety of methods. Before we can start to configure we have to build as a binary:
cd /usr/src/linux/Documentation/networking
gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave
cp ifenslave /sbin/ifenslave

We need the kernel module bonding and the module for our network card in our case tg3. Now we can create a init script which make a bond device for our two GBit NICs, we place them under "/etc/rc.d/rc.bond":
#!/bin/sh
#
case "$1" in
'start')
echo "start bond0"
#modprobe bonding mode=balance-alb miimon=100
modprobe bonding mode=balance-rr miimon=100
modprobe tg3
ifconfig bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
#TODO need to be changed
ifconfig bond0 hw ether 00:16:3e:aa:aa:aa
;;
'stop')
ifconfig bond0 down
rmmod bonding
rmmod tg3
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac

The different kinds of bonding methods we can add as parameter to the bonding module. More under [Bonding wiki website]. Attention for the MAC Address! If we do not use the "hw ether" parameter the MAC Address will be automatically take from the first network card. We use the static method because we got problems with the Xen Bridge when we used the dynamic mode.

UPDATE: Bonding
We have to change the bonding mode otherwise we run into ARP network problems with the xen bridge. More about the the problem you can find [here]. The solution is disable the bonding or (i tried) use mode=1 (active-backup). But this is only a fault tolerance mode.

That we can use the standard network configuration files under slackware we add the following into "/etc/rc.d/rc.M" but before "rc.inet1" call:
..
# NEW START
# dominik say start bonding first
if [ -x /etc/rc.d/rc.bond ]; then
. /etc/rc.d/rc.bond start
fi
# NEW END

# Initialize the networking hardware.
if [ -x /etc/rc.d/rc.inet1 ]; then
. /etc/rc.d/rc.inet1
fi
..

To configure our bond device we use the "/etc/rc.d/rc.inet1.conf" file:
# Bond
IFNAME[4]="bond0"
IPADDR[4]="XXX.XX.XX.XX"
NETMASK[4]="255.255.255.0"
USE_DHCP[4]=""
DHCP_HOSTNAME[4]=""

# Default gateway IP address:
GATEWAY="XXX.XX.XX.XX"

To get the status of the bond device use the following command:
cat /proc/net/bonding/bond0

result:
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:e0:81:5e:9e:c4

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:e0:81:5e:9e:c5

I put everything in place except the changes in rc.inet1.
Does someone know a better way to configure nic bonding?

Thanks
 
Old 08-30-2008, 12:23 PM   #2
gefst
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Rep: Reputation: 17
A how-to for nic bonding under slackware 12.1 would be greatly appreciated by all users thinking of setting up a software raid 5 file server using slackware.

See here for an excellent how-to:
http://slackware.com/~amrit/README_RAID.TXT

Thanks
 
Old 08-30-2008, 01:13 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,313

Rep: Reputation: Disabled
Quote:
Originally Posted by mstjohn1974 View Post
...but there is a change in SLackware 12.1 that has not been in Slackware 12. The init script rc.inet1 has changed.



.....

I put everything in place except the changes in rc.inet1.
Why not? There were no changes in rc.inet1 between Slackware 12.0 and 12.1 that would make it difficult for you. Note that the article wants you to edit rc.inet1.conf ...

Eric
 
Old 08-30-2008, 01:14 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,313

Rep: Reputation: Disabled
Quote:
Originally Posted by gefst View Post
A how-to for nic bonding under slackware 12.1 would be greatly appreciated by all users thinking of setting up a software raid 5 file server using slackware.

See here for an excellent how-to:
http://slackware.com/~amrit/README_RAID.TXT

Thanks
NIC bonding has nothing at all to do with RAID. So, what was your reason for posting?

Eric
 
Old 08-30-2008, 03:14 PM   #5
mstjohn1974
LQ Newbie
 
Registered: Sep 2005
Location: Albuquerque
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 5
I finally got it working and wrote a little how to

look here http://mstjohn1974.googlepages.com/n...rpage%27stitle
 
Old 08-31-2008, 02:44 AM   #6
gefst
LQ Newbie
 
Registered: Sep 2003
Posts: 28

Rep: Reputation: 17
Software raid and nic bonding are not related technologies but they are quite useful together. If you crate a file server with huge capacity using raid 5 you probably need the fastest possible way to communicate with it over your network (copying large files etc.). Don't I understand correctly than nic bonding increases speed?

mstjohn1974 thank you. This is really useful.

Last edited by gefst; 08-31-2008 at 03:04 AM.
 
Old 08-31-2008, 12:03 PM   #7
mstjohn1974
LQ Newbie
 
Registered: Sep 2005
Location: Albuquerque
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 5
NIC bonding could be used to increase thru put but that was not my intention. I wanted to have fault tolerance. My Raid setup is 6 drives in a raid 1+0.
 
Old 06-15-2012, 07:39 PM   #8
lord_beavis
LQ Newbie
 
Registered: Mar 2004
Location: Memphis
Distribution: Slackware, Ubuntu
Posts: 9

Rep: Reputation: 0
Cool Location. Location. Location.

Quote:
Originally Posted by mstjohn1974 View Post
That we can use the standard network configuration files under slackware we add the following into "/etc/rc.d/rc.M" but before "rc.inet1" call...
I am so glad I found this. I could get bonding to work, but I had to do it manually and that is something I didn't want to have to remember to do every once in a blue moon when my server rebooted.

Now I need to figure the Cisco 2924 XL switch part of it 'cause the DHCP clients aren't talking to the DHCP server now.
 
Old 06-15-2012, 10:15 PM   #9
lord_beavis
LQ Newbie
 
Registered: Mar 2004
Location: Memphis
Distribution: Slackware, Ubuntu
Posts: 9

Rep: Reputation: 0
Hrrm

Quote:
Originally Posted by lord_beavis View Post
Now I need to figure the Cisco 2924 XL switch part of it 'cause the DHCP clients aren't talking to the DHCP server now.
(Yes, I know I'm quoting myself...)

I don't think it is the switch config. The server sees the network and can ping PCs on it, but the dhcpd service won't start.
 
Old 06-15-2012, 10:26 PM   #10
lord_beavis
LQ Newbie
 
Registered: Mar 2004
Location: Memphis
Distribution: Slackware, Ubuntu
Posts: 9

Rep: Reputation: 0
Talking rc.dhcpd, smb.conf

Quote:
Originally Posted by lord_beavis View Post
(Yes, I know I'm quoting myself...)

I don't think it is the switch config. The server sees the network and can ping PCs on it, but the dhcpd service won't start.
(And yet, I'm doing it again...)

Had to change the INTERFACES="eth0" in /etc/rc.d/rc.dhcpd to INTERFACES="bond0"

You will need to do that if you are running a DHCP server on Slackware.

Update: Found that Samba wasn't running either. As above, add bond0 (or bond*) to /etc/samba/smb.com to the 'interfaces' line.

Last edited by lord_beavis; 06-16-2012 at 11:37 PM. Reason: Updated (redux)
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
NIC Bonding: Does not failover successfully. Only one NIC is active Akhran Debian 2 02-18-2011 07:26 PM
NIC Bonding zimm247 Red Hat 1 06-28-2008 07:22 PM
NIC Card Bonding fleshwound Linux - Networking 0 11-26-2005 07:50 PM
OpenBSD and NIC bonding? lil_drummaboy *BSD 2 11-04-2005 01:49 PM
NIC Bonding Problem jon3k Linux - Networking 4 08-31-2004 02:36 PM


All times are GMT -5. The time now is 11:10 PM.

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