OpenWrt Failover & Repeater with non-WRT router?

The problem in this scenario is that you expect the OpenWrt device to transparently switch roles from a 'dumb wireless extender' to 'router/ DHCPd in charge'. This can't really work without some kind of manual decision, as multiple DHCPds in one network create a havoc for your devices - and because 'the other device doesn't seem to answer over wireless in time' is not really a reliable enough metric for this decision (you'd end up with split, but competing network segments before long). The devices simply can't magically read your mind - and all clean layered approaches I can come up with would require even more power draw.

The easiest approach would probably to kill this problem with hardware... One OpenWrt device configured as router/ DHCPd, one as extender - using a mutually exclusive electrical switch for ISP-router+OpenWrt-extender or just OpenWrt-DHCPd. I'm aware that this is probably not possible (for the distance between them alone), but maybe it jumpstarts some ideas.

1 Like

Agree with the above, but you could rethink parts of the system and save some power on the overall system. Also you might be able to save power on the openwrt system by keeping it running but switching the radios off.

anyway, the basic idea is to merge your HA system and the openwrt AP:

  1. I have run an HA instance on my openwrt router, it's a bit of a pain and largely depends on the capabilities of your router but is doable.
  2. Depending on where your HA system is located, or run a bit of cable for an external antenna, you could use that to run hostapd, (and dnsmasq), for a permanent access point.
1 Like

There are OpenWrt routers in the 1 watt range that you might afford to leave on all the time. Look for Atheros chip, 2.4 GHz only, and 10/100 Ethernet only.

1 Like

Yup. I forgot to add my thinking on that in the OP. When the internet is down, there's no real need for DHCP. The only devices that need the network would be known, and could have static IPs. There's not much need for DNS either. When the internet is on, there are scenarios where new devices need an IP.

If everything is set up static, could the handoff happen more or less transparently?

Let's hope this remains true. But it brings up something I hadn't thought of. Is there a way to tell the OpenWRT router to switch roles, or change its config on the fly? Since I have to tell the internet to switch off, I could send a directive via SNMP, etc.

Yeah, this may end up being the best option.

I've also been thinking about maybe replacing the OpenWRT with something like an ESP-based WiFi NAT router. I've had that working in a mesh of low power esp8266 devices, but I'm still not sure how to transparently remove the proprietary router from the network without disrupting things.

Along those lines, one idea I have briefly entertained is setting the wireless interface on the HA instance (RPiB+, currently) as an AP. I'm skeptical of using the Pi as a router under normal circumstances, but maybe it could handle the small amount of local traffic.

One way for this is to use different configuration files. Just upload the relevant config file and the router should switch modes accordingly. But for this you will have to create your own config files from the current configuration and then save it somewhere else.

Edit: The package TravelMate may be of help to you to some extent because it changes between STA and AP modes automatically. You may check it out.

1 Like

In the event that I did leave the OpenWRT router on all the time, then what would be the best configuration for playing nicely with the proprietary router when it is on?

I'm still hoping to come up with a parsimonious solution with my existing hardware. Can someone recommend an OpenWRT router which is both low-power consumption and has its own battery in case different hardware ends up being the path?

Turn off the wifi in the Hughesnet router and have it connected by Ethernet to the WAN port of the OpenWrt. When the Hughesnet is powered down you simply won't have Internet, but the LAN is all contained in the OpenWrt router.

3 Likes

Having also read comments about power consumption in other threads by @mk24 and @slh, it does seem that spending $20 on a < 1W router would probably pay for itself in a short time due to the high kWh cost of running the generator.

Currently comparing the TP-Link WR703 and 701ND, and open to suggestions.

Who wants my pile of Asus N16s and WRT54Gs? Ha!

While I would be interested in something like this, it's not a requirement. I'm currently using this 3s 18650 charger as a UPS for the RPi, and at $12, I could add them to subsequent low-power routers.

This does sound interesting. Can you clarify which model you're referring to? Searches for that yield a variety of results which don't seem exactly right.

I have used luci-app-travelmate in the past where it was able to connect to a wireless network and provide internet with another SSID as you want to do and once the wireless network is down it still provides you with wireless network SSID as before but without internet and you retain local LAN access.

1 Like

Beware: All of those are 4/32 devices.

https://openwrt.org/toh/hwdata/tp-link/tp-link_tl-wr703n_v1
https://openwrt.org/toh/hwdata/tp-link/tp-link_tl-wa701nd_v1
https://openwrt.org/toh/hwdata/tp-link/tp-link_tl-wa701nd_v2

Battery powered routers which are supported by current OpenWrt AND which have more than 4/32 AND which are commercially available are rare.

You shouldn't restrict your choices unnecessarily with "on-board-battery".

Some inspiration regarding low power devices:

Notes:

  • Please mind the "Availability" column.
  • x VDC, y A means: Rating of the power supply. Real life power consumption will be less (e.g. a TL-MR3020 comes with 5 VDC, 1.0 A power supply, but consumes only approx. 175mA).

Oy, yeah... I have been out of the market for a few years, and had forgotten about this, despite my old Linksys WRTs suffering similar limitations.

Didn't realize the device list allowed such fine-grained filters. Awesome tips. Thanks!

Assuming I'm not against a little soldering, am semi-fluent in Chinglish, and have an FTDI adapter standing by, what might the drawbacks of jumping all the way down the rabbit hole with 3.3 VDC dev boards?

The Carambola 2 advertises .5W power consumption, and on-board u.fl is interesting. The other flavors GL.Inet, WRTNode, and others all look interesting, but availability apparently varies.

As an experiment, I've ordered an ALFA AP121U.

It has the Atheros (h/t @mk24) AR9331 that's in the lowest of the low-power-supply search results @tmomas linked, no ethernet switch, and hits the 8/32 minimum.

I'm calling this an experiment because it has a seemingly wild west passive POE feature, and I couldn't find any reports of its actual power consumption. The barrel jack is 12V nominal, but who knows what the actual range is. The ToH mentions it will run down to 5V. Otoh, POE isn't always the most efficient method of power delivery, and the conversion from 12V to whatever the board/chips actually use is another inefficiency (and why the Carambola 2 remains interesting). My hope is that it will draw ≤ 1W, but < 2W would be okay for now.

I'm still very interested in learning the lowest power consumption OpenWRT options, but since this has changed from a configuration conversation to a hardware conversation, maybe that's better in a subsequent thread in the Hardware Category. The Power Consumption Database was helpful for ideas, but very limited in models reported.

My power monitoring is not sensitive enough to reliably detect a wattage drop in the HughesNet modem/router after disabling all wireless interfaces. It would be nice to know whether I'm actually coming out ahead in terms of my power budget.

Found an eBay seller (Rokland, no affiliation) that sells a bunch of different ALFA branded devices with AR9331 chipsets.

I still don't have testing equipment that I trust to accurately measure power consumption in these ranges. I'll try to provide updates as experimentation progresses.

I have these under testing so far:

Now that I have new hardware, I'd very much appreciate input on the best configuration. This is roughly what I'm working with:

In the image, I currently have Link A and Link C hardwired to the proprietary router (WAN), with OpenWRT 1 and OpenWRT 2 set up as APs. This works as expected , but not how I want it to (Link B doesn't exist, etc.).

WAN and OpenWRT 1 are in separate buildings. OpenWRT 2 is basically acting as a range extender, and connected via POE.

In general, I plan to leave OpenWRT 1 and OpenWRT 2 always on. However, due to idiosyncrasies with my DIY power grid, it will occasionally be the case that one or the other goes offline.

¿What's the best way to configure this so that:

  1. When WAN is powered off, OpenWRT 1 and OpenWRT 2 can still be on the same LAN (Link B)
  2. If WAN is off and either OpenWRT 1 or OpenWRT 2 is powered off, there is still some wifi for the WLAN devices which can still connect.
  3. If WAN is on and either OpenWRT 1 or OpenWRT 2 is powered off, there is still WAN from the other OpenWRT (Link A or C).
  4. Same SSID with seamless roaming between OpenWRT 1 and OpenWRT 2
  5. Bonus: All 3 are on the same SSID with seamless roaming.
  6. If there's no path to 5, then I might as well switch off the wireless on the proprietary router. I'm okay with that.

Sorry, I'm still not clear on the differences between relayd, WDS, 802.11r, etc.

OpenWRT 2 only has one eth port, so my thinking is that I need to wirelessly connect OpenWRT 1 for Link B. I could also disconnect the wire on Link C, and move that to Link B.

I tried setting up both OpenWRTs with 802.11r, but couldn't get that to work, and my guess is that if it did, I'd lose scenario 1 above (Link B LAN). And when I think through WDS, it seems as though I'd lose scenario 3 above (Link C WAN). But again, none of this is very clear to me, and the wiki didn't get me up the learning curve.

So... I set this up:

  • OpenWRT 1 as AP with WDS, and 802.11r
  • OpenWRT 2 as WDS client on one interface
  • OpenWRT 2 AP with 802.11r on another interface

All of the above have the same WiFi settings. Roaming works. Internet works, and I can still connect to OpenWRT 2 and get internet if OpenWRT 1 goes offline.

Link A and Link C are wired as previously discussed, and Link B is the WDS/802.11r connection.

I'm still getting DHCP from the dumb AP, which I can't turn off without disabling the entire interface. But that seems to only happen when I'm connected to the WDS Client node. As such, it's messing with IPs in the LAN — different subnet, dnsmasq/mDNS, etc.

How do I keep DHCP on the OpenWRT routers, but not have the dumb AP override it? I don't envision having more than 30 clients. I could put all the APs on the same subnet and divide the 255 IPs into DHCP blocks of 80 between them, and reserve 15 IPs for infrastructure (dumb AP won't allow changing netmask). Any downsides to this approach? I suspect it will at minimum cause issues with dnsmasq/mDNS on clients of the dumb AP.

I realize that I'm 95% of the way there, and that switching off the wireless on the HughesNet box would eliminate some of the issues. But I have a feeling I'm just missing something that would allow it all to work together. Since the APs each have different power sources depending on conditions (solar, main battery bank, and isolated battery backups), it hurts my brain to disable the wireless on the dumb AP because I measure no power savings when disabling the wireless. It feels like I'm sacrificing resiliency because I have it set up wrong.