Hi all, I'm new on openwrt and I've just installed it. I have a very little problem in name resolution. openwrt can't solve LAN local names. My configuration seems to use this resolv.conf:
root@OpenWrt:~# cat /tmp/resolv.conf.d/resolv.conf.auto
# Interface lan
nameserver 192.168.64.2
search csaricerche.com
So if run nslookup I expect to be correctly resolved but it didn't
root@OpenWrt:~# nslookup mypc
Server: 127.0.0.1
Address: 127.0.0.1:53
** server can't find mypc.lan: NXDOMAIN
** server can't find mypc.lan: NXDOMAIN
ok, doesn't seems to use my default search domain... but even if I run
Yea, you set the domain to "lan" instead of "csaricerche.com".
That's why
your DHCP server assumes "if someone asks for 'mypc' without any domain, he clearly must mean 'mpc.lan'",
but since your router is local for "csaricerche.com", your DHCP server comes to the conclusion that he's not responsible for that request.
Use the same domain for both, the "domain" and the "local" property with the only difference being that "local" needs to be wrapped within slash characters.
Is OpenWRT responsible for answering requests for csaricerche.com?
If yes: Then why would it ask "upstream"? That's what "authoritative" means: Your OpenWRT has all the knowledge about csaricerche.com and doesn't need to ask anyone about csaricerche.com.
If no: Then don't tell it to hand out host names for this zone. If OpenWRT isn't the source where every information about csaricerche.com comes from then you shouldn't expect your router to have/provide "additional" information for csaricerche.com that doesn't come from "upstream".
Maybe just use "lan" and "/lan/" for both, "domain" and "local", have your computer named "mypc.lan" and be done.
You're using (on purpose, I guess) a public domain for your local network. And you expect your router to be both, authoritative for that zone (being the one source of truth) and ask "upstream".
The best should be that they don't cache nothing, no dns service for the clients, we already have a dns server. The openwrt clients are bridged, they get the dns info by the dhcp of the lan, openwrt dhcp is disabled. in other word I don't need So I don't need dnsmasq I need only that openwrt use our DNS as a namserver.
I don't need in my LAN a further DNS managed by openwrt, the clients use the upstream DNS, I need only that openwrt ask to the upstream DNS to solve DNS querys.
Please explain: How would 192.168.64.2 know what A-record is assigned to "mypc"?
You're telling your OpenWRT to not hold any local data. So if you ask OpenWRT to tell you anything about "mypc", all it can do is pass that query along to 192.168.64.2.