OpenWrt and Archer C7 as a wifi bridge π‘π
If you have a spare router compatible with OpenWrt, an existing home wireless network, and want to utilise this wireless network for non-wifi enabled devices via ethernet β then this post may be helpful.
Introduction
Despite upping my wifi AP game recently (UniFi nanoHD AP) and improving wifi coverage throughout our home, the downstairs media player just wasn't getting the speeds it was capable of. So, instead of changing up the physical location or changing the home network any further, I decided to get my hands drity with OpenWrt and a spare Archer C7 v2 I had instead. I enjoyed the OpenWrt firmware so much, I wanted to write about it here.
What, Why, How?
OpenWrt is a linux based OS for networking devices. I've only ever used UniFi, Tomato, DD-WRT, and Merlin firmwares in my network devices so I was just looking for a project where I could get my hands dirty with OpenWrt. The opportunity presented itself when I realised I had a) a spare Archer C7 gathering dust and b) the media player downstairs sure could use a signal boost.
The media player downstairs has no external antenna which added to the problems of receiving limited 2.4 and 5ghz wifi signal π. Max was around 20mbps down, 15mbps up. Near the same spot on my phone was getting at least 100/30!
The idea in my head was to:
- use the existing unused router and load some custom firmware
- put this device into bridging mode (wifi β> ethernet)
- get the media player to utilise ethernet with the wifi as the βbackboneβ
A wifi bridge from my understanding is simply bridging the ethernet interface of a device with its WLAN interface/s. This way, ethernet would be switched and relayed out via an existing WLAN network. An existing router and AP do all the heavy lifting e.g. DHCP, DNS, routing. This routing is facilitated by relayd
.
General Instructions
Prep:
- target router flashed with openwrt
- patch network cable
- a computer with an ethernet port (or adapter)
- approx 30m
Fortunately, an excellent guide is already available to achieve what I described above:
β https://openwrt.org/docs/guide-user/network/wifi/relay_configuration
The summary of this guide is:
- go through the initial openwrt setup
- set up the
lan
interface with an IP in a different subnet to your home network (e.g192.168.1.0/24
if you already have a192.168.0.1/24
) - join an existing wireless network (
wwan
) - ensure internet connectivity (from openwrt)
- install
relayd
andluci-proto-relay
- add a new
relay bridge
interface linkinglan
andwwan
together - reboot
This should result in all devices attached to the ethernet LAN ports be routed by the relay bridge interface to the main network via an existing wireless network.
Conclusion and Next Steps
The media player now was getting close to 150mbps download and 40mbps upload! Much, much better. Now I can reliably serve files to it wirelessly as well (hopefully soon)! Mission success.
I was really impressed and thankful at the documentation available for this feature by the OpenWrt folks. The firmware is much more polished than I last remembered and would definitely consider switching to this firmware on my other more used network devices.
Next steps:
- set up auto updates of OpenWrt and packages
- see if I can set up a simple file server via the USB port on the Archer C7
- create a shell script equivalent of the above process
Resources
- OpenWrt for C7 β https://openwrt.org/toh/tp-link/archer-c7-1750
- Wifi Bridge Guide β https://openwrt.org/docs/guide-user/network/wifi/relay_configuration