Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 May 2012 20:29:34 +0100
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        Robert Bonomi <bonomi@mail.r-bonomi.com>
Cc:        mexas@bristol.ac.uk, freebsd-questions@freebsd.org
Subject:   Re: help debug bwn(4) wireless
Message-ID:  <20120505192934.GB34222@mech-cluster241.men.bris.ac.uk>
In-Reply-To: <201205051832.q45IW06Q055670@mail.r-bonomi.com>
References:  <20120505162448.GA33675@mech-cluster241.men.bris.ac.uk> <201205051832.q45IW06Q055670@mail.r-bonomi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 05, 2012 at 01:32:00PM -0500, Robert Bonomi wrote:
> 
> : Anton Shterenlikht <mexas@bristol.ac.uk> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> >     options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
> >     ether 00:1a:4b:89:4b:4e
> >     inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255 
> >     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> >     media: Ethernet autoselect (100baseTX <full-duplex>)
> >     status: active
> > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
> >     options=3<RXCSUM,TXCSUM>
> >     inet6 ::1 prefixlen 128 
> >     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8 
> >     inet 127.0.0.1 netmask 0xff000000 
> >     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> > bwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
> >     ether 00:c0:49:58:00:fe
> >     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> >     media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
> >     status: associated
> > wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> >     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.  <wry grin>
> 
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120505192934.GB34222>