You are not logged in.

#1 2012-01-19 18:02:06

ramblurr
Member
Registered: 2010-04-19
Posts: 3

Bonding wlan0 and ppp0

I am attempting to setup a bond0 interface with wlan0 and ppp0 as a slave. ppp0 is a 3g modem. I've successfully added wlan0 as a slave, however enslaving ppp0 is eluding me.

I'm using 'netcfg-bonding' and 'netcfg-wvdial' from AUR.

Here is my configuration:

/etc/network.d/bonded 
-----------------------------
CONNECTION="bonding"
INTERFACE="bond0"
# I bond eth0, even if it isnt used, because I need at least one slave.
# wlan0 cant go here, because it needs to do SSID seleciton, 
# WEP/WPA stuff which the bonding profile doesn't know about.
SLAVES="eth0" 
IP="dhcp"
DHCP_TIMEOUT=10
/etc/network.d/my_wlan_network
-----------------------------------------
CONNECTION="wireless"
ESSID="MyESSID"
INTERFACE="wlan0"
DESCRIPTION="Automatically generated profile"
SCAN="yes"
IP="dhcp"
TIMEOUT="10"
SECURITY="wpa"
KEY="MyKey"

IP="static"
IFOPTS="0.0.0.0"
PRE_UP="ifenslave bond0 wlan0"
PRE_DOWN="ifenslave -d bond0 wlan0"
/etc/network.d/3g_network
--------------------------
CONNECTION="wvdial"
WVDIAL_PROFILE="Claro"
INTERFACE="ignore"
WVDIAL_CTL_FILE="/tmp/wvdial.pid"
WVDIAL_FLAGS=""
/etc/ppp/ip-pre-up
----------------------- 
#!/bin/sh
/sbin/ifenslave -v bond0 $IFNAME &> /tmp/ppp_log

Notice I'm attempting to enslave the ppp0 interface using pppd's ip-pre-up script.

I start this all with:

sudo netcfg -u bonded
sudo netcfg -u my_wlan_network
sudo netcfg -u 3g_network

When started, wlan0 is started and slaved correctly. ppp0 is started correctly but isn't enslaved.  I get the following error in /tmp/ppp_log:

current hardware address of master 'bond0' is 18:3d:a2:7a:dd:b4, type 1
Interface 'ppp0': flags set to 1090.
Interface 'ppp0': address cleared
Master 'bond0': Error: SIOCBONDENSLAVE failed: Invalid argument
Master 'bond0': Error: SIOCSIFHWADDR failed: Device or resource busy
Slave 'ppp0': MTU set to 1500.
Master 'bond0', Slave 'ppp0': Error: Enslave failed

The "Invalid argument" but I suspect might be the problem, can pptp ifaces even be enslaved? I can't seem to find anything regarding this.

Edit: Is this even possible (bonding separate networks)? I'm beginning to think I am misunderstanding how bonding works.

Last edited by ramblurr (2012-01-19 18:09:58)

Offline

Board footer

Powered by FluxBB