在我的 Windows XP 工作站上,我可以在 DNS 中找到我想要连接的机器nslookup:
nslookup wolfman
Server: dns.company.com
Address: 192.168.1.38
Name: wolfman.company.com
Address: 192.168.1.178
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试连接到那台机器时,我收到一条错误消息,告诉我找不到该机器(即,无法在 DNS 中查找):
C:\> ping wolfman
Ping request could not find host wolfman. Please check the name and try again.
Run Code Online (Sandbox Code Playgroud)
如果我直接使用 IP 地址,我可以连接:
C:\> ping 192.168.1.178
Pinging 192.168.1.178 with 32 bytes of data:
Reply from 192.168.1.178: bytes=32 time=41ms TTL=126
Reply from 192.168.1.178: bytes=32 time=41ms TTL=126
Reply from 192.168.1.178: bytes=32 time=44ms TTL=126
Reply from 192.168.1.178: bytes=32 time=38ms TTL=126
Run Code Online (Sandbox Code Playgroud)
我可以通过在我的hosts文件中添加一个条目来解决这个问题,但我宁愿找出发生这种情况的原因。问题是暂时的,一天中的大部分时间我都可以很好地连接到机器。
这怎么可能?
ETA:为简洁起见,我省略了这一点,但有人要求: …
事实:
ping google.com 不起作用,返回 Ping request could not find host google.com.ping 216.58.209.78 (google IP) 确实有效,发送和接收所有数据包。nslookup google.com确实有效,返回正确的 IP 地址,然后确实与ping.c:\windows\system32\drivers\etc\host netsh winsock reset & netsh int ip reset 没有帮助。ipconfig /flushdns & ipconfig /registerdns不起作用,后者返回Registration of DNS records failed: Parameter is not correct.它偶尔会发生在人们身上,但我还没有找到解决这个问题的可能方法。我觉得这可能是我的磨难的关键。ipconfig /all如下。第一段看起来有点空白,也许那里有什么......?
Windows IP Configuration
Host Name . . …Run Code Online (Sandbox Code Playgroud)