![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
|
|
Networking & Wireless Having problems getting connected to the internet or getting your wireless card to work? Ask here. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Just Give Me the Beans!
![]() Join Date: Jul 2007
Beans: 63
|
Wireless NIC Bonding troubles
I am trying to set up host-to-host wireless link between two ubuntu machines. Each has two wireless NICs with Atheros chipsets (ath0 and ath1). Let's call my two machines host A and host B. I would like to put each card in ad hoc mode and configure so that there is a link between A.ath0 and B.ath0 on channel 1 and between A.ath1 and B.ath1 on channel 11.
Then on each machine I want to use the linux bonding driver in round-robin mode to bond the ath0 and ath1 devices into one virtual interface in an attempt to increase streaming throughput between the two machines. So far I have successfully set up the ad hoc links. They can run at the same time in parallel with good throughput (around 30 Mb/s). However, I cannot bond the interfaces. I am trying the following: Code:
modprobe bonding miimon=100 mode=0 ifconfig bond0 192.168.1.XXX ifenslave bond0 ath0 ath1 Then I configure the ad hoc links using madwifi tools: Code:
/etc/dbus-1/event.d/25NetworkManager stop wlanconfig ath0 destroy wlanconfig ath0 create wlandev wifi0 wlanmode adhoc iwconfig ath0 essid 'adhoc0' iwconfig ath0 channel 1 iwconfig ath0 key 'password' ifconfig ath0 up ifconfig ath0 192.168.0.YYY ifconfig ath0 netmask 255.255.255.0 ifconfig ath0 broadcast 192.168.0.255 wlanconfig ath1 destroy wlanconfig ath1 create wlandev wifi1 wlanmode adhoc iwconfig ath1 essid 'adhoc1' iwconfig ath1 channel 11 iwconfig ath1 key 'password' ifconfig ath1 up ifconfig ath1 192.168.2.YYY ifconfig ath1 netmask 255.255.255.0 ifconfig ath1 broadcast 192.168.2.255 The bonding instructions I quoted above work for a similar setup with wired ethernet links instead of wireless. I have also tried using arp instead of mii when loading the bonding driver -- same problem. Any ideas? Thanks, S. |
|
|
|
|
|
#2 | |
|
Has an Ubuntu Drip
![]() Join Date: Jun 2005
Location: Switzerland
Beans: 771
Ubuntu 8.10 Intrepid Ibex
|
Re: Wireless NIC Bonding troubles
Quote:
The other thing was: I remember reading about bonding that the member interfaces (or their drivers/kernel modules, at that) needed to support the ethtool interface - at least for some bonding modes. That's something 802.11 interfaces/drivers probably can't. If bonding will ultimately fail, you might think along the following lines for another approach:
Edit: Oh - and the most important question: What does dmesg or /var/log/syslog say when the bond is formed? I think it reports if the member interfaces of the link bundle have been (un)successfully "enslaved". If something goes wrong, the output should have some hints... best regards Marc
__________________
The story so far: In the beginning the Universe was created.This has made a lot of people very angry and has been widely regarded as a bad move. Douglas Adams, The Restaurant at the End of the Universe Last edited by netztier; August 21st, 2007 at 02:59 AM.. |
|
|
|
|
|
|
#3 |
|
new Other OS Talk fora, C signature
![]() |
Re: Wireless NIC Bonding troubles
Agreed.
__________________
So Long, and Thanks for All the Fish How To Ask Questions The Smart Way new Other OS Talk forum |
|
|
|
|
|
#4 | ||||
|
Just Give Me the Beans!
![]() Join Date: Jul 2007
Beans: 63
|
Re: Wireless NIC Bonding troubles
Quote:
Quote:
Quote:
Quote:
Code:
[17331887.456000] Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006) [17331887.456000] bonding: ARP monitoring set to 2000 ms with 1 target(s): 192.168.1.113 [17331887.468000] ADDRCONF(NETDEV_UP): bond0: link is not ready [17331887.552000] bonding: bond0: Warning: failed to get speed and duplex from ath0, assumed to be 100Mb/sec and Full. [17331887.552000] bonding: bond0: enslaving ath0 as an active interface with an up link. [17331887.600000] bonding: bond0: Warning: failed to get speed and duplex from ath1, assumed to be 100Mb/sec and Full. [17331887.600000] bonding: bond0: enslaving ath1 as an active interface with an up link. [17331888.460000] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready [17331889.472000] bonding: bond0: interface ath0 is now down. [17331889.472000] bonding: bond0: interface ath1 is now down. [17331889.472000] bonding: bond0: now running without any active interface ! |
||||
|
|
|
|
|
#5 | ||
|
Has an Ubuntu Drip
![]() Join Date: Jun 2005
Location: Switzerland
Beans: 771
Ubuntu 8.10 Intrepid Ibex
|
Re: Wireless NIC Bonding troubles
Quote:
Quote:
best regards Marc
__________________
The story so far: In the beginning the Universe was created.This has made a lot of people very angry and has been widely regarded as a bad move. Douglas Adams, The Restaurant at the End of the Universe |
||
|
|
|
|
|
#6 | |
|
Just Give Me the Beans!
![]() Join Date: Jul 2007
Beans: 63
|
Re: Wireless NIC Bonding troubles
Thanks for the suggestions.
Quote:
Code:
eth1 mac 01:23:45:67:89:10 eth2 mac 10:98:76:54:32:10 I have also tried using wlanconfig to create the VAP as ethX instead of athX. In this case the links do not work. So it seems like renaming might not help here, unless there is something I am doing wrong. Thanks, S. Last edited by sricketts; August 22nd, 2007 at 05:51 PM.. |
|
|
|
|
|
|
#7 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Beans: 593
|
Re: Wireless NIC Bonding troubles
K I've gotten this working but I used 2 different aps and although I did get added reliability I did not get any boost in speed. I'll post my script that got it working in a little bit,
(I'm not on the computer with the scirpt) basically: I set up the bonding, associated the wireless cards to the aps, I was using a network where both aps used the same essid but don't believe this to be an issue. I can't remeber if I posted a howto but will post my script that works.
__________________
HOWTO Broadcom| AUTOMATATED install ndiswrapper| ndis from source | Windows wireless driver |
|
|
|
|
|
#8 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Beans: 593
|
Re: Wireless NIC Bonding troubles
sorry I haven't read into your problem too deep, my life's really busy but here is the script that I used to successfully get nic bonding.
Code:
#/bin/bash sudo ifconfig wlan0 down sudo ifconfig bond0 down sudo ifconfig eth1 down sudo ifconfig eth2 down sudo ip link set dev wlan0 name eth1 sudo ifconfig eth2 up sudo ifconfig eth1 up sleep 2 sudo iwconfig eth1 essid ubc sudo iwconfig eth2 essid ubc sudo ifconfig bond0 192.168.1.100 up # static address sudo ifenslave bond0 eth1 eth2 sudo dhclient bond0
__________________
HOWTO Broadcom| AUTOMATATED install ndiswrapper| ndis from source | Windows wireless driver |
|
|
|
|
|
#9 |
|
Just Give Me the Beans!
![]() Join Date: Jul 2007
Beans: 63
|
Re: Wireless NIC Bonding troubles
Thanks to trubblemaker and netztier for the suggestions.
I have tried two more approaches. First of all, I wanted to continue to test the hypothesis that the bonding tool does not like names like ath0. So I took from trubblemaker's script the line that changes the name of wlan0 and inserted it into my script for setting up the ad hoc links. Code:
/etc/dbus-1/event.d/25NetworkManager stop wlanconfig ath0 destroy wlanconfig ath0 create wlandev wifi0 wlanmode adhoc ip link set dev ath0 name eth1 iwconfig eth1 essid 'adhoc0' iwconfig eth1 channel 1 iwconfig eth1 key 'password' ifconfig eth1 up ifconfig eth1 192.168.0.YYY ifconfig eth1 netmask 255.255.255.0 ifconfig eth1 broadcast 192.168.0.255 wlanconfig ath1 destroy wlanconfig ath1 create wlandev wifi1 wlanmode adhoc ip link set dev ath0 name eth2 iwconfig eth2 essid 'adhoc1' iwconfig eth2 channel 11 iwconfig eth2 key 'password' ifconfig eth2 up ifconfig eth2 192.168.2.YYY ifconfig eth2 netmask 255.255.255.0 ifconfig eth2 broadcast 192.168.2.255 Another approach as suggested by netztier was to use advanced linux routing. A howto describes using tc to achieve round-robin load balancing just like the bonding driver. http://lartc.org/howto/lartc.loadshare.html After running the ad hoc script, I followed this howto closely but not exactly. I ran the following: Code:
tc qdisc add dev eth1 root teql0 tc qdisc add dev eth2 root teql0 ip link set dev teql0 up On host A: Code:
ip addr add dev eth1 10.0.0.0/31 ip addr add dev eth2 10.0.0.2/31 ip addr add dev teql0 10.0.0.4/31 Code:
ip addr add dev eth1 10.0.0.1/31 ip addr add dev eth2 10.0.0.3/31 ip addr add dev teql0 10.0.0.5/31 So still no success, although somehow I still feel like this should be possible. Thanks, S. |
|
|
|
|
|
#10 |
|
Just Give Me the Beans!
![]() Join Date: Jul 2007
Beans: 63
|
Re: Wireless NIC Bonding troubles
Update: I finally got the bond to "work" in the sense that I can ping between the bond0 interfaces. I had to move the bond0 interfaces to a different subnet from the ath* interfaces:
Code:
modprobe bonding miimon=100 mode=0 ifconfig bond0 192.168.2.XXX ifenslave bond0 ath0 ath1 I can't run iperf to get throughput measurements -- it just hangs after establishing the connection. How can I figure out where the packets are going? Do I need to put some printfs in the bonding driver code and recompile? Is there a tool that would help me here? Thanks, S. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|