问题原文
原帖链接 · guettli · CC BY-SA 3.0
The current search results for "debug dns" don't reveal a guide-line what to do, if you (as user/client) think there is something wrong with the host name resolution.
What steps can I do to narrow down the problem?
My particular case:
The tool host can resolve the name:
root@mypc# host remotehost.internal-domain.local
remotehost.internal-domain.local has address 10.99.204.11
But the tool nslookup can't:
root@mypc# nslookup host remotehost.internal-domain.local
nslookup: couldn't get address for 'remotehost.internal-domain.local': not found
I am confused.
Solution
In my case I changed this line in /etc/nsswitch.conf:
hosts: files mdns4_minimal [NOTFOUND=return] dns
to this
hosts: files dns
Now the .local Domain gets resolved by DNS, not by avahi peer-to-peer stuff.
已采纳解答
原帖链接 · HBruijn · CC BY-SA 3.0
What steps can I do to narrow down the problem?
In general: Many commands come with switches that increase the verbosity and/or the debug level allowing you to troubleshoot more easily. Check the manual page for the exact options, i.e. man host and man nslookup
In the case of DNS issues:
- a fairly typical problem is the presence of static entries in
/etc/hosts - your system may use alternative hosts database configured in
/etc/nsswitch.confand when you use tools that only test actual DNS name servers you get different results compared to what your system resolves. - your /etc/resolv.conf may contain multiple nameservers and one or more of those responds differently from the other(s), check by querying each specific name server directly
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
