From owner-freebsd-questions@FreeBSD.ORG Sat May 5 19:29:37 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 423B6106564A for ; Sat, 5 May 2012 19:29:37 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id E90D58FC0C for ; Sat, 5 May 2012 19:29:36 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SQkff-00039q-QG; Sat, 05 May 2012 20:29:35 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SQkff-0003nA-12; Sat, 05 May 2012 20:29:35 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q45JTYvD034274; Sat, 5 May 2012 20:29:34 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q45JTYBu034273; Sat, 5 May 2012 20:29:34 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Sat, 5 May 2012 20:29:34 +0100 From: Anton Shterenlikht To: Robert Bonomi Message-ID: <20120505192934.GB34222@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: Robert Bonomi , freebsd-questions@freebsd.org, mexas@bristol.ac.uk References: <20120505162448.GA33675@mech-cluster241.men.bris.ac.uk> <201205051832.q45IW06Q055670@mail.r-bonomi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205051832.q45IW06Q055670@mail.r-bonomi.com> User-Agent: Mutt/1.4.2.3i Cc: mexas@bristol.ac.uk, freebsd-questions@freebsd.org Subject: Re: help debug bwn(4) wireless X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2012 19:29:37 -0000 On Sat, May 05, 2012 at 01:32:00PM -0500, Robert Bonomi wrote: > > : Anton Shterenlikht wrote: > > On Fri, May 04, 2012 at 04:56:33PM -0500, Robert Bonomi wrote: > > > > > > It looks like you're missing a route. > > > > > > I suspect you've got a wired ethernet port, that is being conigured > > > with a default address. and the default route points -there-. > > > > > > Please show the output of 'ifconfig -a', and 'netstat -nr'. > > > > # ifconfig -a > > bge0: flags=8843 metric 0 mtu 1500 > > options=8009b > > ether 00:1a:4b:89:4b:4e > > inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255 > > nd6 options=29 > > media: Ethernet autoselect (100baseTX ) > > status: active > > lo0: flags=8049 metric 0 mtu 16384 > > options=3 > > inet6 ::1 prefixlen 128 > > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8 > > inet 127.0.0.1 netmask 0xff000000 > > nd6 options=21 > > bwn0: flags=8843 metric 0 mtu 2290 > > ether 00:c0:49:58:00:fe > > nd6 options=29 > > media: IEEE 802.11 Wireless Ethernet autoselect mode 11g > > status: associated > > wlan0: flags=8843 metric 0 mtu 1500 > > ether 00:c0:49:58:00:fe > > inet 192.168.1.104 netmask 0xffffff00 broadcast 192.168.1.255 > > nd6 options=29 > > media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g > > status: associated > > ssid lagartixa channel 11 (2462 MHz 11g) bssid 00:18:39:e6:46:b6 > > country US authmode WPA2/802.11i privacy ON deftxkey UNDEF > > AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 450 bgscan > > bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS > > wme roaming MANUAL > > > > > > > > # netstat -nr > > Routing tables > > > > Internet: > > Destination Gateway Flags Refs Use Netif Expire > > default 192.168.1.1 UGS 0 624 bge0 > > 127.0.0.1 link#8 UH 0 0 lo0 > > 192.168.1.0/24 link#1 U 0 0 bge0 > > 192.168.1.101 link#1 UHS 0 0 lo0 > > 192.168.1.104 link#10 UHS 0 0 lo0 > > > > BINGO! > > You are using *both* a hard-wired connection (bge0) and a wireless (wan0) one. > > You have configured _both_ adresses on the *same* LAN netblock > (192.168.1.0/255). > > This is a big 'no-no'. > > Different enterfaces o difereent LANs _have_ to be in different netblocks. > > As you can see from the 'routing table' *everything* is routed over 'bge0', > the _wired_ connection. > > > I don't knoe enough about your neteork 'architecture' to guess what you're > -trying- to do, but you'r doing it wrong. > > At a -minimum-, you need to: > 1) use different networks/subnets for the wired network (where 'bge0' is > connected) and the wireless network (accessed through 'wlan0'). Tell > the wireless access point to hand out DHCP addresses from the netblock > 192.168.2.0/24, for example. > 2) make sure that the configuration for 'bge0' does -not- set up that > interface as the 'default' route. > 3) ADD configurationn info to use 'wlan0' as the 'default' route. > > If you're tryinng to use this computer to 'share' the wireless connection > with other machines on the wired network, you will need to enable > 'gateway'/'forwarding'/'routing' on this box, to pass packets between > the interfaces. Thank you. Replying via wireless: # netstat -finet -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.1.1 UGS 0 1243 wlan0 127.0.0.1 link#8 UH 0 82 lo0 192.168.1.0/24 link#10 U 0 6 wlan0 192.168.1.104 link#10 UHS 0 0 lo0 # I'm afraid I understand very little from what you've written. Sorry to be such a shmuck. I've read a couple of books on networking, someting like Patterson & Hennesy (?) Networking - system approach (?), but I still find the whole networking area perfectly impenetrable. (If you can recommend a really introductory book on the subject, I'd really appreciate it. Something that explains the whole terminology behind e.g. netstat - protocol, socket, interface, multicast, etc.) So, what I did is I disabled bge completely, i.e. removed from /etc/rc.conf, and I remembered to include wlan0 in /etc/ipf.rules. This works ok. I'll need to think of an easy system to switch from bge to bwn. I usually use bge with static ip address at work and I'm trying to use bwn at home. Many thanks for your help -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423