On 10/4/21 05:37, Dominik Derigs wrote:
Hey Petr,

On Mon, 2021-10-04 at 11:45 +0200, Petr Menšík wrote:
Perhaps a flag could be added to dhcp-range, requesting also
addition of dhcp-hosts to static dns.
Maybe this flag would better be set on --dhcp-host and --dhcp-
hostsfile if this is used? This would feel more "natural" to me.

Initially, I've myself found this an odd behavior to only serve
only DHCP host names that are known to be "alive". I do see some
value in not serving A records when we know the server is
offline, however, the very same happens on the Internet all the
time: no DNS server I'm aware of checks if an A record is
reachable before giving you the reply.

I've seen other systems using dnsmasq (it may or not have been
DD-WRT, no promises!) that created two files from static leases:
A dhcp-hostsfile and an addn-hosts file. Having an option to make
the latter obsolete sounds like a good idea.


Maybe I am misunderstanding the issue, but dnsmasq already give the ability that is being asked for I believe.


If you want a static DNS entry, add the entry to /etc/hosts or -addn-hosts=

If you want a DHCP lease that always hands out the same ip address but is only valid during the lease, create a dhcp-host entry that includes the IP & hostname

If you want a DHCP lease can always be looked up via DNS, add it to /etc/hosts or -addn-hosts and the dhcp-host entry contains the hostname



Michael




_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to