1

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?

3 Answers 3

2

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.

1
  • I'll give this a shot when I get home.
    – MGSoto
    Apr 23, 2010 at 23:08
5

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

1
  • 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, 2010 at 23:04
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .