I have an interesting network routing problem.
I have 2 DSL routers on my local network, one is on 192.168.1.254 and the other is on 192.168.1.250. These resolve to 2 different ISP's.
Both are plugged in to a standard 10/100 switch, which also carries my LAN traffic, also on the 192.168.1.x subnet.
I have 2 network cards in my webserver plugged into the same switch. One is configured with 192.168.1.2 255.255.255.0 and gateway = 192.168.1.254. The other is configured with:
192.168.1.201 255.255.255.0 and gateway = 192.168.1.250.
Router 192.168.1.254 is pinholed on port 80 to 192.168.1.2 and router 192.168.1.250 is pinholed on port 80 to 192.168.1.201
My websites are configured without assigned IP addresses so that they can be accessed from either router.
This works fine up to a point, but if I restart the server, it stops working. I can fix it again by unassigning the second network card's gateway, saving changes, then reassigning the gateway back again. Kind of weird.
I think that this problem is because I have 2 default gateways however I could not get incoming www traffic to connect to the server from both routers any other way that I tried. Which ever router I set the gateway to is the only one that works.
(I also tried just having a single card in the server with both routers pinholed to it, but basically got the same result as having 2 cards with only one gateway)
You may ask why I am doing this...
The whole point of this is to provide a temporary network while shifting domains between ISP's. Since traffic incoming to both routers is directed to the same webserver, the domain move (to a new fixed IP address) does not result in an outage at all.
Any ideas about how this should be done to avoid the restart issue? I'm damn sure I should not have 2 default gateways...I believe this should be able to be done with a single card and maybe some static routes or something...