ping -a 192.168.99.3不解析vcl.nailit.lab的主机名,但是对于网络上的其他主机,如pfsense.nailit.lab.
nslookup vcl.nailit.lab和ping vcl.nailit.lab正常工作.见输出:
C:\Users\Administrator.NAILIT>ping -a 192.168.99.3 Pinging 192.168.99.3 with 32 bytes of data: Reply from 192.168.99.3: bytes=32 time<1ms TTL=64 Ping statistics for 192.168.99.3: Packets: Sent = 4,Received = 4,Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 0ms,Maximum = 0ms,Average = 0ms C:\Users\Administrator.NAILIT>ping vcl.nailit.lab Pinging vcl.nailit.lab [192.168.99.3] with 32 bytes of data: Reply from 192.168.99.3: bytes=32 time<1ms TTL=64 Ping statistics for 192.168.99.3: Packets: Sent = 4,Average = 0ms C:\Users\Administrator.NAILIT>nslookup vcl.nailit.lab Server: UnKnown Address: 192.168.99.13 Name: vcl.nailit.lab Address: 192.168.99.3 C:\Users\Administrator.NAILIT>ping -a 192.168.99.1 Pinging pfsense.nailit.lab [192.168.99.1] with 32 bytes of data: Reply from 192.168.99.1: bytes=32 time<1ms TTL=64 Ping statistics for 192.168.99.1: Packets: Sent = 4,Average = 0ms**
DNS记录似乎没问题 – 对于pfsense和vcl来说是相同的. DNS在MS Server 2012上
ping -a究竟如何解析主机名?为什么除’ping -a 192.168.99.3’之外的所有内容都能正常工作?
解决方法
How exactly does ping -a resolve the host name?
这称为反向DNS.转发DNS将名称解析为IP地址.反向DNS将IP地址解析为名称.当您在计算机中键入ping -a 1.2.3.4时,它会发出DNS查询PTR 4.3.2.1.in-addr.arpa. PTR代表指针记录.
Why is everything except ‘ping -a 192.168.99.3’ work correctly?
我的直觉告诉我你错过了那个IP地址的PTR记录.在DNS服务器上,您应该看到所谓的反向查找区域,如168.192.in-addr.arpa.在那个网络上的所有设备都应该有PTR记录. Windows设备通常会尝试注册自己的正向和反向DNS记录,但如果缺少整个反向查找区域,则无法执行此操作.