Windows 7 路由优先考虑 WLAN

Windows 7 路由优先考虑 WLAN

我现在很迷茫。我试过用 Google 搜索,也搜索过这个地方,但似乎都没什么用。

当我同时启用 LAN 和 WLAN 时,WLAN 优先。我在 LAN 上托管了一个 Web 服务器,地址为 192.168.5.118。当 WLAN 处于活动状态时,我无法访问此 Web 服务器,因为流量是通过 WLAN 路由的。如果我禁用 WLAN,我就可以成功访问 Web 服务器。

我已经关注诸如此类的话题。将 WLAN 度量设置为 9999 并在重启之前清除路由表。没有成功。

我也改变了绑定如 Microsoft KB 中所述。还是没成功。除了禁用我的 WLAN(这意味着我将无法再访问网络)之外,我找不到其他解决办法。

以下是路由表,可供进一步参考。

C:\Windows\system32>route print
===========================================================================
Interface List
 11...5c 26 0a 4b 13 90 ......Intel(R) 82577LM Gigabit Network Connection
 12...18 3d a2 20 0e 6c ......Intel(R) Centrino(R) Advanced-N 6200 AGN
  1...........................Software Loopback Interface 1
 17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 15...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       172.22.0.2    172.22.17.104  19998
        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
       172.22.0.0      255.255.0.0         On-link     172.22.17.104  10255
    172.22.17.104  255.255.255.255         On-link     172.22.17.104  10255
   172.22.255.255  255.255.255.255         On-link     172.22.17.104  10255
      192.168.0.0      255.255.0.0         On-link     192.168.5.220    266
    192.168.5.220  255.255.255.255         On-link     192.168.5.220    266
  192.168.255.255  255.255.255.255         On-link     192.168.5.220    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.5.220    266
        224.0.0.0        240.0.0.0         On-link     172.22.17.104  10255
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     192.168.5.220    266
  255.255.255.255  255.255.255.255         On-link     172.22.17.104  10255
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
  1    306 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

IP 配置。

C:\Windows\system32>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.5.220
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : wtccorp.com
   IPv4 Address. . . . . . . . . . . : 172.22.17.104
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . : 172.22.0.2

Tunnel adapter isatap.{C07E68D9-80F9-4D79-88F5-6506A3F93A2C}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.wtccorp.com:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : wtccorp.com

Tunnel adapter isatap.{F0B16D61-44D7-44FD-99BF-256864A20C13}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

答案1

路由优先级:

  1. 最具体的匹配(匹配的最小子网)
  2. 度量

您的路由表有一个用于链接的条目192.168.0.0 255.255.0.0,因此它将192.168.5.118直接通过 L2 发送发往的流量。

我不认为你的问题在于路由。

  • 可能是 DNS。
  • 可能是其他原因。浏览器上的代理设置如果地址不在 192.168.0.0/16 范围内,则会导致这种情况。

运行 wireshark 并查看当您向 Web 服务器发出请求时流量去向何处192.168.5.118

相关内容