我有一个服务器上运行的dnsmasq(它的IP是10.10.31.22),假设它的主机名是mydns这里是dnsmasq.conf:
domain-needed bogus-priv local=/argonath.mydomain.com/ interface=eth0 listen-address=127.0.0.1 no-hosts addn-hosts=/etc/dnsmasq.hosts expand-hosts domain=argonath.mydomain.com
这里是dnsmasq.hosts:
10.10.31.8 mithrandir
注意我只使用DNS的dnsmasq,而不是DHCP。
现在我有Linux和一个Windows的盒子都使用dnsmasq服务器为他们的DNS。 在Linux上,如果我做nslookup mithrandir我得到:
Server: 10.10.31.22 Address: 10.10.31.22#53 Name: mithrandir Address: 10.10.31.8
在窗户上,我得到这个:
Server: UnKnown Address: 10.10.31.22 *** UnKnown can't find mithrandir: Non-existent domain
不过nslookup mithrandir.argonath.mydomain.com上的窗口框的作品:
Server: UnKnown Address: 10.10.31.22 Name: mithrandir.argonath.jhgfs.com.au Address: 10.10.31.8
我的第一个问题是,为什么我看不到“服务器”下的Linux盒子的mydns ? 那当然,我的第二个问题是为什么窗户失败? 我认为这是与服务器不正确报告其名称。 我设置错了什么?
解决了。 Windows在查询的末尾添加了一个域后缀,所以实际上是要求mithrandir.companydomain.com
(这是在所有工作站放在company.com域中的公司内部)。
之后,失败了,Windows试图mithrandir.com到更广泛的networking,并回来作为不存在。
不知道如何解决这个问题,但至less我知道这是Windows工作站的问题,而不是我的dnsmasqconfiguration。