Windows主机是否正确解释了dnsmasq参数?
发布时间:2020-12-13 23:32:31 所属栏目:Windows 来源:网络整理
导读:我有一个由Ubuntu服务器上的dnsmasq实例(Ubuntu 15.10,dnsmasq 2.75)提供服务的 Windows 10计算机网络(DNS和DHCP).设置基本上有效(dnsmasq提供地址并正确管理DNS请求),但一个特定情况除外. 我想为一台特定的机器提供特定的DNS服务器.我在dnsmasq中使用了tag
我有一个由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的原因,我将更新此答案. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 使用带Stretch的图像控制= UniformToFill – WP7
- 如何获取卫星资源DLL的模块句柄? (c视觉工作室)
- 在windows server 2008的虚拟机中搭建openfilter(一)
- .net – 在桌面下打开和关闭Windows 8触摸键盘tabtip
- windows – 用于映射网络驱动器的脚本
- 将PDF文件/对象插入Microsoft Excel时出现“无法插入对象”
- 窗口 – 是否可以在批处理文件中的回线中放置新的行字符?
- Vulkan Tutorial 01 开发环境搭建之Windows
- 什么是Kindle for Windows Phone 7中使用的控件
- 在Windows上安装Pillow for Python