2.4GHz client as backup for 5GHz client (GL.iNET Flint 2 (GL-MT6000))

My Flint 2 is connected to my main router via Wifi on the 5GHz channel.

Now I thought: Why not use the 2.4GHz channel as well? Maybe as a backup?

So I just connected the 2.4GHz radio as well. Now I have a couple of questions:

  1. Without me doing any further configurations, how does the Flint 2 decide which connection to use to my main router?
  2. How can I make sure the 2.4GHz channel is used as a backup, in case the 5GHz connection becomes slow or fails entirely?

Thank you!

No.

  • Routing metrics
  • A script that monitors connectivity

How? -> No? I don't get it :thinking:

  • Routing metrics
  • A script that monitors connectivity

Can you elaborate? I'm new to OpenWrt.

Or you can use the Travelmate package. The instructions/details can be found:

I think it's without further configuration the "no" is for.

Unless your 5ghz radio can also talk 2.4ghz you're stuck to only connecting on 5ghz?

Yeah one could set routing metrics in the network settings?
Or go overboard with dynamic routing? =P
Don't have experience with travelmate package but I do have experience with mwan3?

So ChatGPT explained both the script approach and MWAN3. @evs Since you got experience with MWAN3 - does this tutorial sound about right?

To set up failover between the 5GHz and 2.4GHz connections on OpenWrt for the Flint 2 router, you need to configure the backhaul interfaces so that the 5GHz connection is the primary, and the 2.4GHz connection serves as a backup in case the primary fails. This can be done through interface bonding or configuring a backup wireless connection in the OpenWrt settings.

Here’s a step-by-step guide to configuring failover:

1. Access the OpenWrt Web Interface

• Open a web browser and go to the Flint 2’s IP address (typically 192.168.1.1 or 192.168.8.1).

• Log in with your username and password.

2. Configure 5GHz as the Primary Wireless Connection

• Navigate to Network -> Wireless.

• Find the 5GHz interface (usually labeled something like radio1 or wlan1).

• Ensure that this interface is connected to the Fritzbox. You may need to configure the wireless interface with the correct SSID and password of the Fritzbox’s 5GHz network.

• Under the Wireless Security tab, set the correct encryption (WPA2/WPA3) and password for the Fritzbox’s 5GHz network.

3. Configure the 2.4GHz as the Backup Wireless Connection

• Still in the Network -> Wireless section, find the 2.4GHz interface (likely radio2 or wlan0).

• Configure this interface to connect to the Fritzbox’s 2.4GHz network with the same SSID and password (if they are the same, or adjust if different).

• Make sure the Wireless Security is also properly configured for the Fritzbox’s 2.4GHz network.

4. Create a Failover Policy Using Interface Grouping

Now you need to set up the failover policy so that OpenWrt will prefer the 5GHz connection and only switch to 2.4GHz if the 5GHz connection is lost or degrades.

  1. Go to Network -> Interfaces.

  2. Click on Add New Interface and create two interfaces:

• One for the 5GHz backhaul connection (if not already configured).

• Another for the 2.4GHz backhaul.

  1. Name the interfaces accordingly, e.g., Backhaul5GHz and Backhaul2.4GHz.

  2. Assign both to the WAN firewall zone (or another relevant zone).

5. Configure MWAN3 for Failover

To handle automatic failover between the two connections, you can use the MWAN3 package in OpenWrt, which is designed for multi-WAN setups but can be used here for failover:

Install MWAN3 (if not already installed):

  1. Go to System -> Software.

  2. Search for mwan3 and install the package.

Configure MWAN3:

  1. Go to Network -> Load Balancing.

  2. Define your interfaces for both the 5GHz and 2.4GHz connections.

  3. Set 5GHz as the primary (higher priority) by assigning it a lower metric (e.g., metric 1).

  4. Set the 2.4GHz as the backup with a higher metric (e.g., metric 2).

6. Test the Setup

• Disconnect or disable the 5GHz connection temporarily to see if Flint switches over to the 2.4GHz backup.

• You can monitor this in the Status -> Overview section to confirm the failover behavior is working as expected.

Optional: Script-based Failover

For more control or custom setups, you can create a custom script that continuously pings an external IP (like Google’s DNS 8.8.8.8) and, upon failure of the primary 5GHz connection, automatically switches to the 2.4GHz backhaul.

Here’s a basic outline of how the script would work:

#!/bin/sh
ping -c 5 8.8.8.8
if [ $? -ne 0 ]; then
  uci set network.wan.device='wlan0' # Switch to 2.4GHz
  uci commit network
  ifdown wan && ifup wan
else
  uci set network.wan.device='wlan1' # Switch to 5GHz
  uci commit network
fi

• You can add this script to a cron job or run it manually at intervals to check the connectivity and trigger failover.

Summary

By configuring MWAN3 or using a script-based approach, you can set up a reliable failover from the 5GHz backhaul to the 2.4GHz in case of degradation or failure.

It started off well but the last bit (quoted) is nonsense to me.

As it already describes setting the routing metrics that's the first step.
It's not describing in particular how to configure mwan3 to do the failover and the IP level checks.

You would set your mwan3 config interface, members, policies and rules correctly. IMO it might be better for this to happen at layer 2 with a bonding interface? No ping monitors and routing issues? That might be more challenging to do with openwrt however, never tried to bond two wireless interfaces with openwrt. (done cabled links fine...).

edit as an aside for doing a bond....got the bond going but couldn't get it working with luci-proto-bonding.
Something like this worked as a proof of concept.

echo "+bond0" > /sys/class/net/bonding_masters
echo "active-backup 1" > /sys/class/net/bond0/bonding/mode
echo "100" > /sys/class/net/bond0/bonding/miimon
echo "active 1" > /sys/class/net/bond0/bonding/fail_over_mac
ip link set phy0-sta0 down 
ip link set phy0-sta0 master bond0
ip link set phy1-sta0 down 
ip link set phy1-sta0 master bond0
echo "phy1-sta0" > /sys/class/net/bond0/bonding/primary
echo "1" > /sys/class/net/bond0/bonding/use_carrier
ip addr add <ipaddr> dev bond0
then add your default route

Note below i haven't changed the policies or rules yet.....

https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3