DNS of offline devices

dnsmasq works mostly great, but I've noticed it fails to resolve hostnames for offline devices even if they have static assignments. Is there a way to make it always resolve static leases even if the device is offline?

I think this might be possible by using /etc/hosts instead of uci to configure static leases, but I want some of them to be configured based on MAC rather than hostname (i.e. some devices don't send a hostname), so a dnsmasq static lease via oci or luci seems to be the only way to go.

Add the dns option and it works fine.

config host
        option dns '1'
        option mac 'bc:dd:c2:zz:yy:xx'
        option ip '172.30.30.60'
        option hostid '60'
        option name 'u-smart-lightbulb'
4 Likes

it would be nice to put this dns option as a checkbox on the LUCI GUI: