How is route automatic metric calculated on Windows 7?
- by e-t172
KB299540 explains how Windows XP automatically assign metrics to IP routes:
The following table outlines the criteria that is used to assign metrics for routes that are bound to network interfaces of various speeds.
Greater than 200 Mb: 10
Greater than 20 Mb, and less than or equal to 200 Mb: 20
Greater than 4 Mb, and less than or equal to 20 Mb: 30
Greater than 500 kilobits (Kb), and less than or equal to 4 Mb: 40
Less than or equal to 500 Kb: 50
However, they seem to have changed their algorithm in Windows 7, as my routing table looks like this:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.3 10
0.0.0.0 0.0.0.0 10.202.254.254 10.202.1.2 286
10.202.0.0 255.255.0.0 On-link 10.202.1.2 286
10.202.1.2 255.255.255.255 On-link 10.202.1.2 286
10.202.255.255 255.255.255.255 On-link 10.202.1.2 286
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 192.168.0.3 266
192.168.0.3 255.255.255.255 On-link 192.168.0.3 266
192.168.0.255 255.255.255.255 On-link 192.168.0.3 266
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.0.3 266
224.0.0.0 240.0.0.0 On-link 10.202.1.2 286
255.255.255.255 255.255.255.255 On-link 10.202.1.2 40
===========================================================================
The only "correct" metric is the first one (Gigabit connection = 10). However, other routes using the Gigabit connection have metric = 266, my VPN has metric = 286, and loopback is 306 (?!).
Any idea what's going on?