可以 ping IP 地址和 nslookup 主机名,但在 Windows 中暂时无法 ping 主机名

jam*_*ate 7 networking dns windows-7 ping

我在我的一台机器上设置了一个 DNS 服务器,使用 BIND 9.7 一切正常。在我的 Windows 7 桌面上,我静态分配了所有网络值。我设置了一台 DNS 服务器——我的 DNS 服务器。在我的桌面上,

 I can ping a third machine by IP fine.
 I can nslookup the hostname of the third machine fine.
 When I ping the hostname, it says it cannot find the host.
Run Code Online (Sandbox Code Playgroud)

/

C:\Users\James>nslookup icecream
Server:  cake.my.domain
Address:  xxx.xxx.6.3

Name:    icecream.my.domain
Address:  xxx.xxx.6.9


C:\Users\James>ping xxx.xxx.6.9

Pinging xxx.xxx.6.9 with 32 bytes of data:
Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255
Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255
Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255
Reply from xxx.xxx.6.9: bytes=32 time<1ms TTL=255

Ping statistics for xxx.xxx.6.9:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\James>ping icecream
Ping request could not find host icecream. Please check the name and try again.
Run Code Online (Sandbox Code Playgroud)

我还将搜索域指定为 my.domain

  • xxx.xxx 和 my.domain 代替安全

为什么我不能通过主机名 ping 通?我也无法使用 FQDN ping 通。问题是所有解析主机名的应用程序都存在这个问题。我无法使用 PuTTY 通过主机名通过 SSH 连接到我的机器;仅通过 IP

Dis*_*lla -2

您可以尝试编辑您的主机文件。将其他计算机的主机名和 IP 地址放在那里。如果这不起作用,请尝试以下操作:您的路由器应该能够自行处理 dns 表。尝试暂时关闭您的 dns 服务器并清除所有计算机上的所有 dns 缓存。然后重新启动路由器并重试。

  • 如果将名称放入主机文件中,那么拥有 DNS 有何意义? (4认同)
  • 你的帖子给了我一个想法。我尝试了 ipconfig /flushdns,它再次开始工作。但这没有意义,因为它之前一直在工作,然后就停止了。检查&amp;+1 寻求帮助。 (2认同)