When you have multiple network connections, sometimes you want to prefer one to be used as “default” (i.e. because it has higher speed or lower latency).
Windows already tries to accommodate for that by assigning “metrics” to your network connections. They depend on the kind of network (wired over wireless) and speed of the connection.
To see the current default network routes and their metrics, you use the route print command and filter it with findstr like this:
route print | findstr /C:"Metric" /C:" 0.0.0.0"
The “0.0.0.0” string is to filter out the default routes, and “Metric” includes the header line.
For one of my XP machines, the result is this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Network Destination Netmask Gateway Interface Metric | |
0.0.0.0 0.0.0.0 192.168.71.1 192.168.71.28 10 | |
0.0.0.0 0.0.0.0 192.168.171.1 192.168.171.140 10 |
Now, even though both metric are 10, my 192.168.71.1 gateway is much slower than my 192.168.171.1 gateway, so I want to prefer the last one. Read the rest of this entry »