NetBSD-Users archive

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

Re: Raspberry Pi as bridge



Jörn Clausen <joernc%googlemail.com@localhost> writes:

> I am trying to use a Raspberry Pi running
>
> NetBSD armv7 8.99.30 NetBSD 8.99.30 (RPI2)
>
> as a bridge to extend my WiFi net to some devices. I have two NICs,
> usmsc0 (internal RJ45) and urtwn0 (WiFi USB). urtwn0 is up and running
> and works as desired. I have followed the bridge instructions in the
> NetBSD guides, i.e.
>
> $ cat /etc/ifconfig.bridge0
> create
> !brconfig $int add urtwn0 add usmsc0 up

That is probably ok, but note that the interfaces each have to be up,
and generally you would have one configured with an address and one not.
I have done this on a box with two wired ethernets.  It generally works,
but there is some wierdness with ND6 in terms of getting replies on the
secondary (no-addr) interface with the mac addr of the primary
interface.

You didn't mention what you are doing about urtwn0 and config.   If you
are using it in hostap mode and using a different ssid, then that sounds
plausible.  I am unclear on what happens if the same ssid.

> tcpdump on either interface shows that broadcast packages are passed
> between interfaces, but nothing else. A DHCP request coming in via
> usmsc0 from a device is visible on urtwn0 but is not passed on to my
> DHCP server.

Defintely run 'brconfig bridge0' and look at the output.  In particular
you should see an "address cache" section, showing which mac addrs have
been learned as on each side.

To support bridging, an interface has to do PROMISC mode in hardware, so
that incoming packets with not-us unicast mac addresses are received.
The cache will help in understanding how that is working.

> I have
>
> net.inet.ip.forwarding = 1
>
> and because it sounded helpful also
>
> net.inet.ip.subnetsarelocal = 0
>
> but no change.

Your box is not intending to do ip forwarding.  So that's irrelevant,
and I would undo that setting, not because it's harmful, but because
it's non-standard and not helpful, and simpler is better.

> Any ideas? Is the Raspi kernel missing something that makes it
> unusable as a bridge?

If 'brconfig bridge0' looks ok, it has "pseudo-device bridge".


Feel free to send me 'ifconfig' and 'brconfig bridge0' offlist (as
unwrapped text/plain :-).


Home | Main Index | Thread Index | Old Index