Yesterday I needed my Android device to see my PC, and I added a hostname in Network > Hostnames.
All was working well. But today is stopped working all of sudden.
None of my devices see the hostnames that are set on router.
This if from my notebook:
$ nslookup pc.local
** server can't find pc.local: NXDOMAIN
And this is from router terminal:
Address 1: 192.168.3.5
*** Can't find pc.local: No answer (this is ok, it's turned off ATM)
if I specify router address as DNS server to use, it's OK on notebook:
$ nslookup pc.local 192.168.3.1
But browser on Android doesn't know anything about DNS server at 192.168.3.1.
How to fix DNS server propagation?
OpenWrt version 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.044.30835-34e0d65
100.100.100.100 is not a valid private (rfc 1928) address, there shouldn't be any DNS server listening at that address - and even if it were, that would be a remote one, which doesn't know anything about your local DNS overrides.
.local as a top level domain is reserved for zeroconf/avahi/bonjour, it shouldn't (mustn't) be used for your local addresses, OpenWrt defaults to using .lan instead.
There is no DNS propagation from your local DNS overrides to (any) public servers, DNS resolution is only available within your local network (changes to those settings are effective immediately).
eh, I just added games.local to Network > Hostnames and it worked for one day, but stopped working next day.
I have no idea why nslookup addresses 100.100.100.100 when called without DNS server specified.
And I don't need overrides of public servers, I just want my Android phone to query the router DNS server when connected to WiFi
100.100.100.100 is your ISP's DNS-server, since it resides inside the CGNAT. Maybe you have some software that causes your phone to always use that, or perhaps your phone has the option of using both WiFi and mobile-data simultaneously, like e.g. mine does? If I have that option enabled, Android randomly chooses to use my ISP's DNS-servers instead of the local one, which is why I always disable that.