Eti*_*mps 18 windows windows-7 routing ip
KB299540解释了 Windows XP 如何自动为 IP 路由分配指标:
下表概述了用于为绑定到各种速度的网络接口的路由分配度量的标准。
Run Code Online (Sandbox Code Playgroud)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
但是,他们似乎在 Windows 7 中更改了算法,因为我的路由表如下所示:
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
===========================================================================
Run Code Online (Sandbox Code Playgroud)
唯一“正确”的指标是第一个(千兆连接 = 10)。但是,使用千兆连接的其他路由的 metric = 266,我的 VPN 的 metric = 286,环回是 306 (?!)。
知道发生了什么吗?