Getting "Temporary failure in name resolution" errors after switching from Dnsmasq to Unbound+ohchpd

Hey guys, I'm having issues with my devices pinging to other devices (i.e. my computer pinging to my raspberry pi) via its hostname (but NOT its IP Address) with the error Temporary failure in name resolution. Earlier today I went and changed my DNS resolver from Dnsmasq to Unbound+odhcpd so I can enable DNS over TLS and that's when I started having issues pinging to my devices. Another strange thing is that I can make the router ping to any device on the network via their hostnames. My router is a TPLink AC1750 A7 running OpenWRT 19.07.03 with luci. Is there a way to fix this issue?

Make sure you fill in the dns and domain options under dhcp UCI. odhcpd does not read Unbound UCI. If DHCP doesn't announce a search domain, then clients cannot ping by short hostname (example "host1234"). The search domain tells them to try appending that suffix to look-ups. Even without change applied, you can ping with FQDN (example "host1234.lan")

What do I put that in for those options? I looked around in the guides but couldn't find anything mentioning those

Check the odhcpd programs README. You want UCI dhcp:domain:yourdomain and unbound:domain:yourdomain to match for whatever your domain may be. odhcpd sends the search suffix in DHCP optional fields. This is how hosts know to add that suffix to one-word host names before a lookup.

Erm.. I can't find odhcpd's README. And I'm not sure what domain to use, as i'm using my ISP's service

Use your local fake domain which by default assumption in OpenWrt is "lan" You can find README either at OpenWrt primary git odhcpd repository :link: or on their github account.

1 Like

Erm.. I don't have a domain for my setup (at least that I know of), and I'm not really sure how to actually set the options in dhcp, since I am quite new to OpenWRT. Could you explain how to do that exactly?