How to config wan for 5ghz band and 4gwan for 2.4ghz

I'm using Xiaomi R3g with openwrt v23.05, I use a USB adapter for wwan card with a nano sim integrated. My wwan card is l860-gl.
I setting up as follows:

my device -> 5ghz band -> lan -> wan -> internet
my device -> 2.4ghz band -> lan_4g -> 4g -> internet

I ping wan ok, ping 4g ok. I connect to the 2.4 GHz band and can access the internet. I connect to 5Ghz band and cannot access the internet.

Step 1:

  • Step 1.1 I create a new lan_4g interface with default gateway 192.168.20.1
  • Step 1.2 Assign it to zone lan_4g
  • Step 1.3 in firewall, I set lan_4g -> wan similar to plan -> wan
  • Step 1.4 config 2 forwarding rules for DHCP and DNS are followed by the below picture.
    After that, my phone was assigned a new local IP and I could access the internet.

Step 2:

  • Step 2.1: Setup new 4g interface
  • Step 2.2: assign it to zone 4g and create (here 4g interface has RX and TX now)
  • Step 2.3: update firewall lan_4g -> wan above to lan_4g -> 4g

In here, I cannot ping 8.8.8.8 via wan using ping -I wan (PING 8.8.8.8 (8.8.8.8): 56 data bytes),
ping -I eth1 8.8.8.8 is okey.
If I connect 2.4ghz, I can access the internet with 4g IP address.
If I connect to 5ghz band, I cannot access the internet.
Where did I do wrong :frowning:

Here are my configs:



Depending on your exact intentions, you will need some kind of policy based routing to juggle multiple WAN connections. The conventional approach to this would be mwan3, but pbr might also be shoehorned into this task.

1 Like

I installed mwan3 and set it up as below.The result:

  • 5ghz band has internet connection with wan public Ip.
  • 2.4ghz band has no internet connection.
    I ping via interface wan and eth1 are both working

Current status:

Step 1: I create new interface 4g (same as the interface)

Step 2: I create two members: wan_m and 4g_m

Step 3: I create two policies: wan_p and 4g_p

Step 4: I create two rules:

It's not working with 2.4Ghz band, no internet connection :frowning: