Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two NICs on my machine, one which connects to my network and has my internet connection. The other connects to a buddy next doors network with his internet connection. I don't want Windows magically deciding which internet connection to use, I want it to use mine. I've had some success by blanking out DNS servers for his connection, but then I also lose hostname resolution on his network and I realize this doesn't solve everything 100%. How can I force Windows to use only my connection while avoiding the use of a router?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

If you only need to reach a few computers, all of which are connected to the same router on the 2nd network then you could also configure it to use a static IP address with no gateway. Without a gateway you will only be able to communicate with devices on the same subnet and connected to the same router (ie: broadcast mode).

You can technically also do this under DHCP by deleting the 0.0.0.0 route for the interface using the ROUTE DELETE command line tool for editing routes, but you would need to do that every time your IP is renewed, so changing to a static ip address is much simpler. Just pick a static IP that is not in use and it should work just fine.

share|improve this answer
    
I'll give this a shot when I get home. –  MGSoto Apr 23 '10 at 23:08

Re-ordering the interfaces isn't quite good enough, at least as far as Windows 7 goes. It might even be superfluous. The problem is that Windows seems to completely ignore the binding order if you have TCP/IP route priority set to 'auto' (or at least makes choices that you're likely to disagree with).

Here's how to set it for real:

Control Panel -> Network & Sharing Center

Click "Change adapter settings" (left panel)

Then, for each of your interfaces:

  • right-click the connection's icon, choose 'properties'

  • Click "Internet Protocol Version 4 (TCP/IPv4)" (being careful to not un-check it), then click the "Properties" button

  • Click the "Advanced..." button at the lower right of the "Internet Protocol Version 4 (TCP/IPv4) Properties" window.

  • Un-check "Automatic metric", and set it to the desired value. Lower values have priority over higher values.

If you want to actually share files and stuff with your neighbor, you might have to get a little dirtier, and explicitly set multiple gateways with their own respective metrics.

share|improve this answer

This is called changing the 'binding order'. This is actually a duplicate question, but asked in a much more specific way, so I will explain it here.

In Windows, a 'binding order' is used to determine which network adapter gets priority. You can easily change this in Windows 7 by:

Open up your "Network and Sharing Center."

Click "Change Adapter Settings" in right-hand pane.

This should bring you to Control Panel\Network and Internet\Network Connections. You can also get there by running "ncpa.cpl".

Hit "ALT" to make the menu bar visible, and pick "Advanced" (Alt-N will bring you directly to that menu), and pick "Advanced Settings".

That will open the Advance Settings window, and you can adjust your binding order there.

This should allow you to give your network priority, which means it will be the one used to hit the internet. I'm not sure how it will react to the other network being connected, but this should at the very least be a start, if not the solution.

source

share|improve this answer
    
I should have mentioned that I have tried this before as well. While it does work most of the time, if my connection goes down for whatever reason, or takes too long for a response, it will lock on to the other connection. I have found this to be unreliable. –  MGSoto Apr 23 '10 at 23:04

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.