Switching between Internet connections WiFi & Ethernet

How does Windows 10 handle manual & automatic switching between Internet WiFi & Ethernet connections?

Does it automatically switch based on the best signal strength? Or does it automatically switch based on some test speed?

If I want to manually change from one connection to the other, how do I do that?

# I have a desktop with no WiFi card. # On a USB port, I have a $25 AC1200 TP Link "T4U" wifi dongle (FCCID TE7T4U, IC 8853A-T4U)

formatting link
# On the Ethernet port, I have an Ubiquiti Nanobeam M2 (802.11n) (FCCID SWX-NBM2HP, IC 6545A-NBM2HP)

My two questions are

  1. How does Windows automatically decide which to use?
  2. How do I manually switch from one to the other?
Reply to
Bram van den Heuvel
Loading thread data ...

Bram van den Heuvel wrote on 7/10/2017 7:14 PM:

Basically, Windows chooses the fastest link. You can override this by adjusting the automatically assigned metric. To adjust the metric, open the adapter properties > Internet Protocol Version 4 > General > Advanced and disable Automatic metric. The adapter with the lowest value is the one Windows will choose.

If you only need a particular adapter to be used temporarily, it might be easier to either manually disconnect from wireless or disable the adapter (right-click > Disable), rather than setting the metric manually.

Reply to
lifewoutmilk

Thanks to that info, I found that "automatic metric" checkbox.

Here is a picture of it on my computer desktop.

formatting link

At this point that's exactly what I do which is I either pull the Ethernet cable out of the one wifi antenna connection at the back of the desktop or I pull the usb stick out of the usb port at the back of the desktop.

Right clicking and disabling would also work as you noted.

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.

That web page you referred me to seems great but it's complex the first two times I read it.

An explanation of the Automatic Metric feature for IPv4 routes

formatting link

Reply to
Bram van den Heuvel

formatting link

"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.

Reply to
Char Jackson

Taking this step by step, does this output from "route print" make any sense to you?

=========================================================================== Interface List 13...c4 e9 84 a1 4c aa ......TP-LINK Wireless USB Adapter 9...c4 e9 84 a1 4c aa ......Microsoft Wi-Fi Direct Virtual Adapter 8...0a 00 27 00 00 08 ......VirtualBox Host-Only Ethernet Adapter 12...00 26 55 d9 e3 44 ......Realtek PCIe GBE Family Controller 11...00 ff 84 a3 fa 25 ......TAP-Windows Adapter V9 1...........................Software Loopback Interface 1 44...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface 16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3 5...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4 ===========================================================================

Of the 9 items in that list, I only recognize the TP-Link USB dongle, and the RealTek Ethernet adapter. I guess the VirtualBox adapter is because I have VirtualBox installed. And I guess the TAP adapter is because I sometimes use OpenVPN.

The Wi-Fi direct adapter has the same MAC address as the TP-Link dongle so it's probably inside the dongle.

But what is the "Teredo" or "ISATAP" adaptor?

Googling, both the Teredo & ISATAP things are related to IPv6 I think.

formatting link
formatting link

What does my "route print" tell you that you can tell me?

Reply to
Bram van den Heuvel

of if you want to be able to switch seamlessly from wifi to wired ethernet, create a bridge of the two NICs, and let the IP address get assigned to the bridge, rather than having IP addresses assigned to each individual NIC.

Reply to
Andy Burns

I am not sure exactly what you are trying to accomplish. What you are asking sort of makes sense if you have a laptop that you take different places.

On my desktop computer I have both Ethernet and wireless connections. As stated Windows 10 picks the fastest connections.

The easiest way to change the connections manually is:

Right click the MSIcon on the lower left of the tool bar;

Click Network Connections;

click Changed Adapters Options;

Enable which ever adapter you wish to use.

In three click you can change your adapter.

Reply to
Keith Nuttle

Bram van den Heuvel wrote on 7/10/2017 9:32 PM:

You could change it with a PowerShell, create two scripts, one to prefer wired, one to prefer wireless.

The PowerShell command to set the metric is:

Set-NetIPInterface -InterfaceIndex INDEX -InterfaceMetric VALUE

To get the INDEX for the adapter, run 'Get-NetAdapter' and look at the ifIndex column.

Reply to
lifewoutmilk

Agreed, those are your wireless and wired interfaces, respectively, so you're interested in interface 13 (WiFi) and interface 12 (wired). Just ignore the rest for now.

Reply to
Char Jackson

Thanks for confirming that these are the two lines of interest.

12...00 26 55 d9 e3 44 ......Realtek PCIe GBE Family Controller 13...c4 e9 84 a1 4c aa ......TP-LINK Wireless USB Adapter

Given that interface "12" is the antenna connected to the Ethernet port, and interface "13" is the dongle connected to the USB port, I'll try this next to force the connection to go to Ethernet (but I'll send this first in case I destroy my network ... don't laugh ... I've screwed up before).

FORCE ETHERNET ANTENNA: netsh interface ipv4 set interface 12 metric=25 netsh interface ipv4 set interface 13 metric=50

FORCE USB ANTENNA: netsh interface ipv4 set interface 12 metric=50 netsh interface ipv4 set interface 13 metric=25

RETURN TO AUTOMATIC: netsh interface ipv4 set interface 12 metric=automatic netsh interface ipv4 set interface 13 metric=automatic

Before I screw with my network, how does that sound as a plan?

Reply to
Bram van den Heuvel

Just to be clear, there is no "wired Ethernet" in this desktop computer.

There is no WiFi card. There is an Ethernet port and USB ports.

So the USB 802.11n dongle is in the USB port. And a radio and antenna is connected to the Ethernet port.

The computer doesn't know that the Ethernet port isn't a wired connection though, so, maybe that distinction that it's not "really" Ethernet, doesn't matter.

Reply to
Bram van den Heuvel

I do not understand what a "power shell" is. I do understand what a "command line" is, so the "netsh" commands working at a command line make sense to me.

But how do I get to a "power shell command line"? Googling, I found out I can do this: Start -> Run -> powershell But is that an "admin" power shell?

I really don't understand at all why a second command line even exists. Can you give me a sentence or two on why I would use powershell over the command line?

Reply to
Bram van den Heuvel

If the current metrics are all above 50, I think you're fine. Otherwise, I'd bring the values down.

Reply to
Char Jackson

Bram van den Heuvel wrote on 7/11/2017 11:45 AM:

It's more consistent than the command line and related utilities in Windows for one. Also, instead of manipulating text output, PowerShell handles objects. So for instance, a pipe command:

Get-NetAdapter | where {$_.Name -eq 'Ethernet'}

Unlike cmd.exe the output from Get-NetAdapter is a list of objects, not just a bunch of text output. The default output from the above command would be a table, however, because the output is an object, you can do something like:

Get-NetAdapter | where {$_.Name -eq 'Ethernet'} | fl

Which gives the same output but in a list format instead. (The 'fl' is an alias for Format-List.)

Some of Microsoft's own GUI tools are actually running PowerShell behind the scenes (Active Directory Administration Tool for example). Well worth learning in my opinion.

Reply to
lifewoutmilk

I am not sure exactly what you are trying to accomplish. What you are asking sort of makes sense if you have a laptop that you take different places.

On my desktop computer I have both Ethernet and wireless connections. As stated Windows 10 picks the fastest connections.

The easiest way to change the connections manually is:

Right click the MSIcon on the lower left of the tool bar;

Click Network Connections;

click Changed Adapters Options;

Enable which ever adapter you wish to use.

In three click you can change your adapter.

Reply to
petrus bitbyter

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.