I have a network with a layout like this:
******* ****** ******* ******
* SW1 * --------- * R1 * ---------- * SW2 * ---------- * R2 *
******* ****** ******* ******
| |
| |
******** ********
* ISP1 * * ISP2 *
******** ********
SW1 = Switch with multiple clients connected.
R1 = Primary router on the network. This router handles DHCP.
ISP1 = Primary Internet uplink. All clients should use this by default.
SW2 = Switch with multiple clients connected.
R2 = Secondary router on the network.
ISP2 = Secondary Internet uplink. Clients should use this for specific traffic and if ISP1 fails.
By default all clients have R1 as default gateway, and connects to Internet through ISP1.
However, all traffic with destination port 995 or 465 should go to ISP2, and if ISP1 goes down, all Internet traffic on the network should go to ISP2.
I'm not sure how to accomplish this. What would be the correct strategy to do this?
R1 and R2 are regular computers with multiple network cards and Debian installed.
iproute2
. These utilites should enable one to configure policy-based routing, so the answer to you question is yes.