'How do I connect a WiFi AP to an OVS bridge?
I have a Raspberry Pi where eth0 was attached to an OVS bridge and a client connected to eth0 and then through there to OVS and thence onwards.
However, I'm now wanting to, instead of connecting the client to eth0, connect it to wlan0, whilst retaining the OVS connection. I have tried attaching wlan0 to OVS as a member interface, but I found that broke the AP services (dhcpcd and hostapd), meaning that the client couldn't connect to it.
As such, to keep the AP working, I instead want to route between wlan0 and OVS. I have created a default route on the Pi, telling it to send traffic to OVS; I've also set up iptables dropping all traffic from wlan0 that goes anywhere except OVS.
From what I've found, it does route the traffic to OVS. It is, however, an exceedingly hacky solution that involves getting rid of the default route pointing to the internet proper. Is a more elegant, less hacky, solution possible, and if so what is it?
Solution 1:[1]
I have been wanting to add an AP(on wlan0) to OVS bridge.
What I found out after some time is that hostapd drivers (eg. nl80211) do not have support for OVS(can't add interface, wlan0 to bridge br0), neither do wpa_supplicant.
There is a patch for hostapd that supposedly supports OVS bridging, here is the link. But this is a very old patch, and was not working, probably because of newer SSL versions.
For now what you are doing is one way, the other is to use a external wireless router and plug it in ethernet (eth1), then bridge the ethernet ports.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Nishiket Bidawat |