Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 2003 12:22:48 +0200
From:      "Tom Dymond" <tom@kmem.org>
To:        <freebsd-stable@freebsd.org>
Subject:   bridge troubles with wi
Message-ID:  <07ab01c39306$489b9af0$7701a8c0@xtom>

next in thread | raw e-mail | index | archive | help
Hi,

I'm trying to configure my freebsd machine as an adsl router wifi access
point for my flat.
So far, the wireless clients are able to access the LAN (except for the
router) but unable to access internet, or ping the router.



i've recently purchased this card :
Netgear MA311.
i installed this card into a windows XP machine to update the firmware to
version 1.4.9 then i put it into the freebsd box

I added wi support during boot by adding this line to my /boot/loader.conf
along with support for miibus and rl :

miibus_load="YES"
if_rl_load="YES"
if_wi_load="YES"

/var/run/dmesg.boot shows this :

wi0: <Intersil Prism2.5> mem 0xeb000000-0xeb000fff irq 12 at device 5.0 on
pci2
wi0: 802.11 address: 00:09:5b:67:4b:7e
wi0: using RF:PRISM2.5 MAC:ISL3874A(Mini-PCI)
wi0: Intersil Firmware: Primary 1.01.00, Station 1.04.09

I also have 2 realtek PCI nics (i know they are the worst, but until now
they have done the job at home)

rl0: <RealTek 8139 10/100BaseTX> port 0xc000-0xc0ff mem
0xea000000-0xea0000ff irq 10 at device 0.0 on pci2
rl0: Ethernet address: 00:50:8d:47:e5:67
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl1: <RealTek 8139 10/100BaseTX> port 0xc400-0xc4ff mem
0xea001000-0xea0010ff irq 11 at device 2.0 on pci2
rl1: Ethernet address: 00:50:fc:47:84:38
miibus1: <MII bus> on rl1
rlphy1: <RealTek internal media interface> on miibus1
rlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

my network is 10.0.2.0/24
the lan ip of my router is 10.0.2.1 on rl0
my public internet IP is 82.67.52.66 on rl1
i run a jail that is 10.0.2.9 aliased on rl0

i have setup my AP with this executable script placed in /usr/local/etc/rc.d
named 001.wifi.sh

--- start of script --- ( wep keys removed )

#!/bin/sh

ifconfig wi0 inet up ssid my_wifi media DS/11Mbps mediaopt hostap

wicontrol -e 1

wicontrol -k 0xXXXXXXXXXXXXXXXXXXXXXXXXXX -v 1
wicontrol -k 0xXXXXXXXXXXXXXXXXXXXXXXXXXX -v 2
wicontrol -k 0xXXXXXXXXXXXXXXXXXXXXXXXXXX -v 3
wicontrol -k 0xXXXXXXXXXXXXXXXXXXXXXXXXXX -v 4

wicontrol -T 1

wicontrol -f 6

wicontrol -s "FreeBSD_AP"

sysctl net.link.ether.bridge=1
sysctl net.link.ether.bridge_cfg="wi0 rl0"
sysctl net.inet.ip.forwarding=1

--- end of script  ---


my ifconfig :

cube> ifconfig
rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet 10.0.2.1 netmask 0xffffff00 broadcast 10.0.2.255
        inet 10.0.2.9 netmask 0xffffffff broadcast 10.0.2.9
        ether 00:50:8d:47:e5:67
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 82.67.52.66 netmask 0xffffff00 broadcast 82.67.52.255
        ether 00:50:fc:47:84:38
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
wi0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        ether 00:09:5b:67:4b:7e
        media: IEEE 802.11 Wireless Ethernet DS/11Mbps <hostap>
        status: associated
        ssid my_wifi 1:my_wifi
        stationname FreeBSD_AP
        channel 6 authmode OPEN powersavemode OFF powersavesleep 100
        wepmode MIXED weptxkey 1
        wepkey 1:128-bit wepkey 2:128-bit wepkey 3:128-bit wepkey 4:128-bit
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 10.0.2.1 --> 192.168.1.1 netmask 0xff000000
        Opened by PID 235
tun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 10.0.2.1 --> 10.0.6.1 netmask 0xff000000
        Opened by PID 163


wicontrol output :

cube> wicontrol
NIC serial number:                      [ 99SA01000000 ]
Station name:                           [ FreeBSD_AP ]
SSID for IBSS creation:                 [ my_wifi ]
Current netname (SSID):                 [ my_wifi ]
Desired netname (SSID):                 [ my_wifi ]
Current BSSID:                          [ 00:09:5b:67:4b:7e ]
Channel list:                           [ 8191 ]
IBSS channel:                           [ 6 ]
Current channel:                        [ 6 ]
Comms quality/signal/noise:             [ 0 81 27 ]
Promiscuous mode:                       [ Off ]
Process 802.11b Frame:                  [ Off ]
Intersil-Prism2 based card:             [ 1 ]
Port type (1=BSS, 3=ad-hoc):            [ 6 ]
MAC address:                            [ 00:09:5b:67:4b:7e ]
TX rate (selection):                    [ 11 ]
TX rate (actual speed):                 [ 2 ]
RTS/CTS handshake threshold:            [ 2347 ]
Create IBSS:                            [ Off ]
Access point density:                   [ 1 ]
Power Mgmt (1=on, 0=off):               [ 0 ]
Max sleep time:                         [ 100 ]
WEP encryption:                         [ On ]
TX encryption key:                      [ 1 ]
Encryption keys:                        [  ][  ][  ][  ]



The wireless clients are using windows XP with a dlink wifi card under the
name : DWL-650+ (note that this is *not* the same as the DWL-650 card)

note : firewall allowing everything through

cube# ipfw show 1
00001      10988     964347 allow ip from any to any

now the tests :


10.0.2.30 is a client connected to an ethernet switch that is connected to
rl0 on the router
10.0.2.99 is a client connected through the Access point


10.0.2.30 can ping 10.0.2.99
10.0.2.30 can ping 10.0.2.1
10.0.2.99 cannot ping 10.0.2.1

when 10.0.2.1 tries to ping 10.0.2.99 this is what tcpdump sees :

# tcpdump: listening on rl0
12:09:50.169209 arp who-has 10.0.2.99 (0:50:8d:47:e5:67) tell cube.kmem.org

also, 10.0.2.99 is unable to ping 10.0.2.9

Thanks a lot if i can get some help

Sorry if this message is long,


Tom




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?07ab01c39306$489b9af0$7701a8c0>