I couldn't find solution to add 2nd gateway from main router.
I have a C class local network 192.168.5.0/24 with Linux server A at 192.168.5.1 acting as default gateway, dhcp, smb... server. I would like to route some clients/servers (ie. client with ip 192.168.5.30) via another gateway B in the same subnet (192.168.5.5).
Is it possible to solve this via ip route or ip rule on the Linux server (192.168.5.1)? I presume it's possible to make a DHCP reservation with different default gateway on the server side, so client gets different default gateway, but I would like to avoid this if possible.
I was thinking another solution could be creating tunnel between gateways A and B so that there would be another interface on Server A, and I could route through clients that I prefer.
I'm looking for a solution that I can modify on the fly on serverside when Gateway A is overloaded.
--------------------
| 192.168.5.0/24 | Server A
| clients \____192.168.5.1___ ===> ISP1 => Internet
| .... /
| 192.168.5.30 | Gateway B
| ... 192.168.5.5 =====> ISP2 ==> Internet
--------------------
0 Answers