Windows

特定 IP 地址解析錯誤

  • November 6, 2018

我有一個具有以下拓撲的網路:

+-----------+       +-----------+
|192.168.1.1+---+--->192.168.1.7|
+-----------+   |   +-----------+
  server       |      windows
               |
               |   +-----------+
               +--->192.168.1.3|
                   +-----------+
                     GNU/Linux

server機器連接到網際網路並充當本地網路的 DHCP 伺服器。GNU/Linux機器工作正常。windows然而,機器表現出一種奇怪的行為——它無法解析特定的網際網路 IP 地址。

windows我可以從機器ping 大部分地址:

C:\Users\User>tracert 8.8.8.8

Tracing route to google-public-dns-a.google.com [8.8.8.8]
over a maximum of 30 hops:

 1    <1 ms    <1 ms    <1 ms  192.168.1.1
 2    <1 ms    <1 ms    <1 ms  x.x.x.x
 ....
 7     1 ms     1 ms     1 ms  google-public-dns-a.google.com [8.8.8.8]

Trace complete.

但是對於某些地址,windows機器會路由到其本地網路地址:

C:\Users\User>tracert 198.185.159.145

Tracing route to 198.185.159.145 over a maximum of 30 hops

 1  WINDOWS.machine.example.com [192.168.1.7]  reports: Destination host unreachable.

Trace complete.

來自機器的相同跟踪GNU/Linux如下所示:

traceroute to 198.185.159.145 (198.185.159.145), 30 hops max, 60 byte packets
1  192.168.1.1 (192.168.1.1)  0.322 ms  0.288 ms  0.278 ms
....
14  * * *
15  198.185.159.145 (198.185.159.145)  158.510 ms  158.523 ms  158.505 ms

Windows 防火牆已關閉,server iptables鏈都設置為ACCEPT.

什麼可能導致這種行為?

編輯 1

windows機器路由表:

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
     0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.7     10
   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.0.0.0        224.0.0.0         On-link       192.168.1.7    266
 192.168.1.7  255.255.255.255         On-link       192.168.1.7    266
 223.255.255.255  255.255.255.255         On-link       192.168.1.7    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.1.7    266
 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.1.7    266
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination      Gateway
 9    306 ::/0                     On-link
 1    306 ::1/128                  On-link
 9    306 2001::/32                On-link
 9    306 2001:0:9d38:6ab8:3c09:1c95:3f57:fef8/128
               On-link
 5    266 fe80::/64                On-link
 9    306 fe80::/64                On-link
 9    306 fe80::3c09:1c95:3f57:fef8/128
               On-link
 5    266 fe80::9ce4:a7a5:5ab:8512/128
               On-link
 1    306 ff00::/8                 On-link
 5    266 ff00::/8                 On-link
 9    306 ff00::/8                 On-link
===========================================================================

您的本地網路的網路遮罩 ( 224.0.0.0) 也覆蓋了目標地址。

放入正確的網路遮罩,它應該可以工作。

引用自:https://serverfault.com/questions/938828