[Dnsmasq-discuss] Can't set FQDN on dhcp clients

Snyder, Chris Chris_Snyder at sra.com
Fri Jun 8 19:27:47 BST 2012

I'm hope what I want is possible with dnsmasq, but if it is I'm out of
ideas.  Would love some help.


What I want is my dhcp clients to:

A)     get assigned an IP via DHCP from MAC matching on the dnsmasq
server (using /etc/ethers  + /etc/hosts)

B)      have forward/reverse DNS on my local network (via dnsmasq)

C)      have a full FQDN via 'hostname' command


I've got A + B working now.  Nothing I seem to do will give me an FQDN
on my clients, 'hostname' only returns the node name rather than the
FQDN.  This breaks a lot of software that is expecting and FQDN from
that.  If I can't get FQDN via DHCP then I'm going to have to ditch
dnsmasq and go for statically assigned IPs and break out Bind which I
don't want to do as this is a dynamic test network that will change a


My target client should be assigned an IP of and a name of
'test2.example.com', all by dnsmasq.  With my current setup , it does
get .5 and does get 'test2'.   But if I try setting an FQDN in either
/etc/hosts or /etc/ethers dnsmaq doesn't seem to like that, the MAC
matching appears to break, doesn't give me .5  and it yells at me with
the following:


    not giving name test2.example.com to the DHCP lease of because the name exists in /etc/hosts with address


I've tried every combination of FQDN and short name within /etc/ethers
and /etc/hosts I can think of, but nothing works.  I've seen references
to using dhcp-host lines in my dnsmasq.conf file, but that is not a
desired solution for me at this time.  (But if that's all that works..
.oh well).


Any ideas? Thanks



Currently using dnsmasq v2.45 (via Red Hat rpm)


My /etc/dnsmasq.conf (which runs on













My /etc/ethers:


00:0c:29:72:50:92 test2


My /etc/hosts:              localhost.localdomain localhost       test2



Chris Snyder

SRA Senior Linux Geek
Energystar Network O+M Team
ESTAR Issues: https://estar18.energystar.gov/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20120608/535ab885/attachment.html>

More information about the Dnsmasq-discuss mailing list