Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.



Windows 7: How do I change the default interface for internet...

20 Apr 2010   #1

DT and LT: Windows 7 and Fedora 14
 
 
How do I change the default interface for internet...

Is there a way to get Windows to use a specified adapter as the default internet connection interface? I have tried editing the routing table and made some progress, but the problem is that if I use the command "route -p add 0.0.0.0 MASK 0.0.0.0 192.168.0.1 metric 25 if 13" but if I unplug the adapter that was set to be default (13 specifies my wireless adapter that I want to use for internet by default) if will not allow me to connect on my wired connection (adapter number 11).

If I have both the wireless adapter and the ethernet cable plugged in, I will by default get my internet access from the ethernet port. The problem with this is that I live in a dorm where wall connections get rate limited if we exceed 2GB in a 24 hour period. I have managed to get a reasonable connection to a campus wifi network across the street (these are not rate limited) but if I have both plugged in, it will default to the dorm connection. I want to make the wifi connection the default connection, and if I have to, use the dorm connection as the fall back (in case I loose the signal).

I have a theory that if I can make the interface number of the wifi adapter lower than the interface number of the ethernet connection, I will be able to get the computer to use the wifi connection by default. Am I right in this thinking, and if so, how do I do it?

EDIT: Figured it out. It doesn't matter what the interface number is. Windows will pick whichever connection costs it the least. this is defined by the metric. So all you have to do is change the metric of the desired interface to something that is lower than the metric of the undesired connection and you are good to go. What I wonder is if this means if you made the metrics equal, could you double your speed (ie load balancing)?

My System SpecsSystem Spec
21 Apr 2010   #2

win7
 
 

the question is what is 192.168.0.1 ?
is it the IP gateway from your wireless ? If it is, so you're right.
check your computer routes using "route print"
and if you want to make it as default set with lowest metric

eg :
route add -p 0.0.0.0 mask 0.0.0.0 <wireless gateway IP> metric 0 -> default route
route add -p 0.0.0.0 mask 0.0.0.0 <wired gateway IP> metric 20 -> secondary route
My System SpecsSystem Spec
22 Apr 2010   #3

DT and LT: Windows 7 and Fedora 14
 
 

Ok, I think that setting the metrics to be equal will do some sort of load balancing, but not on a packet by packet basis. That would be the holy grail if I could figure out how to do that.....
My System SpecsSystem Spec
.


23 Apr 2010   #4

win7
 
 

Windows can do load balancing also if you set equal metric.
But i will not do perfectly like router do.
My System SpecsSystem Spec
11 Oct 2011   #5

Windows 7 32 Bit
 
 

What you want is just to send your internet traffic to a particular interface, not all your network traffic. Opening a command prompt and using the Route Print command, you'll see a route for your 127.0.0.0 network traffic, which is how Windows views your internet traffic. Type route change 127.0.0.0 mask 255.0.0.0 <gateway> metric 10 if <interface#> press enter. This will direct all your internet traffic to the interface you typed in the command, and leave all your other network traffic to go out their normal interface.

In Windows 7 you might also see a route for 127.0.0.1 traffic. Repeat the previous command for this route also.
My System SpecsSystem Spec
Reply

 How do I change the default interface for internet...





Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:44 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33