Score:0

How to utilize second gateway on the same network

do flag

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
--------------------
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.