DNS问题,nslookup工作,ping不 [英] DNS problem, nslookup works, ping doesn't

查看:175
本文介绍了DNS问题,nslookup工作,ping不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的单位设置开发服务器。我已经设置了一个Ubuntu DNS服务器,并添加了区域婚礼列表(只是婚礼列表 - 没有 TLD 。它只是一个内部域名。)



这个工作在我的Ubuntu笔记本电脑上正常。



所有我的Windows PC(Vista和XP)我从命令提示符获得以下内容:

  C:\Users\Giles Roadnight> nslookup weddinglist 
服务器:UnKnown
地址:192.168.0.40

名称:weddinglist
地址:192.168.0.41


C:\Users\Giles Roadnight> ping 192.168.0.41

Pinging 192.168.0.41与32字节的数据:
从192.168.0.41回复:bytes = 32时间< TTL = 64
从192.168.0.41回复:bytes = 32时间< 1ms TTL = 64
从192.168.0.41回复:bytes = 32时间< 1ms TTL = 64
从192.168.0.41回复:bytes = 32 time< 1ms TTL = 64

192.168.0.41的Ping统计:
数据包:发送= 4,收到ved = 4,Lost = 0(0%损失),
以毫秒为单位的近似往返时间:最小= 0ms,最大= 0ms,平均值= 0ms

C:\Users \Giles Roadnight> ping weddinglist
Ping请求无法找到主机婚礼列表。请检查名称,然后重试。

我的ipconfig:

  C:\Users\Giles Roadnight> ipconfig -all 

Windows IP配置

主机名。 。 。 。 。 。 。 。 。 。 。 。 :Giles-Desktop
主Dns后缀。 。 。 。 。 。 。 :
节点类型。 。 。 。 。 。 。 。 。 。 。 。 :混合
启用IP路由。 。 。 。 。 。 。 。 :否
WINS代理启用。 。 。 。 。 。 。 。 :否

以太网适配器本地连接:

连接特定的DNS后缀。 :
说明。 。 。 。 。 。 。 。 。 。 。 :Marvell Yukon 88E8001 / 8003/8010 PCI千兆以太网控制器
物理地址。 。 。 。 。 。 。 。 。 :** - ** - ** - ** - ** - **
DHCP已启用。 。 。 。 。 。 。 。 。 。 。 :否
启用自动配置。 。 。 。 :是
链路本地IPv6地址。 。 。 。 。 :fe80 :: f179:680f:f313:5448%8(首选)
IPv4地址。 。 。 。 。 。 。 。 。 。 。 :192.168.0.5(首选)
子网掩码。 。 。 。 。 。 。 。 。 。 。 :255.255.255.0
默认网关。 。 。 。 。 。 。 。 。 :192.168.0.1
DNS服务器。 。 。 。 。 。 。 。 。 。 。 :192.168.0.40
NetBIOS over Tcpip。 。 。 。 。 。 。 。 :启用

我很确定DNS设置好,因为nslookup可以,但是不能ping,我无法在婚礼目录下访问网页。



如何使ping可以用于Windows PC?

解决方案

Windows内部解析器可能会将'.local'添加到域名,因为它没有点。



要验证此可能性,请将Wireshark(以前称为Ethereal)安装在您的客户端计算机,并在运行 ping 命令时观察任何DNS请求数据包。






OK,对我自己的XP机器在家进行进一步调查显示,对于单个标签名称(即foo或foo),系统根本不使用DNS,而是使用NBNS (NetBios名称服务)。



使用在 http://www.chicagotech.net/netforums/viewtopic.php?t=1476 ,我发现我能够通过放入单个条目强制对单个标签域进行DNS查找读 。在高级TCP / IP设置对话框中的附加这些DNS
后缀(按顺序)

I am setting up a development server in my flat. I have set up an Ubuntu DNS server on it and have added the zone weddinglist (just weddinglist - no TLD. It's just an internal domain.)

This works fine on my Ubuntu laptop.

On all my Windows PCs (Vista and XP) I get the following from the command prompt:

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.

My 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

I am pretty sure that I have the DNS set up OK as the nslookup is OK but I can't ping and I can't access webpages at weddinglist.

How can I make ping work for the Windows PCs?

解决方案

It's possible that the Windows internal resolver is adding '.local' to the domain name because there's no dots in it. nslookup wouldn't do that.

To verify this possiblity, install 'Wireshark' (previously aka Ethereal) on your client machine and observe any DNS request packets leaving it when you run the ping command.


OK, further investigation on my own XP machine at home reveals that for single label names (i.e. "foo", or "foo.") the system doesn't use DNS at all, and instead uses NBNS (NetBios Name Service).

Using a hint found at http://www.chicagotech.net/netforums/viewtopic.php?t=1476, I found that I was able to force DNS lookups for single label domains by putting a single entry reading "." in the "Append these DNS suffixes (in order)" in the "Advanced TCP/IP settings" dialog

这篇关于DNS问题,nslookup工作,ping不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆