How to make two routers working in the same network?

I have two routers with openwrt which are connected to the two different ISPs.

router1: ISP1, as a gateway its LAN address: 192.168.1.1
router2: ISP2, as a gateway its LAN address: 192.168.1.254

I want to switch between different ISPs for some testing purposes. But the problem is that client PC(win10) always jumps to 192.168.1.1 even I manually set the gateway as the static address of 192.168.1.254 in TCP/IP configuration in Win10. If you do a tracert, you see something like this:

1 <1 ms <1 ms <1 ms 192.168.1.254
2 1 ms <1 ms <1 ms 192.168.1.1
3 5 ms 4 ms 5 ms xxx.xxx.xxx.x

any suggestions whether I do some settings in the openwrt to solve the problem? Puting the router1 and router2 in different subnet( router1 192.168.1.1 and router2 192.168.2.1) is working, but that is not what I want as it causes other problems and inconveniences.

???

You never mentioned this network.

You never say what device is running OpenWrt.

Usually if you have 2 ISPs, you either:

  • connect a 3rd router to both ISP devices
  • or use one device to connect to both ISPs

This says: "Traffic is going to ISP2 router, then forwarding to ISP1 router"...but that makes no sense.

Additionally, both LANs should not be 192.168.1.0/24 - that's a conflict.

Generally taken, the two gateways on same subnet is not a good idea. However you can have two gateways in same subnet.

Openwrt has for this purpose mwan3 package and its configuration.

4 Likes

Sorry, I reword a little bit, so hopefully it causes less confusion.

I will give a try, thank you

You will have to change your network topology.

                   LAN      WIFI
                    |        |                             
     openwrt router with mwan3 / 192.168.4.1
            |                          |
  isp router wan1                 isp router wan2
   192.168.5.1                      192.168.6.1
           |                           |
      ISP1 network                 ISP2 network

The choice on subnet numbers is up to you, but it has to be different for all three routers.

1 Like