我在我的公寓里设置了一个开发服务器.我已经在其上设置了一个Ubuntu DNS服务器,并添加了区域婚礼列表(只是婚礼列表 - 没有TLD.它只是一个内部域名.)
这在我的Ubuntu笔记本电脑上工作正常.
在我的所有Windows PC(Vista和XP)上,我从命令提示符处获得以下信息:
C:\Users\Giles Roadnight>nslookup weddinglist
Server: UnKnown
Address: 192.168.0.40
Name: weddinglist
Address: 192.168.0.41
C:\Users\Giles Roadnight>ping 192.168.0.41
Pinging 192.168.0.41 with 32 bytes of data:
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.0.41:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\Giles Roadnight>ping weddinglist
Ping request could not find host weddinglist. Please check the name and try again.
Run Code Online (Sandbox Code Playgroud)
我的ipconfig:
C:\Users\Giles Roadnight>ipconfig -all
Windows IP Configuration
Host Name . . . . . . . . . . . . : Giles-Desktop
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller
Physical Address. . . . . . . . . : **-**-**-**-**-**
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::f179:680f:f313:5448%8(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.40
NetBIOS over Tcpip. . . . . . . . : Enabled
Run Code Online (Sandbox Code Playgroud)
我很确定我已经设置了DNS,因为nslookup没问题,但是我无法ping通,我无法访问weddinglist中的网页.
如何为Windows PC进行ping操作?
Aln*_*tak 73
Windows内部解析程序可能会在域名中添加".local",因为其中没有任何点. nslookup不会这样做.
要验证这种可能性,请在客户端计算机上安装"Wireshark"(以前称为Ethereal),并在运行ping命令时观察离开它的任何DNS请求数据包.
好吧,我家自己的XP机器上的进一步调查显示,对于单个标签名称(即"foo"或"foo."),系统根本不使用DNS,而是使用NBNS(NetBios名称服务).
使用http://www.chicagotech.net/netforums/viewtopic.php?t=1476上的提示,我发现通过将单个条目读取为".",我能够强制对单个标签域进行DNS查找.在" 高级TCP/IP设置 "对话框中的" 附加这些DNS后缀(按顺序) "中
Jam*_*ook 47
我在使用多标签名称即test.internal时偶尔遇到此问题
我的解决方案是在我的Windows 7机器上停止/启动dnscache.以管理员身份打开控制台并键入
net stop dnscache
net start dnscache
Run Code Online (Sandbox Code Playgroud)
然后叹气并寻找一种方法将Mac作为主要桌面.
我遇到过同样的问题。正如其他答案所指出的那样,ping和nslookup使用不同的机制来查找ip。
您可能试图对不在同一域上的计算机执行ping操作。当您对服务器的标准名称执行ping操作时,它应该可以正常工作。
nslookup的工作原理:
PS C:\Users\Administrator> nslookup nuget
Server: ad-01.docs.com
Address: 192.168.10.20
Name: nuget.docs.com
Address: 192.168.10.17
Run Code Online (Sandbox Code Playgroud)
Ping失败:
PS C:\Users\Administrator> ping nuget
Ping request could not find host nuget. Please check the name and try again.
Run Code Online (Sandbox Code Playgroud)
使用FQDN执行Ping操作:
PS C:\Users\Administrator> ping nuget.docs.com
Pinging nuget.docs.com [192.168.70.17] with 32 bytes of data:
Reply from 192.168.10.17: bytes=32 time=1ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Ping statistics for 192.168.10.17:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
Run Code Online (Sandbox Code Playgroud)
