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

我有一台由Ubuntu服务器(Ubuntu 15.10, dnsmasq 2.75)上的dnsmasq实例服务的Windows 10计算机networking(DNS和DHCP)。 除了一个特定的情况,设置基本上dnsmasqdnsmasq提供地址并正确pipe理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 (我在testing过程中对其进行了修改,并且每次都对其进行更改,因此对客户端的请求响应正确解释),以及其他DNS服务器。

一切从dnsmasq方面看起来不错。

在我得到的客户

 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收到的stream量。 在DHCP ACK数据包(从DHCP服务器接收的数据包)中,该选项是正确的(所以它不会被剥离或者类似的东西):

在这里输入图像说明

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

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

这是不正常的,是什么让我检查,这是我有同样的问题的DNS切换到静态IP之前 – 当我的家庭和工作networking之间。

再次 – 这不是一个正常的情况,如果我找出是什么导致DNS切换到静态IP我会更新这个答案。