Hello,
I use dnsmasq partly because it's lightweight DNS server, partly because
most of router firmwares provide it as DNS/DHCP server.
On 13.09.23 20:18, TRUNKLES via Dnsmasq-discuss wrote:
I'd like to start by just asking a simple question I've not managed to find
an answer to anywhere else: are /etc/ethers and /etc/hosts supposed to
supersede dynamic IP allocaiton?
I don't think anything is supposed to supersede dynamic allocation.
I use /etc/hosts and /etc/ethers as a bit more universal way to achieve
static DHCP allocation.
the upside is that /etc/hosts is used by system libraries to resolve hosts
even if DNS is not running.
Suppose I have all of my "known" devices (MAC addresses) in /etc/ethers,
are those supposed to appear to dnsmasq as implicit --dhcp-host=
declarations, to take precedence over dynamic host IP allocation as
provided by --dhcp-range= statements in the conf file?
I am sure both hosts/ethers and --dhcp-host declaration override dhcp-range,
because dhcp-range is only to be used for hosts undefined in the above.
I'm not sure whether --dhcp-host overrides /etc/hosts and /etc/ethers, but
logically I'd expect that explicit dnsmasq configuration would override
system settings.
And as for the things that don't work at all part: As deployed, probably
badly configured by me, dnsmasq is apparently recognising the /etc/ethers
entry and matching it with /etc/hosts, because that shows up and looks
good in /var/lib/misc/dnsmasq.leaes, but then, also allocating it a
dynamic IP address, which results in entries like this:
1694633632 41:c4:b7:ff:16:a3 192.168.111.126 192.168.111.20 # media-server *
That not only looks wrong, but is wrong enough that if I stop dnsmasq and
then restart it, it refuses to run until I've deleted that file. Clearly,
I've done something terrible somewhere, but I still find it interesting
that dnsmasq would produce a lease file that is so wrong that it segfaults
upon trying to read it back upon restart.
yes, this looks wrong. web search for dhcp.leases file format returns:
https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2006q2/000732.html
However I have no idea how you came to this problem, you should have version
2.86 installed:
https://packages.ubuntu.com/search?keywords=dnsmasq
Are you sure that only dnsmasq modified dhcp.leases file?
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I don't have lysdexia. The Dog wouldn't allow that.
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss