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

freelancer91

New member
Local time
4:50 PM
Messages
71
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)?
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Custom Desktop, Dell Studio XPS 1340 laptop
OS
DT and LT: Windows 7 and Fedora 14
CPU
DT: Intel QX9770, LT: Intel P8600
Motherboard
DT: Intel DX48BT2
Memory
DT: 8GB OCZ DDR3 PC3-10666 Gold Edition LT: 4GB DDR3-1066
Graphics Card(s)
DT: BFG Geforce GTX 295 (B), LT: NVidia Geforce 9400M G
Sound Card
DT: Integrated LT: Integrated
Monitor(s) Displays
DT: Acer 23 inch 1920x1080 monitors, LT: 13 inch
Screen Resolution
DT: 3840x1080 LT: 1280x800
Hard Drives
DT: Samsung SpinPoint 1TB HD103UJ 7200RPM HDD+Fantom Drives 2TB 7200rpm External+OCZ Vertex Series 30GB SSD (boot)
LT: Seagate Momentus 7200RPM 320GB 2.5'' HDD
PSU
DT: Rosewill Bronze Series 1000W LT: 6 cell 62837mWh Li-ion
Case
DT:Thermaltake Armor Series LCS, LT:Dell Black Studio XPS 13
Cooling
DT: Custom watercooling setup
Keyboard
DT: Kengsinton PC/Mac LT: Integrated backlit keyboard
Mouse
DT: Logitech USB Optical Mouse LT: Integrated Track Pad
Internet Speed
380KB/s download on a good day...
Other Info
DT: CD/DVDRW Drive: Hp dvd1140, Multifunction front panel w/ 4 USB ports (2 Powered with 5V and 12V), Powered External SATA, 25-in-1 card reader, and audio ports

LT: Integrated Webcam with Microphone array, 8-in-1 card reader
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 Computer

OS
win7
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 Computer

Computer Manufacturer/Model Number
Custom Desktop, Dell Studio XPS 1340 laptop
OS
DT and LT: Windows 7 and Fedora 14
CPU
DT: Intel QX9770, LT: Intel P8600
Motherboard
DT: Intel DX48BT2
Memory
DT: 8GB OCZ DDR3 PC3-10666 Gold Edition LT: 4GB DDR3-1066
Graphics Card(s)
DT: BFG Geforce GTX 295 (B), LT: NVidia Geforce 9400M G
Sound Card
DT: Integrated LT: Integrated
Monitor(s) Displays
DT: Acer 23 inch 1920x1080 monitors, LT: 13 inch
Screen Resolution
DT: 3840x1080 LT: 1280x800
Hard Drives
DT: Samsung SpinPoint 1TB HD103UJ 7200RPM HDD+Fantom Drives 2TB 7200rpm External+OCZ Vertex Series 30GB SSD (boot)
LT: Seagate Momentus 7200RPM 320GB 2.5'' HDD
PSU
DT: Rosewill Bronze Series 1000W LT: 6 cell 62837mWh Li-ion
Case
DT:Thermaltake Armor Series LCS, LT:Dell Black Studio XPS 13
Cooling
DT: Custom watercooling setup
Keyboard
DT: Kengsinton PC/Mac LT: Integrated backlit keyboard
Mouse
DT: Logitech USB Optical Mouse LT: Integrated Track Pad
Internet Speed
380KB/s download on a good day...
Other Info
DT: CD/DVDRW Drive: Hp dvd1140, Multifunction front panel w/ 4 USB ports (2 Powered with 5V and 12V), Powered External SATA, 25-in-1 card reader, and audio ports

LT: Integrated Webcam with Microphone array, 8-in-1 card reader
Windows can do load balancing also if you set equal metric.
But i will not do perfectly like router do.
 

My Computer

OS
win7
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 Computer

OS
Windows 7 32 Bit
Back
Top