Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4963
  • Last Modified:

How to configure a multi-homed Windows 2003 server to prefer a given connection for outbound access?

Good day everybody.

I rely on my Internet access, so I have two broadband connections:  My main is DSL (1+Mbps over PPPoE from a DSL modem) and the backup is cable (128kbps over Ethernet from a DOCSIS cable modem).  Each of the DSL and cable modems have a simple Netgear-series router that can provide access to the other machines on my network.  I can get the whole network on one or the other by changing which is connected to the main switch.  Since the machines on the network are all DHCP-configured, I just need them to release/renew after I manually change the router connected to the main switch, and they'll get a new address and gateway.

However, I have _one_ specific machine, a web server running Windows Server 2003, into which I added a second NIC and made it multi-homed.  I configured it to accept HTTP from either external connection.  That works great.  However, when I use that machine to browse to the outside world (e.g. to download Windows Update patches), the traffic originating from the machine is being routed through the slower connection by default.  I don't expect the server to know the difference, of course, since it sees both as 100Mbps up to each switch, and I didn't do anything special (yet) to tell it which one to prefer.

My question is: How can I configure the server so that it prefers to talk to the outside world on the connection that leads to the 3Mbps DSL modem's switch?  I have a feeling I simply need to change the default gateway, but there doesn't appear to be any "make this the default gateway" option when I look at the TCP/IP properties for each connection.  (I seem to remember there being precisely that kind of option - perhaps on an earlier version of Windows?)

"route print" confirms that the cable modem router ( is the default gateway.  How do I change that to be the DSL modem router ( ?  Here's the "route print" output from the server (which is itself and

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
     20      1     20     20     20     20     20     20     20     20      1      1
Default Gateway:
Persistent Routes:

I think I'm almost there but am missing the syntax, and would like some comfort with what I am doing before I try anything.  How do I effect what I want?  Thank you.

  • 3
  • 2
1 Solution
Rob WilliamsCommented:
You might have success but changing the binding order;  control panel | network connections | advanced (on the menu bar) | advanced settings | adapters and bindings | connections     Move the appropriate adapter to the top of the list

However you really cannot have 2 gateways configured successfully. Best solution with 2 ISP connections is usually to implement a dual port WAN router that provides load balancing and or fail over protection, such as the Linksys RV042 or Netgear xxx. Then traffic is automatically balanced over the 2 connections and if one fails it is seamless. Make sure the faster one is connected to port 1.
The other option on the Web server if you need to switch back and forth is to change the gateway with the netsh command (configure one and disable the other):
netsh interface ip set address name = "Local Area Connection" gateway = gwmetric = 1
netsh interface ip set address name = "Local Area Connection 2" gateway =
Substitute the appropriate network adapter for  "Local Area Connection" (use quotes if spaces in the name). Then simply insert the line in a batch file on the desktop. Click on one batch file for gateway on, and on the other for gateway 2
cwreaAuthor Commented:
Thank you!  Moving the adapter to the top of the list you referred to did the trick.  The only additional step I needed to take was to reboot the computer after the change, as the routing table hadn't immediately been affected.  But,  after reboot, "route print" reported the faster gateway as the new default.

As for the netsh script suggestion, I do actually want the two redundant gateways on that machine - just that I wanted the faster one preferred.  The binding order was the way to go and the easiest to effect.

I may investigate the dual port WAN router as a solution for the whole LAN at some point. However, that router would then be a single point of failure.  My two cheap routers, cheap as they may be, offer a redundant configuration. :-)  If I were to get the nicer router, I'll need to buy two so I have a spare handy.  But, with the better router, at least I wouldn't have to do a manual cable switch if the main connection goes down.

Thanks again!
Rob WilliamsCommented:
Very welcome, thank you.

Out of curiosity, will it automatically default to the second connection if the first is dropped, now that the binding order sequence is correct? I always thought that was more theoretical and didn't work well in practice. Would be good to know.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

cwreaAuthor Commented:
Yes, it does automatically fail over to the secondary connection.  I physically removed the cable for the primary connection and was able to browse the web still (but at the slower speed.)

I tried again with "route print" before and after the primary cable removal and Windows did indeed update the default gateway from to, and then back again when I plugged the cable back in.


I have a somewhat similar situation, however, cannot get my server to failover properly.

My server also has two NICs.  The Primary NIC is configured for my LAN with a static IP and connected to a switch, with the switch connected to the Primary ISP router.  The second NIC is configured with DHCP and connected directly to the Secondary ISP switch/cable modem.  My only concern is that the server needs access to the Internet, therefore my goal is to make only the server fault tolerant.

I ensured my Primary NIC was the first in the list, and route print shows that NIC's default gateway is the default gateway, but when I disconnect the Primary ISP from the LAN switch the server does not failover to the secondary ISP.  I'm considering integrating a dual-WAN router into my network, but if I can get away with the same result using my server I'd prefer that instead.

Server is Windows 2003 Standard w/SP2.  Thanks.
Rob WilliamsCommented:
uxphreak , you will need to open your own question.
However, fail-over with Windows doesn't work. It is possible to set a second gateway, and set the priority using metrics. If the first link fails, even for a split second, it will fail over to the second connection, but it will never switch back, without re-booting.
The only way to have fault tolerance is using a dual WAN router with fail-over protection and/or load balancing.
If you go that route it is best that both DSL connections have similar bandwidth.

If you do post a new question and you would like me to follow up, just send a link to the question to the e-mail address in my profile (click on RobWill)

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now