How does Windows choose between multiple available internet connections?

1

If multiple connections are available to Windows, for example a USB-connected wireless dongle and a WiFi connection, and both have internet access, how does Windows choose which connection to use for internet access?

Reading other questions, I understand that Windows has metrics for connections and it chooses the connection with the least cost. But how does Windows calculate that metric? Is it fixed for the type of connection (x for ethernet, y for WiFi) or is it calculated through actual usage?

Arsalan Ahmad

Posted 2014-10-12T16:37:01.537

Reputation: 225

Answers

3

The default "cost" ("metric") is determined from the link speed (not current throughput or usage) as reported by the network interface. I haven't found a current table, but here is the one for XP SP2:

Link Speed                                            Metric
Greater than 200 Mb                                     10
Greater than 80 Mb, and less than or equal to 200 Mb    20
Greater than 20 Mb, and less than or equal to 80 Mb     25
Greater than 4 Mb, and less than or equal to 20 Mb      30
Greater than 500 Kb, and less than or equal to 4 Mb     40
Less than or equal to 500 Kb                            50

This is from An explanation of the Automatic Metric feature for Internet Protocol routes at microsoft.com.

Since e.g. WiFi will normally report a lower interface speed than a 100 Mbps wired NIC, the routing will prefer the latter... but maybe not if you have a 10 Mbps NiC!

You can override these for individual NICs as described in the linked article. You can also specify metrics for specific destination IPs, over specific NICs, with the ROUTE command.

Jamie Hanrahan

Posted 2014-10-12T16:37:01.537

Reputation: 19 777

I wanna ask, what if it's 2 Ethernet with the same speed? (like 2 RJ45 to USB with the same branding) how do Windows choose? – ProtoAES256 – 2014-10-13T03:53:23.490

I'm not sure... I'll ask someone who probably knows. – Jamie Hanrahan – 2014-10-14T06:51:27.057