none
DNS 问题 RRS feed

  • 问题

  • 每次重新开电脑,对某些服务器连接就有问题。
    我有一台传真服务器,fax-server,在外网也有一个同名的机器。
    ping fax-server, 就返回外网地址: 63.251.38.190; ping ip是通的。
    当我在services重启dns client客户端后,就正常了,ping fax-server返回内网地址。
    internet没有问题

    请问如何解决这个问题。谢谢。


    DNS/域服务器: windows 2008 r2
    fax-server: windows 2012 r2
    客户端: windows 7/8.1

    >ipconfig /all
    Windows IP Configuration

       Host Name . . . . . . . . . . . . : ***-235
       Primary Dns Suffix  . . . . . . . : ***.com
       Node Type . . . . . . . . . . . . : Broadcast
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
       DNS Suffix Search List. . . . . . : ***.com
                                           SSG5-Serial

    Ethernet adapter Local Area Connection:

       Connection-specific DNS Suffix  . : SSG5-Serial
       Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
       Physical Address. . . . . . . . . : 70-**-**-**-**-D9
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Link-local IPv6 Address . . . . . : ****::****:****:****:fd50%16(Preferred)
       IPv4 Address. . . . . . . . . . . : 192.168.**.170(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Lease Obtained. . . . . . . . . . : October-29-15 1:57:02 PM
       Lease Expires . . . . . . . . . . : October-30-15 1:57:02 PM
       Default Gateway . . . . . . . . . : 192.168.**.1
       DHCP Server . . . . . . . . . . . : 192.168.**.1
       DHCPv6 IAID . . . . . . . . . . . : 326128850
       DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-18-**-**-**-**-**-**-**-**-**
       DNS Servers . . . . . . . . . . . : 192.168.*.10
                                           8.8.8.8
       NetBIOS over Tcpip. . . . . . . . : Enabled

    Wireless LAN adapter Wireless Network Connection 2:

       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . : SSG5-Serial
       Description . . . . . . . . . . . : Ralink RT3290 802.11bgn Wi-Fi Adapter
       Physical Address. . . . . . . . . : **-**-**-**-**-**
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes

    Tunnel adapter Teredo Tunneling Pseudo-Interface:

       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes

    Tunnel adapter isatap.SSG5-Serial:

       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . : SSG5-Serial
       Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-**-**
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes

    Tunnel adapter 6TO4 Adapter:

       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft 6to4 Adapter
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes


    • 已编辑 ITdragon 2015年10月29日 18:56
    2015年10月29日 18:22

答案

  • 你好,

    根据你之前的描述,你说这个问题可以通过重启DNS client服务来解决,重启DNS client服务端时,可以清除客户端的DNS缓存,接着客户端就能正确通过内网DNS服务器解析到内网地址。并且根据你上面的反馈,我怀疑是否在刚开始的时候,nslookup 的缓存中就存在fax server 的外网地址记录。

    为了验证上述猜测,我们可以通过ipconfig/displaydns来显示缓存信息,并且我们可以用命令nslookup的交互模式来测试一下nslookup faxserver的结果。

    nslookup交互模式例子:


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    2015年11月2日 8:20
    版主
  • 你好,

    从你的屏幕截图来看,这个问题确实很奇怪。客户端的服务器地址确实配的是内网DNS服务器地址,而且我们在用nslookup的时候明明能够解析到传真服务器的内网地址。但是一用ping的时候就解析到了外网地址。

    看来我们需要用network monitor 抓个包来看看到底怎么回事。在客户端和内网dns服务器上分别抓包,看看客户端在ping的时候是否向内网dns服务器发起了查询,内网dns服务器是否返回了正确的地址给客户端。

    Nework monitor 下载地址:

    https://www.microsoft.com/en-us/download/details.aspx?id=4865

    另外,测试一下在客户端的hostfile中添加传真服务器的内网地址记录是否可以奏效。 hostfile的文件位置:C:\windows\system32\drivers\etc\hosts. 可以用记事本的格式打开host文件, 添加记录: 192.168.x.x   fax-server

    注:做测试前记得清一下缓存,并且暂时不要在客户端配置其他dns地址,看看结果,然后加上公网dns地址,再对比一下结果。


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    2015年11月25日 7:12
    版主
  • 我注意到你截圖中 hosts 文件的添加有問題.
    最左邊的 # 是註釋的意思, 意味着該行不會被作爲 DNS 映射關係.
    此外 192.168, 這個 IP 顯然不完整.

    此外你之前回覆的 63.x.x.x 這個 IP, 通過反向查詢可以獲得一些信息.

    最後再次建議不要在客戶端引入外部 DNS.

    Folding@Home

    2015年11月26日 1:10

全部回复

  • 你好,

    请问你使用的首选DNS服务器的区域里是否只包含一个传真服务器的地址,即私有地址。如果这样的话,这个问题有可能是由于客户端与内网DNS服务器(192.168.*.1)通信出现问题导致的。当内网DNS服务器无法响应客户端的查询请求时,客户端通过8.8.8.8的DNS服务器查询到了传真服务器的公有地址。

    建议检查一下客户端与内网DNS服务器之间的网络连接,当出现解析不到私有地址的时候,用客户端ping一下DNS服务器(192.168.*.1)。 测试之前用ipconfig/flushdns清除一下客户端的缓存。

    可以将测试结果反馈给我们,做进一步排错。

    Anne


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    2015年10月30日 4:21
    版主
  • 谢谢, Anne回复。

    客户端与内网DNS服务器之间的网络连接没有问题。ping DNS ip,通过无问题。

    以下是客户端开机后的测试:

    c:\>ping fax-server
    Pinging fax-server.***.com [63.251.38.190] with 32 bytes of data:
    Reply from 63.251.38.190: bytes=32 time=81ms TTL=51
    Reply from 63.251.38.190: bytes=32 time=80ms TTL=51
    Reply from 63.251.38.190: bytes=32 time=80ms TTL=51
    Reply from 63.251.38.190: bytes=32 time=81ms TTL=51

    Ping statistics for 63.251.38.190:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 80ms, Maximum = 81ms, Average = 80ms

    c:\>ipconfig /flushdns
    windows IP Configurtion
    Successfully flushed the DNS Resolver Cache

    c:\>ping fax-server
    Pinging fax-server.***.com [63.251.38.190] with 32 bytes of data:
    Reply from 63.251.38.190: bytes=32 time=80ms TTL=51
    Reply from 63.251.38.190: bytes=32 time=79ms TTL=51
    Reply from 63.251.38.190: bytes=32 time=79ms TTL=51
    Reply from 63.251.38.190: bytes=32 time=80ms TTL=51

    Ping statistics for 63.251.38.190:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 80ms, Maximum = 81ms, Average = 80ms

    c:\>ping 192.*.*.*(fax-server 内网ip地址)

    Pinging 192.*.*.* with 32 bytes of data:
    Reply from 192.*.*.*: bytes=32 time=1ms TTL=128
    Reply from 192.*.*.*: bytes=32 time=1ms TTL=128
    Reply from 192.*.*.*: bytes=32 time<1ms TTL=128
    Reply from 192.*.*.*: bytes=32 time<1ms TTL=128

    Ping statistics for 192.*.*.*:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 1ms, Average = 0ms

    <重启DNS client>
    c:\>ping fax-server
    Pinging fax-server.***.com [192.*.*.*] with 32 bytes of data:
    Reply from 192.*.*.*: bytes=32 time=1ms TTL=128
    Reply from 192.*.*.*: bytes=32 time<1ms TTL=128
    Reply from 192.*.*.*: bytes=32 time<1ms TTL=128
    Reply from 192.*.*.*: bytes=32 time<1ms TTL=128

    Ping statistics for 192.*.*.*:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 1ms, Average = 0ms


    • 已编辑 ITdragon 2015年10月30日 15:29
    2015年10月30日 14:54
  • 你好,

    根据你之前的描述,你说这个问题可以通过重启DNS client服务来解决,重启DNS client服务端时,可以清除客户端的DNS缓存,接着客户端就能正确通过内网DNS服务器解析到内网地址。并且根据你上面的反馈,我怀疑是否在刚开始的时候,nslookup 的缓存中就存在fax server 的外网地址记录。

    为了验证上述猜测,我们可以通过ipconfig/displaydns来显示缓存信息,并且我们可以用命令nslookup的交互模式来测试一下nslookup faxserver的结果。

    nslookup交互模式例子:


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    2015年11月2日 8:20
    版主
  • 谢谢 Anne He 给的一条检查思路,不过还是没有看到问题在哪里。

    2015年11月24日 19:24
  • 對於位域的 Windows 客戶端電腦, 其 DNS 設置應只選擇內部 DNS, 不要設置外部 DNS.
    解析外部域名通過 DC 轉發進行.

    Folding@Home

    2015年11月25日 3:10
  • 你好,

    从你的屏幕截图来看,这个问题确实很奇怪。客户端的服务器地址确实配的是内网DNS服务器地址,而且我们在用nslookup的时候明明能够解析到传真服务器的内网地址。但是一用ping的时候就解析到了外网地址。

    看来我们需要用network monitor 抓个包来看看到底怎么回事。在客户端和内网dns服务器上分别抓包,看看客户端在ping的时候是否向内网dns服务器发起了查询,内网dns服务器是否返回了正确的地址给客户端。

    Nework monitor 下载地址:

    https://www.microsoft.com/en-us/download/details.aspx?id=4865

    另外,测试一下在客户端的hostfile中添加传真服务器的内网地址记录是否可以奏效。 hostfile的文件位置:C:\windows\system32\drivers\etc\hosts. 可以用记事本的格式打开host文件, 添加记录: 192.168.x.x   fax-server

    注:做测试前记得清一下缓存,并且暂时不要在客户端配置其他dns地址,看看结果,然后加上公网dns地址,再对比一下结果。


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    2015年11月25日 7:12
    版主
  • 另外,我上面提到display一下dns的缓存,结果怎么样?

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    2015年11月25日 7:34
    版主
  • display DNS, 显示的内容其他服务器正常, 就是fax-server在缓存中记录是外网地址, 63.251.38.91。
    2015年11月25日 14:03
  • DNS 缓存中记录是外网,所以肯定没有像内网DNS发起查询。 因为重启dns client 问题就解决,向内网DNS发起查询肯定也没问题。

    hosts 记录里没有fax-server记录,我会加上一条记录,看看情况。

    谢谢Anne细心指导。

    客户端更改hosts文件后重启,问题还在。



    • 已编辑 ITdragon 2015年11月25日 14:34
    2015年11月25日 14:12
  • 我注意到你截圖中 hosts 文件的添加有問題.
    最左邊的 # 是註釋的意思, 意味着該行不會被作爲 DNS 映射關係.
    此外 192.168, 這個 IP 顯然不完整.

    此外你之前回覆的 63.x.x.x 這個 IP, 通過反向查詢可以獲得一些信息.

    最後再次建議不要在客戶端引入外部 DNS.

    Folding@Home

    2015年11月26日 1:10
  • display DNS, 显示的内容其他服务器正常, 就是fax-server在缓存中记录是外网地址, 63.251.38.91。

    你好,

    这个结果就正如我们之前猜想的一样,是由于dns缓存中存在外网记录造成的。重启dns client的效果便是清空一下缓存,和ipconfig/flushdns效果一样。

    另外,我发现的HOST文件中的记录左边有#号, 那类似于注释,所以添加host记录是不需要加#号的,直接是192.168.x.x   fax-server. 修改后再测试一下行不行。


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    2015年11月26日 1:16
    版主