Forwarding all traffic in LAN to another router in LAN that has WAN ISP

[Comcast]
   ^ 
   |
   |
[Main Openwrt Router] <----wire/wifi------ Unifi Switches/AP, PCs, IoT, other clients, etc...
   |
   | 
   |
[Second Openwrt Router] ----- wifi -----> LTE/5G hotspot

I have comcast right now and I want to try 5G internet service. On my main Router (192.168.1.0/24), I have a VLANs set up that works with Unifi AP and Switches. The second router (LAN: 192.168.2.0/24 but no clients, WAN1: 192.168.1.2, WAN2: hotspot assigned ip) on the other hand is in my basement where (for whatever weird reason) has best LTE/5G reception. And because I have fancy wall mounted mini racks set up where the main openwrt router is, I don't want to move it to the second router. And due to the nature of hotspot, main router location can't get good wifi access to the hotspot. I was able to get mwan set up on my main router via setting a wireguard server on on my second openwrt router and wireguard client as a tunnel on my main router. While it works, the cpus on these routers seems to be inadequate. My 5G hotspot gets me 750mbps when I run a localized speed test on the second router. But when using it with this wireguard setup, I only get 150mbps.

I then tried creating a wireguard server with a desktop that's connected to the hotspot in the same location as second router. And rather than setting up mwan, I had one of my pcs connect directly via wireguard to the servers and was able to get the full speed. It seems like wireguard is an overkill considering this is within the same network. I'm also guessing (with my limited network traffic knowledge) that even if the main router is fast enough, I'd effectively only be getting half of the gigabit speed on a gigabit network if traffic has to always go through the main router for the wireguard client.

All the forum queries suggest this is a static routing problem. But I can't seem to get static routes to work. I'm wondering if it's because I have mwan3 installed that's overriding static routes. So to make sure I don't disturb my family's internet use, I used load balancing package for a default rule to still go to comcast. But I included another rule higher up for my testing's desktop where the policy assigned is "default (use main routing table)". So far this works great. While every client will be forced to go through comcast, my test desktop will just follow whichever default route with the interface that has a higher ranked metric.

Then in static routes, I created a default route to send all traffic to the second openwrt gateway. For device I chose LAN (192.168.1.x) and for the gateway I set it as 192.168.1.2. For whatever reason, after saving and applying this does not show up in LUCI's Status -> Routes page.

Now if I just do:

route add -net default gw 192.168.1.2 dev br-lan metric 0

This works great. But this also sets it for everything that's not defined in the load balancing rules. I'd like to be able to set this only for specific clients and likely set up failovers in the future. Since 192.168.1.2 is not considered an interface, I can't leverage the load balancing functionality for this gateway.

What's the best way to set this up?

What I would do is to create a new vlan on the main OpenWrt router to connect to the secondary. This way mwan3 can identify both uplinks and avoid the WG overhead.

I'm not super familiar with VLANs and honestly my previous VLAN set up was just following some dummies guide.

The thing that's confusing me here is that how does the vlan interface treat the secondary router as an uplink? Unfortunately that line I have between main and secondary router goes through a series of unmanaged switches.

Is it that I would create a vlan but define the gateway of vlan to be the second router?

It is still possible to make it even with unmanaged switches. You'll not make the port on the main router as trunk. The vlan will be created only on the main router. The only limitation here is that you won't be able to use the secondary router to connect clients. If you are fine with that you can follow the examples 2 or 3 in the DSA tutorial. The first is not using vlans, the second does.

1 Like

It works!!! Thank you so much, really appreciate it! I ended up going with the vlan route, seems a little cleaner to me.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.