LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-07-2011, 11:23 PM   #1
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
bonding wlan0 and eth0


In theory all the info on the Internet about bonding network interfaces should translate over to a wlan0 interface so why am I have such difficulties getting things working... I'm using 13.37 64-bit and have compiled ifenslave as mentioned to be used to bond the interfaces. Currently I have eth0 and wlan0 configured such that they are working properly individually. From the documentation of Slackware users that got bonding working, they did the following and succeeded, while I have not...

Added the following to /etc/rc.d/rc.inet1.conf
Code:
IFNAME[4]="bond0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]=""
All the other interfaces in rc.inet1.conf are blanked... none of the interfaces go up or obtain an IP address under DHCP anymore. Then I do the following:

modprobe bonding
ifconfig bond0 up
ifenslave bond0 eth0 wlan0

At this point, nothing else happen... shouldn't bound0 get an IP address from my DHCP server and be all set from here? Well ifconfig looks right, but nothing. bound0 is set to master, eth0 and wlan0 are set to slave. Am I missing something?
 
Old 07-08-2011, 03:12 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I think you will also have to run the following command afterwards:
Code:
/etc/rc.d/rc.inet1 bond0_start
Eric
 
Old 07-08-2011, 06:56 AM   #3
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
On the (few) times that I have used bonding, we had to make sure that the endpoints (ie where the ethernet plugged into) was aware of the bonding and configured correctly. This was for where we were using the 'striping' mode (to borrow disk raid terminology). I guess if you're using it for fault tolerance only then this might not be an issue.
 
Old 07-09-2011, 09:38 AM   #4
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by Alien Bob View Post
I think you will also have to run the following command afterwards:
Code:
/etc/rc.d/rc.inet1 bond0_start
Eric
Looks like that worked, however not completely. What I would like is for eth0 to be primary so that that interface is used whenever possible before using the wlan0 interface. If I set eth0 to be primary, I can't do WPA authentication with my AP since the MAC address of bond0 will be that of eth0's. Any suggestions on how to temporarily switch the primary to wlan0 for authentication and then switch back?
 
Old 07-09-2011, 02:54 PM   #5
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Original Poster
Rep: Reputation: 56
Looks like I've got it! My error was that in rc.inet1.conf I had the following:

Code:
IFNAME[4]="bond0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]=""
which preceded the wireless section, which was:

Code:
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]=""
DHCP_HOSTNAME[4]=""
DHCP_KEEPNTP[4]="yes"
WLAN_ESSID[4]="Linksys"
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
Did not realize that the wireless section was clobbering the bond0 section until I read rc.inet1 a little more carefully. Anyway, after making a little modification to rc.inet1 I am able to get bonding working! The modification was as as follows:

Code:
#######################
# INTERFACE FUNCTIONS #
#######################
        
# Start the bonding module so that we can bond eth0 and wlan0
if [ -z "` lsmod | grep bonding | awk {'print $1'} `" ]; then
  modprobe bonding mode=active-backup miimon=100 primary=eth0
fi

# Bring up the bond0 interface and then enslave eth0 and wlan0
ifconfig bond0 up
/root/scripts/ifenslave-2.6.39.2 bond0 eth0 wlan0

# Function to bring up a network interface.  If the interface is

Gonna mark this as solved! If there's any suggestions on making my modifications a little more robust, please feel free to reply!
 
  


Reply



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
dhcp wlan0 before eth0? datadriven Slackware 2 01-22-2009 12:26 PM
NIC bonding between eth0 and wifi jonaskoelker LinuxQuestions.org Member Success Stories 3 11-03-2008 08:41 AM
bonding-problem, eth0,1,2 changes nic's max_mad Linux - Networking 5 09-13-2005 04:33 PM
Eth0 to WLAN0 how do i rename it? XeoNoX Linux - Wireless Networking 5 02-22-2004 05:54 AM
Starting wlan0 instead of eth0 eo697 Linux - Networking 2 10-12-2003 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration