I have been wondering about the following scenario:
+-------+ +-------+
| ISP 1 | | ISP 2 |
+-------+ +-------+
| |
| +--------+ |
--eth0| ROUTER |eth1--
+--------+
eth2
|
|
+----+
| PC |
+----+
ROUTER is a Linux machine with three network interfaces:
Interface eth0 is connected to the primary Internet provider, and is configured to do source NAT.
Interface eth1 is connected to the backup Internet provider, and is configured to do source NAT.
Interface eth2 is connected to a regular PC.
The interface eth0 is configured as default route, so PC will reach the Internet through ISP 1.
Let's say a user started to download a big file from the Internet on PC, and then ISP 1 went offline. What would happen if the default route on ROUTER was changed to eth1? would the download simply continue?
iptables --table nat --append POSTROUTING --out-interface eth0 --jump SNAT --to-source x.x.x.x
andiptables --table nat --append POSTROUTING --out-interface eth1 --jump SNAT --to-source y.y.y.y
The default route on ROUTER is configured to be interface eth0