I have a D-Link DIR-867 router on which I have installed the latest version of Openwrt. It has both 2.4 and 5GHz band radios. As expected, they show up in the Wireless Overview.
My objective is to use my phone's hotspot as a WAN connection, so that everything connecting to the router can use it.
I understand that I can configure one of the radios as both WAN and LAN, but that it would impose a speed penalty.
I am looking at an AC1200 dual band wireless bridge, and am thinking to plug it into the WAN port of the router, providing connected devices with a WAN gateway but avoiding the penalty of using one of the router radios for both WAN and LAN.
Is there a reason this might not work or is not a good idea ?
I might be missing something here, so please be patient with a not-know-it-all.
The D-Link DIR-867 has two radios, a 2.4 and a 5.
It has a 4 port LAN and a single port WAN interface, or at least that's how it functions out of the box.
Openwrt provides so much more functionality that it is at once liberating and terrifying.
I have a cell phone that can provide a wireless hotspot. The phone will supply Internet service by tethering or wireless connection to it.
The router, however, does not have a USB port, only an RJ-45 WAN port.
What I saw while researching is that it is possible to make a radio serve both as a client attaching to a (WAN) hotspot and as a wireless interface that LAN devices can connect to, but that using it in that way incurs a heavy penalty in performance.
What I was thinking is to use a separate adapter with an RJ-45 connector on one end and an antenna on the other (making it an RJ-45 Ethernet to Wireless bridge), plug the RJ-45 end into the WAN port of the DIR-867 router, and connect the antenna of that adapter wirelessly to the phone's hotspot.
Now my 2.4 and 5 radios are dedicated to servicing wireless devices on the LAN, and everybody on the LAN gets access to the Internet by routing from the DIR-867's LAN to the WAN port, into the adapter's RJ-45 port, out that adapter's antenna and into the phone's hotspot.
The question is whether that chain works, or am I missing something.
It is worth elaborating a bit on what @mk24 said...
A client (STA mode) wifi connection cannot be directly bridged. That is to say that if a device connects to an upstream wifi, it cannot transparently provide downstream ethernet/wifi. This is a consequence of the way the wifi standards were developed -- they did not account for this type of connection.
It is very easy to provide a routed downstream connection when using a wifi uplink. That is to say that the downstream network is distinctly different from the upstream network, just the same as your home internet connection (i.e. the upstream is usually the internet, it is routed to a private lan using NAT masquerading). This is also how travel routers are used. You configure the upstream wifi connection as a wwan (wireless WAN).
There are workarounds for the fact that the upstream wifi cannot be bridged...
802.11s (mesh) and WDS are options when the upstream wifi AP runs the same firmware as your downstream device (in this case, though, that would not work -- your downstream is OpenWrt, upstream is your phone).
relayd is a hack but can create what appears to be a transparent bridge. It has issues and is not trivial to setup. Not recommended whenever there are other options available (i.e. 802.11s or WDS, or a standard routed configuration).
Meanwhile, yes, there will be a performance penalty for using a radio in STA + AP modes simultaneously.
If you are going to consider buying another device to be used as a dedicated wifi > wired 'converter' you'll still need to route the connection or use relayd, so the only benefit would be the ability do dedicate a radio to the task (i.e. sta mode only). With that in mind, before purchasing another device, you could consider:
looking for a 3-radio device where there is a 2nd 5G radio for uplink/backhaul purposes (this is how higher performance mesh systems work). This could replace your current unit and you could dedicate one of the radios for the uplink (which will subsequently be routed) while the other two serve the lan.
a device that has a USB port so you can directly tether via USB. This may provide better performance, but obviously means your phone is captive to the length of the USB cable.
Obviously, make sure that anything you consider is supported by OpenWrt before you purchase (or if not supported, verify that the vendor firmware supports your desired mode of operation. Don't forget that your support for a firmware other than official OpenWrt would be from the manufacturer since that firmware would necessarily be different and thus needs dedicated support).
4addr is another name for WDS. I mentioned WDS in my earlier post, and I also pointed out that WDS will almost certainly not work unless the upstream is also running OpenWrt.