[Dnsmasq-discuss] resolving server's hostname

Albert ARIBAUD albert.aribaud at free.fr
Sat Feb 18 18:06:45 GMT 2017

Hi Carl,

Le Sat, 18 Feb 2017 09:31:19 -0600
Carl Karsten <carl at nextdayvideo.com> a écrit:

> dc10b is the dnsmasq server

Ok; and I assume that you are running 'host' on another machine, right?

> I am using a modified version of this:
> https://anonscm.debian.org/git/debconf-video/ansible.git/tree/roles/dhcp-server

Can't say it tells me much. :)

> I haven't checked in the mods yet because things are still a little
> wonky. git diff ... skimmed, don't see anything that would affect
> dnsmasq.
> juser at dc10b:~$ cat /etc/dnsmasq.d/local.conf
> ## Ansible managed
> interface=eth-local
> domain=lca2017.lan
> dhcp-range=,,6h
> dhcp-option-force=210,/srv/tftp/
> dhcp-boot=pxelinux.0
> dhcp-authoritative
> enable-tftp
> tftp-root=/srv/tftp

And what's the /etc/hosts?

> Hmm, on an openwtt ap running dnsmasq:
> root at tpap:~# cat /etc/resolv.conf
> search lan
> nameserver
> root at tpap:~# cat /etc/hosts
> localhost
> root at tpap:~# nslookup tpap
> Server:
> Address 1: localhost
> Name:      tpap
> Address 1: tpap.lan

What's 'tpap' supposed to be?

Anyway, my guess: your dnsmasq server has its own name listed in
its /etc/hosts with as the matching IP, and your dnsmasq
config does not contain option no-hosts, so your dnsmasq uses
its /etc/hosts when resolving a name; ergo, it resolves its own name to


More information about the Dnsmasq-discuss mailing list