I want to setup a Linux Server running SIP (freeswitch) applications with 3 NICs as follows:
2 of the NICs are WAN connections and the 3rd is a Private network for routing requests to other hosts on the same subnet (and does not figure into the discussion very much since there will be no internet routing to or from the private NIC).
The WAN NICs are setup as follows:
ETH0: Primary WAN interface, connected to one ISP
ETH1: Secondary WAN interface, connected to another ISP, different IP, subnet, etc. Currently the secondary wan is disabled on the server and the primary is active and routing traffic (SIP calls).
In the case of a failure to the primary WAN I want to (manually) switch my traffic over to the secondary WAN, which will now act as the WAN interface with its own gateway, dns, etc.
SIP calls coming into the secondary WAN will be answered and routed to a local IP on eth0 on the same subnet as eth0 (the assumption here is that internet access is offline on eth0 but the local subnet is still active and working).
I think my main challenge is how to have two WAN NICs active simultaneously, each with their own ip, subnet, gateway, dns, etc. such that there is no confusion on which WAN to use. Normally only eth0 would be used for all internet traffic in and out with eth1 only stepping in when eth0 internet is offline.
I have seen lots of scripts and configurations on multiple WAN connections but none of them seem to address my specific requirements. I don't mind doing a manual switch over when I use eth1 as the WAN but want it to be a simple procedure (command line script is fine) to toggle it one way or the other.
I think I could probably just disable eth0 and enable eth1 and restart the SIP server components but I'd rather not have to restart SIP services.