[Dnsmasq-discuss] DHCP mangling IP address, host name
Geert Stappers
stappers at stappers.nl
Thu Dec 17 18:06:17 GMT 2020
On Thu, Dec 17, 2020 at 10:14:51AM -0700, duane-dnsmasq-discuss at evenson.ca wrote:
> I'm getting a confusing result with my DHCP server part.
:-)
> $ sudo grep -v -E '^$|^#' /etc/dnsmasq.conf
> domain-needed
> bogus-priv
> strict-order
> no-resolv
> no-poll
> server=1.1.1.1
> server=9.9.9.10
> server=80.80.80.80
> local=/example.com/
> interface=eth0
> expand-hosts
> domain=example.com
> dhcp-range=192.168.0.2,192.168.0.254
> dhcp-host=00:25:f6:03:2a:5d,iris,192.168.0.10/24
> dhcp-authoritative
> selfmx
> .
>
> Except for obscuring my domain name, this is the output of the conf file.
> Her is my /etc/hosts file:
>
> $ sudo cat /etc/hosts
> 127.0.0.1 ian localhost
> ::1 ian localhost ip6-localhost ip6-loopback
> 192.168.0.1 ian ian mail localhost localhost.localdomain
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> 192.168.0.2 dave
> 192.168.0.3 edward
> 192.168.0.4 fred
> 192.168.0.9 helen
> 192.168.0.10 iris
> 192.168.0.17 oscar
> 192.168.0.21 henry
>
> Here is what I get in syslog:
>
>
> $ sudo grep dnsmasq /var/log/syslog
>
> ...
>
> Dec 17 09:35:54 ian systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
> Dec 17 09:35:54 ian dnsmasq[14594]: dnsmasq: syntax check OK.
> Dec 17 09:35:54 ian dnsmasq[14599]: started, version 2.80 cachesize 150
> Dec 17 09:35:54 ian dnsmasq[14599]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
> Dec 17 09:35:54 ian dnsmasq[14599]: warning: ignoring resolv-file flag because no-resolv is set
> Dec 17 09:35:54 ian dnsmasq-dhcp[14599]: DHCP, IP range 192.168.0.2 -- 192.168.0.254, lease time 1h
> Dec 17 09:35:54 ian dnsmasq[14599]: using local addresses only for domain example.com
> Dec 17 09:35:54 ian dnsmasq[14599]: using nameserver 80.80.80.80#53
> Dec 17 09:35:54 ian dnsmasq[14599]: using nameserver 9.9.9.10#53
> Dec 17 09:35:54 ian dnsmasq[14599]: using nameserver 1.1.1.1#53
> Dec 17 09:35:54 ian dnsmasq[14599]: read /etc/hosts - 16 addresses
> Dec 17 09:35:54 ian dnsmasq-dhcp[14599]: not giving name fred.example.com to the DHCP lease of 192.168.0.211 because the name exists in /etc/hosts with address 192.168.0.4
> Dec 17 09:35:54 ian dnsmasq-dhcp[14599]: not giving name fred to the DHCP lease of 192.168.0.211 because the name exists in /etc/hosts with address 192.168.0.4
> Dec 17 09:35:54 ian dnsmasq-dhcp[14599]: not giving name henry.example.com to the DHCP lease of 192.168.0.204 because the name exists in /etc/hosts with address 192.168.0.21
> Dec 17 09:35:54 ian dnsmasq-dhcp[14599]: not giving name henry to the DHCP lease of 192.168.0.204 because the name exists in /etc/hosts with address 192.168.0.21
> Dec 17 09:35:55 ian dnsmasq[14600]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /etc/resolvconf/run/resolv.conf
> Dec 17 09:35:55 ian systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: DHCPDISCOVER(eth0) 00:25:f6:03:2a:5d
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: DHCPOFFER(eth0) 192.168.0.178 00:25:f6:03:2a:5d
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: DHCPREQUEST(eth0) 192.168.0.178 00:25:f6:03:2a:5d
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: Ignoring domain 168.0.10/24 for DHCP host name 192
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: DHCPACK(eth0) 192.168.0.178 00:25:f6:03:2a:5d 192
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: not giving name fred.example.com to the DHCP lease of 192.168.0.211 because the name exists in /etc/hosts with address 192.168.0.4
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: not giving name fred to the DHCP lease of 192.168.0.211 because the name exists in /etc/hosts with address 192.168.0.4
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: not giving name henry.example.com to the DHCP lease of 192.168.0.204 because the name exists in /etc/hosts with address 192.168.0.21
> Dec 17 09:36:40 ian dnsmasq-dhcp[14599]: not giving name henry to the DHCP lease of 192.168.0.204 because the name exists in /etc/hosts with address 192.168.0.21
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: DHCPDISCOVER(eth0) 00:25:f6:03:2a:5d
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: DHCPOFFER(eth0) 192.168.0.178 00:25:f6:03:2a:5d
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: DHCPREQUEST(eth0) 192.168.0.178 00:25:f6:03:2a:5d
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: Ignoring domain 168.0.10/24 for DHCP host name 192
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: DHCPACK(eth0) 192.168.0.178 00:25:f6:03:2a:5d 192
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: not giving name fred.example.com to the DHCP lease of 192.168.0.211 because the name exists in /etc/hosts with address 192.168.0.4
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: not giving name fred to the DHCP lease of 192.168.0.211 because the name exists in /etc/hosts with address 192.168.0.4
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: not giving name henry.example.com to the DHCP lease of 192.168.0.204 because the name exists in /etc/hosts with address 192.168.0.21
> Dec 17 09:36:51 ian dnsmasq-dhcp[14599]: not giving name henry to the DHCP lease of 192.168.0.204 because the name exists in /etc/hosts with address 192.168.0.21
>
> I power recycled the VOIP device (iris) to trigger a DHCP event. You can see
> that the server is trying to use 192 as a hostname and 168.0.10/24 as an
> address for some reason.
>
> Why is it mangling the IP address?
My bet is on Iris, on Iris being misconfigurated.
Regards
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list