Howto: resolve DHCP hostnames with the default kresd

Update: Since version 3.8, Foris (the default web interface) offers an option called “Enable DHCP clients in DNS”, which seems to work fine for me.

I would be careful with such “hacks”. I haven’t done any testing, but if you run e.g. dig -t DNSKEY someTLD., I’d expect this to rewrite the request by DNSKEY someTLD.lan.

search lines in resolv.conf would be less dangerous AFAIK, even though the potential for collisions with TLDs is unavoidable.

Update: Since version 3.8, Foris (the default web interface) offers an option called “Enable DHCP clients in DNS”, which seems to work fine for me.

Yes, changing the script like this would seem the way to go, to me. (In case you want the feature; it might better be optional.)

By “less persistent” you refer to this issue, I guess, but I find that orthogonal.

There seems clearly to be a desire to resolve local hostnames out-of-the box by using just hostname and not hostname.lan. Why is it that we have to go through such hoops to achieve that? Other routers offer such functionality out of the box.

It amazes me as well. I now have two dnsmasq processes, kresd, odhcpd and still can’t resolve local hosts. Is it by design? Is it because some custom config change I did in the past? No idea. I think everybody expects local resolution to just work, so why isn’t that the default? Why do they still mess with Foris while it’s clearly inferior and not as feature-complete as Luci?

Edit: I’ve tried this approach but doesn’t work for me. I’ve set dynamic_hosts=1 but can’t resolve any dhcp clients, not using some-client.lan, or the domain-name configured in /etc/config/dhcp i.e. some-client.mydomain.lan. Also the file /etc/kresd/dhcp_host_domain_ng.sh doesn’t exist on my router…