Hello,
my setup: primary router: x86 box managing FTTH connection
AP: an openwrt Flint2 connected via lan with the router with some vlans. No routing, no firewall.
This morning my FTTH connection dropped, so i had to use as a fallback the wifi hotspot of my phone.
And here comes the question: can i "simply" bridge the wifi STA connection of the AP passing it via vlan to the primary router?
otherwise i have to create the connection on the AP, enable routing, create a local network (tagged on a dedicated vlan) with another ip addressing and use it as secondary wan for the router. Not the cleanest solution, is it?
(connecting the phone via usb it not a good solution to avoid losing the use of the phone :))
No, a sta mode connection cannot be directly bridged.
Your options are:
relayd -- this works for a situation where the upstream AP is not running OpenWrt, as is the case for your phone.
routed client -- this means the downstream AP (i.e. your Flint 2) will actually be routing. It is basically the same scenario as a travel router making an upstream connection via wifi and then providing a downstream routed network via eithernet and/or wififi.
WDS or 802.11s (mesh) can provide bridging and is preferred when the upstream AP is running OpenWrt, but will not work with a non-openwrt upstream (your phone).
hello, thanks for your time
your option 2 seems to me the same i wrote above: the flint connects to wifi as a common wan, than routes it hosting a lan connection to which the main router connects as wan. a lot of natting
i'm not sure i got option 1. what would it achieve?
thanks
Depending on your physical topology, you might just not bother to connect this to your main x86 router since the flint 2 is actually quite powerful it its own right.
It's possible to avoid the double-NAT on your end by setting up symmetric routing. But again, this is a lot of extra work for what is nominally a router-AP setup.
relayd would allow you to perform an actual bridging operation from WiFi (STA mode) to Ethernet. No routing in this case. But, this method is inelegant and hacky and again departs from your nominal use of the Flint 2 as a normal AP.
so the external ip given by my phone would be assigned to the main router? seems good!
well this would be a contingency solution (my ftth came back in less than an hour) that probably i'll never use, but i've never tried to do that so it's fun
thanks, i'll give a look to the link, but i see you have to assign manually an ip to the interface that is bridged, so how can this work with no routing?
What's actually happening here is that your phone is setting up a NAT'd network on its own. The WiFi hotspot that it offers will have a specific subnet, and you'll be able to put your downstream Ethernet devices on that same subnet. The result is that you're not adding another NAT routing layer with your OpenWrt equipment, but your phone still does that. And also worth noting that many/most Cellular providers use CG-NAT anyway.