Live data from Hacker News

Raspberry Pi WiFi to ethernet bridge

willhaley.com

61–67 of 67 posts

Re: Raspberry Pi WiFi to ethernet bridge

#62
post #59

I used an Intel NUC running Debian Stretch as wireless access point for month. All I had to do was to assign all the interface (the internal ethernet one, an USB-ethernet adapter, and hostapd, the access point daemon) to the same network bridge `br0`. That's all. Even hotplugging the usb-ethernet adapter worked fine. For those curious, find the `/etc/network/interfaces` and `/etc/hostapd.conf` here: (Grep for `br0` i…

On wired ethernet, a packet contains the MAC address of the destination host. Switches across the network keep track of which port a given MAC address is associated with and forward it appropriately. Wifi doesn't have the same concept - the only destination MAC address in a standard 802.11 packet is that of the destination Wifi station. So, if you have a device on Wifi with several wired devices behind it, and you wa…

The 802.11 header has 4 MAC addresses: Source Address (SA), Destination Address (DA), Transmitter Address (TA), Receiver Address (RA). The TA and RA are those of the Wifi station and SA and DA are the Ethernet addresses. This allows bridging Ethernet and Wifi interfaces and it is how many (most?) Linux-based Wifi routers work.

Re: Raspberry Pi WiFi to ethernet bridge

#63
post #29

I’m trying to understand why this is better than a usb WiFi dongle, and coming up empty. Anyone have an idea?

No driver, processing or configuration is required on the bridged machine. This is good for devices you can't install a driver on (smart TVs, networked printers, any other appliance). No configuration also means you don't have to risk your wifi password being stored/shared with third parties.

Gotcha. These are actual great use cases. I wonder if there’s a market to make an actual dedicated consumer device.

I guess the main issue is that Ethernet ports are going the way of the dodo.

Re: Raspberry Pi WiFi to ethernet bridge

#64
post #45
post #29

I’m trying to understand why this is better than a usb WiFi dongle, and coming up empty. Anyone have an idea?

You have a printer thats no where near a wired port. Your USB stick isnt going to work in this case.

Similar case, I did this with a home security system when I moved in. It's old but has a web interface for viewing some alarm data, and can technically reach out to the web for sending alarms. The panel is in a closet so the Pi worked perfectly.

Re: Raspberry Pi WiFi to ethernet bridge

#65
post #63

Earlier quoted context omitted.

No driver, processing or configuration is required on the bridged machine. This is good for devices you can't install a driver on (smart TVs, networked printers, any other appliance). No configuration also means you don't have to risk your wifi password being stored/shared with third parties.

Gotcha. These are actual great use cases. I wonder if there’s a market to make an actual dedicated consumer device. I guess the main issue is that Ethernet ports are going the way of the dodo.

~~Lots of~~ Some* wireless access points support operating in either a client or bridged mode. Client mode usually implies (not always) it NAT'ing the WiFi connection similar to what a home router might do with your internet connection. Sometimes client mode is synonymous to bridging which is what this Pi is doing.

So yes, there's been a market for this on lots of consumer devices for quite some time. Most people just don't know it exists.

Edited my comment a bit as doing a bit more research its not quite as common as I believed but does exist on a number of consumer devices. I still stand by my point that most people don't know about this feature of their hardware when present as most people don't understand the difference between a router and an access point.

Re: Raspberry Pi WiFi to ethernet bridge

#66
post #59

Earlier quoted context omitted.

On wired ethernet, a packet contains the MAC address of the destination host. Switches across the network keep track of which port a given MAC address is associated with and forward it appropriately. Wifi doesn't have the same concept - the only destination MAC address in a standard 802.11 packet is that of the destination Wifi station. So, if you have a device on Wifi with several wired devices behind it, and you wa…

The 802.11 header has 4 MAC addresses: Source Address (SA), Destination Address (DA), Transmitter Address (TA), Receiver Address (RA). The TA and RA are those of the Wifi station and SA and DA are the Ethernet addresses. This allows bridging Ethernet and Wifi interfaces and it is how many (most?) Linux-based Wifi routers work.

Yes, if you're using WDS, otherwise you only have three addresses used. Since you need the transmitting device to populate the DA, you can't just turn on bridging on a client and have everything work - you need both ends of the link to be involved.

Re: Raspberry Pi WiFi to ethernet bridge

#67
post #66

Earlier quoted context omitted.

The 802.11 header has 4 MAC addresses: Source Address (SA), Destination Address (DA), Transmitter Address (TA), Receiver Address (RA). The TA and RA are those of the Wifi station and SA and DA are the Ethernet addresses. This allows bridging Ethernet and Wifi interfaces and it is how many (most?) Linux-based Wifi routers work.

Yes, if you're using WDS, otherwise you only have three addresses used. Since you need the transmitting device to populate the DA, you can't just turn on bridging on a client and have everything work - you need both ends of the link to be involved.

Yes, for a wifi client (like in the article) you're right. manuel_w was talking about bridging on the AP and for that you do just enable bridging and it works fine.
Post reply on HN