You are not logged in.

#1 2012-09-26 10:11:54

marcus
Member
Registered: 2012-09-26
Posts: 13

[SOLVED] bonding + net-auto-wireless

Hello everyone,

first of all: this is a great forum! I've found a lot of help here! Thank you!

Now to my problem:
I've been setting up a bonding connection (eth0 + wlan0) on my notebook, so I don't have to reconnect each time I unplug eth0.
config for bond0:

CONNECTION="bonding"
INTERFACE="bond0"
SLAVES="eth0"
IP="static"
ADDR="10.0.0.3"
GATEWAY="10.0.0.1"
DNS=("10.0.0.1")
SLAVE_TIMEOUT=5

config for wlan0

CONNECTION="wireless"
ESSID="somename"
INTERFACE="wlan0"
SCAN="yes"
IP="static"
IFOPTS="0.0.0.0"
SECURITY="wpa"
KEY="somepassword"
PRE_UP="ifenslave bond0 wlan0"
POST_DOWN="ifenslave -d bond0 wlan0"

It's working perfectly, when started manually:

netcfg bond0-profile
netcfg wlan0-profile

But if I try to start wlan0 with the net-auto-wireless daemon, it doesn't get enslaved.
syslog.log, messages.log, errors.log ... don't give any clues.
Does anyone know a way to solve this?

Thanks in advance!
marcus

Last edited by marcus (2013-02-06 10:06:43)

Offline

#2 2013-02-06 10:06:00

marcus
Member
Registered: 2012-09-26
Posts: 13

Re: [SOLVED] bonding + net-auto-wireless

Hi everyone,
I've figured it out myself.
configs below, if anyone wants to know.
The wired NIC is USB, so the interface gets (dis)connected, not the LAN-cable

Wireless IF:

CONNECTION="wireless"
INTERFACE="wlan0"
DESCRIPTION="Automatically generated profile"
SCAN="yes"
IP="static"
ESSID="essid"
SECURITY="wpa"
KEY="key"
POST_UP="netcfg bond0 && other_commands"
POST_DOWN="netcfg down bond0"

bond0:

CONNECTION="bonding"                                                                                                                                       
INTERFACE="bond0"
SLAVES="wlan0"
IP="static"
ADDR="10.0.0.4"
GATEWAY="10.0.0.1"
DNS=("10.0.0.1")
SLAVE_TIMEOUT=5
POST_UP="sleep 3 && [ -e /sys/class/net/eth0 ] && ifenslave bond0 eth0"
PRE_DOWN="[ -e /sys/class/net/eth0 ] && ifenslave -d bond0 eth0"

udev rule, to automatically enslave eth0 if plugged in:

KERNEL=="eth0", SUBSYSTEM=="net", ACTION=="add", RUN+="/sbin/ifenslave bond0 eth0"

Marking thread as solved.

Offline

Board footer

Powered by FluxBB