Windows主机是否正确解释了dnsmasq参数?

前端之家收集整理的这篇文章主要介绍了Windows主机是否正确解释了dnsmasq参数?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个由ubuntu服务器上的dnsmasq实例(Ubuntu 15.10,dnsmasq 2.75)提供服务的 Windows 10计算机网络(DNS和DHCP).设置基本上有效(dnsmasq提供地址并正确管理DNS请求),但一个特定情况除外.

我想为一台特定的机器提供特定的DNS服务器.我在dnsmasq中使用了tag选项:

# open zone
dhcp-host=84:3a:4b:20:94:f0,set:open

# DNS for everyone = OpenDNS
dhcp-option-force=option:dns-server,208.67.222.222,208.67.220.220
# DNS for open = Google
dhcp-option-force=tag:open,option:dns-server,8.8.8.8,8.8.4.4

在客户端上进行ipconfig / renew时,dnsmasq会发送正确的选项:

root@srv ~# dnsmasq -d
dnsmasq: started,version 2.75 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 192.168.0.254#53
dnsmasq-dhcp: DHCP,IP range 10.10.10.20 -- 10.10.10.100,lease time 5d
dnsmasq: cleared cache
dnsmasq-dhcp: 342453732 available DHCP range: 10.10.10.20 -- 10.10.10.100
dnsmasq-dhcp: 342453732 vendor class: MSFT 5.0
dnsmasq-dhcp: 342453732 client provides name: helloworld.example.com
dnsmasq-dhcp: 342453732 DHCPREQUEST(lan0) 10.10.10.21 84:3a:4b:20:94:f0
dnsmasq-dhcp: 342453732 tags: open,known,lan0
dnsmasq-dhcp: Ignoring domain example.com for DHCP host name helloworld
dnsmasq-dhcp: 342453732 DHCPACK(lan0) 10.10.10.21 84:3a:4b:20:94:f0 helloworld
dnsmasq-dhcp: 342453732 requested options: 1:netmask,3:router,6:dns-server,15:domain-name,dnsmasq-dhcp: 342453732 requested options: 31:router-discovery,33:static-route,43:vendor-encap,dnsmasq-dhcp: 342453732 requested options: 44:netbios-ns,46:netbios-nodetype,47:netbios-scope,dnsmasq-dhcp: 342453732 requested options: 121:classless-static-route,249,252
dnsmasq-dhcp: 342453732 next server: 10.10.10.254
dnsmasq-dhcp: 342453732 sent size:  1 option: 53 message-type  5
dnsmasq-dhcp: 342453732 sent size:  4 option: 54 server-identifier  10.10.10.254
dnsmasq-dhcp: 342453732 sent size:  4 option: 51 lease-time  5d
dnsmasq-dhcp: 342453732 sent size:  4 option: 58 T1  2d8h23m1s
dnsmasq-dhcp: 342453732 sent size:  4 option: 59 T2  4d5h23m1s
dnsmasq-dhcp: 342453732 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 342453732 sent size:  4 option: 28 broadcast  10.10.10.255
dnsmasq-dhcp: 342453732 sent size:  4 option:  3 router  10.10.10.254
dnsmasq-dhcp: 342453732 sent size:  4 option: 15 domain-name  testlab
dnsmasq-dhcp: 342453732 sent size: 18 option: 81 FQDN  03:ff:ff:6c:77:35:79:6f:70:32:64:73:79:2e...
dnsmasq-dhcp: 342453732 sent size:  8 option:  6 dns-server  8.8.8.8,8.8.4.4
dnsmasq-dhcp: 342453732 sent size:  1 option: 46 netbios-nodetype  08
dnsmasq-dhcp: 342453732 sent size:  4 option: 44 netbios-ns  10.10.10.254

因此,客户端被赋予IP 10.10.10.21(我在测试期间更改了它,并且每次都分配了正确的一个,每次更改 – 因此客户端正确解释了对请求的响应),以及特定的DNS服务器.

从dnsmasqside看起来一切都很好看.

在客户端我得到

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : testlab
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6205
   Physical Address. . . . . . . . . : 84-3A-4B-20-94-F0
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::74d6:d6c:a5cc:54c7%8(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.10.10.21(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : samedi 2 avril 2016 15:59:55
   Lease Expires . . . . . . . . . . : jeudi 7 avril 2016 16:03:15
   Default Gateway . . . . . . . . . : 10.10.10.254
   DHCP Server . . . . . . . . . . . : 10.10.10.254
   DHCPv6 IAID . . . . . . . . . . . : 75774539
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-87-7B-B4-3C-97-0E-67-52-6C
   DNS Servers . . . . . . . . . . . : 10.10.10.254
   Primary WINS Server . . . . . . . : 10.10.10.254
   NetBIOS over Tcpip. . . . . . . . : Enabled

我在客户端检查了Wireshark收到的流量.在DHCP ACK数据包(从DHCP服务器中获取的数据包)中,该选项是正确的(因此它没有被删除或类似的东西):

IP是正常但DNS服务器不正确:它默认为DH​​CP服务器 – 看起来接收的选项没有正确解释(?)

我发现了问题:客户端上的DNS设置是静态的. IP是通过DHCP分配的.

这是不正常的,是什么让我检查的是,我之前有一个相同的DNS切换到静态IP的问题 – 当我在家庭和工作网络之间进行时.

再次 – 这不是正常情况,如果我找出导致DNS切换到静态IP的原因,我将更新此答案.

原文链接:/windows/366846.html

猜你在找的Windows相关文章