Hello Geert and all,

unfortunately this feature isn't convenient when you want to `ping pc` and wait until it's up; or when you check some system logs and see an IP and you want to run `host IP` to see which hostname it maps to, yet that PC isn't up at that time; or in certain multiple DHCP servers/failover/balancing scenarios.

If there's no way to maintain a single file with that information, then I'll use a bash script to convert dhcp-hosts to addn-hosts.

Thank you for your help!
Alkis


On 10/3/21 3:37 PM, Geert Stappers wrote:

Hello Alkis,
Hello Dnsmasq mailinglist,

On Sun, Oct 03, 2021 at 11:21:00AM +0300, Alkis Georgopoulos wrote:
> Hi, I'm using a dhcp-hostsfile with lines like the following:
>
> b8:27:eb:c4:a5:4a,set:lab1,192.168.67.100,rpi
>
> When that client boots, I can run `host rpi localhost` and dnsmasq tells me
> its IP.
> But when that client is offline, dnsmasq replies "Host rpi not found:
> 3(NXDOMAIN)"

I consider that a good feature of dnsmasq,
having in DNS what is recently been seen by DHCP.


> Is there any way for dnsmasq to put all the dhcp-hosts into its DNS view
> even when these clients are offline?
> Otherwise I guess I could write a bash script that converts a dhcp-hosts
> file into an addn-hosts file with lines like:
>
> 192.168.67.100 rpi

Yes, that way is DHCP not involved.

> Thank you,
> Alkis Georgopoulos


Groeten
Geert Stappers



_______________________________________________
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