Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two seperate Internet connections coming into the office here that are currently being used for different purposes, but I want to be able to use the second connection as a fallback for our web-based application.

I currently have a Windows machine with IIS that has one NIC connected to the outside world, and another NIC connected to the local network 192.168... There is a default gateway specified only on the external NIC. If I try to wire the other internet connection to another NIC I cannot set a second default gateway without throwing Windows completely out of whack and if I don't do so, response packets try to go back on the other connection.

Is there any way to accomplish this short of another machine dedicated to the task (or at least a virtual machine instance)?

share|improve this question

First of all - this sounds like a bit of a security issue. The machine could begin acting as a router if it was compromised, which would then compromise the 192.168 network. Hopefully this is not your office LAN environment. It would be better to establish a firewall connected to both Internet connections (as untrusted connections) - with your web server in a DMZ network. Something like... (pardon the ASCII art):

ISP A  ->  firewall  < -  ISP B
             |     |
             V     V
           DMZ     LAN
    web server     everything else

You could set up port forwarding on the firewall so that connections to port 80 of either ISP's IP forward to your web server, which is on a physically separate DMZ network. Now, your budget / network architecture etc. might prohibit this.

If that's the case; a simple route add should do the trick. The help file from route print:

> route ADD MASK METRIC 3 IF 2
         destination^      ^mask      ^gateway     metric^    ^
  If IF is not given, it tries to find the best interface for a given

Is less than terse, but correct. Assuming you want this to be a second route to the outside world, the syntax for the destination would be mask For the gateway, this is the IP of the machine that gives you access to the second ISP. I usually skip the metric and IF part, but I think you probably want to set the metric of your "main" ISP to 1 and the metric of the "backup" to 2.

That being said, I'm not totally sure what Windows will do if you enter this. It will be able to use both gateways, and I think what it will do is prefer the one with metric 1, but if that fails use the one with metric 2.

More info available here:

share|improve this answer

add a route for that interface. do "route print" to show what the current is and "route add" to add one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.