From owner-freebsd-net@FreeBSD.ORG Tue Oct 4 07:35:22 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 CDD6B16A446 for ; Tue, 4 Oct 2005 07:35:22 +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 5B3CD43D46 for ; Tue, 4 Oct 2005 07:35:22 +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 1EMhK1-0003aw-C3; Tue, 04 Oct 2005 09:34:46 +0200 Date: Tue, 4 Oct 2005 09:35:17 +0200 From: Marcin Jessa To: SAMU Message-Id: <20051004093517.15e368f2.lists@yazzy.org> In-Reply-To: <372828116.20051004102540@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> 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 07:35:22 -0000 On Tue, 4 Oct 2005 10:25:40 +0400 Andrey Smagin wrote: > Hello Marcin, > > MJ> man ifconfig should be the place to start. > :) re read it 2 year, for information about > MJ> Anyway, you can connect two PCs when one of them runs in > MJ> hostap and the other one in ad-hoc mode. > MJ> This will set up one of them as AP: > MJ> ifconfig_ath0="inet 12.23.34.1 netmask 255.255.255.0 ssid Andrey > MJ> mode 11g mediaopt hostap" > > MJ> And one in adhoc: > MJ> ifconfig_ath0="inet 12.23.34.1 netmask 255.255.255.0 ssid Andrey > MJ> channel 6 mode 11g mediaopt adhoc" > > MJ> You can also run both atheros nics in ad-hoc mode and bridge their > MJ> interfaces with wired nics. > > My most qestion - how increase speed for ad-hoc<=>ad-hoc connection. > It mode have very small speed(40KBy/s) . For me important bridge on > both sides for connect 2 wired LAN segments through air. When i > connect client<=>hostup bridging not work (but speed 2MBy/s between > this hosts). I am will try ad-hoc<=>hostap. How are you bridging the interfaces? What kind of bridging mechanism are you using? Anyway, the difference in speed is indeed strange. Try to set following: sysctl dev.ath.0.tpscale=1 sysctl dev.ath.0.tpc=1 sysctl dev.ath.0.diversity=0 ifconfig ath0 protmode off ifconfig ath0 mtu 2290 You could also use device tap (virtual ethernet) and connect two lan's that way running one link in hostap and the other bss mode. Check out the vtun port. > MJ> And you can set up your atheros access point as apbridge which > MJ> will pass packets between wireless clients directly. > > For me not enough for connect another WiFi clients, now configured > -apbridge. > > MJ> You cannot connect two APs in hostap mode as they will never > MJ> associate to one another. > I am not sure why you have such a speed loss running in adhoc mode. What I noticed on NetBSD (where the ath driver is not yet fully ported) was I got pretty decent speed with the same setup as yours (2xath in adhoc bridged with wired nics) but my embedded devices allways crashed when I sent over many small packets. Cheers Marcin