How to use two multiple gateways in one subnet?

Hi,
I want to setup reserve router with mwan3, both gateways in single network. For example, this (reserve) router will have address 172.25.25.120/16, and two routers which it will use - 172.25.25.121/16 and 172.25.25.122/16. In virtual machine I just can add multiple bridge adapters and assign address for each wan interface (172.25.25.123/16 and 172.25.25.124/16), but how to do multiple interfaces on single port on real router?
I also tried make VLANs, but it is not working.
VLAN config:


Interfaces:

It's not surprising that routing isn't working, with those subnet masks.

Your LAN, WAN1 and WAN2 addresses are all in the same subnet from the perspective of the routing table: 172.25.0.0/16

5 Likes

And? They can't use gateway in same network?

Your machine has no idea whether to route the packet to the LAN, WAN1 or WAN2.

You're telling it that all three are valid routes. You need to subnet properly.

3 Likes

can you draw a diagram of your network with the routers and the gateways and their ip addresses?

3 Likes

If you don't have Visio or similar, I can recommend draw.io from experience (see my profile.)

2 Likes

Found workaround by using wireguard on both 'main' routers


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