Hi there
Just upgraded to 3.8.1 but hostname resolution is still an issue.
In luci, there’s a in the dns tab a checkbox to ignore /etc/hosts file. By default, it’s deactivated. So am I right to assume that it is being read?
Well, if so, it doesn’t work.
I did add a new entry to the /etc/hosts file, reboot router. When I tried to ping that added hostname, I just get an error. host not found.
so, how comes that the /etc/hosts is supposed to be read by the system yet it doesn’t do anything?
einar
September 21, 2017, 3:20pm
2
You can add the entries to the Static Hosts menu in luci, and they will work (might require a reload of the resolver).
still doesn’t answer the question:
If luci uses the /etc/hosts file and if I add local ips and stuff for resolution. Why doesn’t it work?
einar
September 21, 2017, 3:26pm
4
I wonder if you need to set option static_domains '1'
in /etc/config/resolver, under kresd
. I have it set.
vcunat
September 21, 2017, 3:27pm
5
IIRC that one is 1
by default.
einar
September 21, 2017, 3:29pm
6
In any case, I confirm /etc/hosts is not used. Static host definitions are taken from /etc/config/dhcp
.
vcunat
September 21, 2017, 3:32pm
7
So, I set an entry in Luci’s Network -> Hostnames configuration, however that is not pingable from the TO itself.
I can ping that hostname from the machine itself… I can’t test it from other machines as I can’t connect to wifi
I still don’t manage…
I assume with admin/network/hosts you actually meant admin/network/hostnames
Anway, I just can’t configure that it should just use “xxx” has hostname… it always wants that annoying “lan”…
If I do set set the local domain to “lan” and then add a dhcp-static lease for “xxx” then I can ping “xxx.lan”. If I remove the lan from the local domain and leave it empty - it doesn’t work.