From owner-freebsd-net@FreeBSD.ORG Tue Oct 4 13:18:44 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14F5B16A41F for ; Tue, 4 Oct 2005 13:18:44 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from mail.yazzy.org (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D02E43D45 for ; Tue, 4 Oct 2005 13:18:43 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from 217-13-2-82.dd.nextgentel.com ([217.13.2.82] helo=marcin) by mail.yazzy.org with esmtps (TLSv1:AES256-SHA:256) (YazzY.org) id 1EMmgI-0001Sp-Jv; Tue, 04 Oct 2005 15:18:09 +0200 Date: Tue, 4 Oct 2005 15:18:42 +0200 From: Marcin Jessa To: SAMU Message-Id: <20051004151842.66ffca58.lists@yazzy.org> In-Reply-To: <1721705859.20051004163721@mail.ru> References: <20050926195807.GD95971@sandvine.com> <17208.30606.117170.36398@khavrinen.csail.mit.edu> <20050927001650.GA9994@sandvine.com> <20050927180021.GB9994@sandvine.com> <433A2882.4030003@freebsd.org> <433A2D6E.7020205@freebsd.org> <20050928152112.GC9994@sandvine.com> <2262110.20050928194326@mail.ru> <584642479.20050930101019@mail.ru> <20050930095743.402e56cd.lists@yazzy.org> <372828116.20051004102540@mail.ru> <20051004093517.15e368f2.lists@yazzy.org> <1721705859.20051004163721@mail.ru> Organization: YazzY.org X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) Cc: freebsd-net@freebsd.org Subject: Re: How connect 2 PC with ath in hostap mode ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2005 13:18:44 -0000 On Tue, 4 Oct 2005 16:37:21 +0400 Andrey Smagin wrote: > Hello Marcin, > > Tuesday, October 4, 2005, 11:35:17 AM, you wrote: > > > MJ> How are you bridging the interfaces? What kind of bridging > MJ> mechanism are you using? > > In FreeBSD: > kldload ath, ath_hal, bridge, fxp Recompile your kernel with following options. device wlan # 802.11 support device ath device ath_hal device ath_rate_sample > On both host: > ifconfig_ath0="inet ssid 1234 channel 6 mode 11g mediaopt adhoc" > in sysctl.conf > hw....bridge.config=ath0:1,fxp0:1 > hw....bridge.enable=1 > > ipfw allow ip from any to any > in this mode speed about 8KBy/s Try to use if_bridge instead ifconfig bridge0 create up ifconfig bridge0 addm ath0 fxp0 etc... The "old" bridge code is removed from CURRENT anyway. Try to play with different sysctl values for ath as well, it may or may not have an impact on your performance. > ifconfig_ath0="inet ssid 1234 channel 6 media OFDM54 mode 11g > mediaopt adhoc" increase speed up to 45-50 KBy/s Right, still pretty little. You should get between 2-7 MB/s > Bridging work fine and uptime for both host more > wheek under full load :) (40KBy/s over wireless) > Some strange - ping report low average delay about > 0.700ms for any host in another net segment. Try to adjust values of ACK timing, I have made a table with some proposed values: http://www.wifibsd.org/docs/atheros.php > MJ> Anyway, the difference in speed is indeed strange. > MJ> Try to set following: > MJ> sysctl dev.ath.0.tpscale=1 > MJ> sysctl dev.ath.0.tpc=1 > MJ> sysctl dev.ath.0.diversity=0 > MJ> ifconfig ath0 protmode off > MJ> ifconfig ath0 mtu 2290 > MJ> You could also use device tap (virtual ethernet) and connect two > MJ> lan's that way running one link in hostap and the other bss mode. > MJ> Check out the vtun port. > Thanks i will try it. > > MJ> I am not sure why you have such a speed loss running in adhoc > MJ> mode. What I noticed on NetBSD (where the ath driver is not yet > MJ> fully ported) was I got pretty decent speed with the same setup > MJ> as yours (2xath in adhoc bridged with wired nics) but my embedded > MJ> devices allways crashed when I sent over many small packets. > I think this is a driver problem, two ap sucessfully connect > with each other, why hostap can't do this ? That's becouse FreeBSD ath hostap is for access points , not for interaction between two APs. >I tested D-Link 624 WiFi > router, D-Link 2100AP, DWL-520+, DWL-G520. On DWL-520+ - acx chipset, > it speed not more 8KBy/s with adhoc<=>adhoc connection(but under W2K > it have fullspeed 800KBy/s in this mode). I bought DWL-G520 on ath > chipset, upgraded hosts hardware up 850MHz processor, new MB, more > RAM, but it not resolve the problem, with 54MBit/s connection, speed > is too small. D-Link AP, with WiFi router have good connection and > speed 38MBit/s(2MBy/s). Did you run tcpdump on both the hosts to find out what may be causing your problems? I will test adhoc between two atheros boxes at home today.