我有 Windows 7。我可以通过nslookup
正确解析主机名,但其他程序无法解析主机名:
C:\>nslookup myserver.mycompany.com
Server: mydns.mycompany.com
Address: 192.168.14.10
Non-authoritative answer:
Name: xk11.service.mycompany.com
Address: 192.168.35.50
Aliases: myserver.mycompany.com
myserver.service.mycompany.com
C:\>ping myserver.mycompany.com
Ping request could not find host myserver.mycompany.com. Please check the name and try again.
C:\>ping 192.168.35.50
Pinging 192.168.35.50 with 32 bytes of data:
Reply from 192.168.35.50: bytes=32 time=134ms TTL=51
Reply from 192.168.35.50: bytes=32 time=91ms TTL=51
原因何在?
答案1
您是否曾尝试过,修复了 DNS 服务器上的问题,然后再次尝试?nslookup 每次都会查询 DNS 服务器,但 ping 会使用缓存的回复(如果有)。因此,如果您之前尝试过 ping 失败,它会记住这一点,直到您清除缓存。您可以运行“ipconfig /flushdns”,或者只需重新启动,即可清除缓存。