NetBSD-Help archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: share one wireless adapter's connection to second device (wireless bridge?)



802.11 doesn't work this way. The access point you are connecting to knows each STAtion that is connected to it; the 802.11 packets has a different header with have additional Ethernet addresses to support functionality you desire, but it has to be enabled and/or negotiated on both sides.

Your "second" device, which is trying to bridge through your NetBSD box, has never sent 802.11 AUTH and ASSOC packets to the AP, so the AP is simply going to drop any packets that it receives from that MAC address -- and indeed, the wireless driver for the Linksys device probably drops them before sending them anyway (since the source address does not match it's own, and it knows the AP won't accept them).

There are technologies for solving this -- WDS (four-address 802.11 frames) for example -- but it requires configuration on both the client (STA) and access point side. I don't think the NetBSD 802.11 layer has built-in support for this right now, but I could be wrong.

Your simplest bet to solving the problem is to use a NAT connection over the wireless link.

Rob




On Mar 3, 2008, at 12:40 PM, Jeremy C. Reed wrote:

I am using ral0 which is a USB-based Linksys Wireless-G network adapter. (I've been using it for 1.5 years on different NetBSD systems. It works
well except I have to ping at least once every 170 seconds or it loses
connection.) My ral0 has an IP assigned and I use it.

I have an external device that uses DHCP to get a connection. I was hoping I could just plug it to my NetBSD's unused re0 device (RealTek 8100E/8101E
PCIe 10/100BaseTX (rev. 0x0)).

My first try was to create a bridge:

sudo ifconfig bridge0 create
sudo brconfig bridge0 add re0 add ral0 up

"brconfig -a" showed the bridge. After I turned on the device, "brconfig
-a" showed three more entries in the "Address cache".

tcpdump on re0 shows a bunch of SIP, igmp, DHCP traffic from my device. I can also see traffic from my DHCP server (the wireless router in the other room) on my re0 device (which is not wireless but on the bridge0). (I also
see 169.254.x.x traffic on re0.) (If you'd like me email this tcpdump
output to you, let me know.)

But my device never got its networking up. I am guessing that I can't
share multiple connections on that ral0 adapter. I don't know. (My ral0
continued to work fine.)

I could easily use ipf/ipnat or pf share the existing address using
address translation. But I'd prefer to not run a DHCP server for one
device as I already have DHCPd on this network. I was wondering if I could pass the DHCP requests across, but then the address translation would make
it appear from ral0 (which already has its own IP assigned).

My situation is that my office has no wired network but the device needs
to be wired.

Any suggestions on sharing that ral0 device?

Or should I purchase some wireless bridge? What?

Or what can I do with NetBSD for this?



  Jeremy C. Reed



Home | Main Index | Thread Index | Old Index