View Single Post
  #4   Report Post  
Posted to alt.comp.os.windows-10,alt.internet.wireless,sci.electronics.repair
Char Jackson Char Jackson is offline
external usenet poster
 
Posts: 69
Default Switching between Internet connections WiFi & Ethernet

On Tue, 11 Jul 2017 04:32:28 +0000 (UTC), Bram van den Heuvel
wrote:

What I will try to figure out is how to *set* that metric so that I can
just set the adapter metric to, say, 25 for the adapter I want to win and
50 for the adapter I want to lose, and when I want to switch which wifi
connection it uses, I just reverse the "cost" metric.


https://serverfault.com/questions/23...ute-on-windows

"route print" gets you the interface numbers, as well as the current
metrics.

Plug the interface number into the following command to set the new
metric. (Following command uses 25 as the interface number.)

netsh interface ipv4 set interface 25 metric=2

When you're tired of it, set it back to automatic like this:

netsh interface ipv4 set interface 25 metric=automatic

For a bit of hands-off automation, create a pair of batch files that do
these tasks simply by double clicking.