Secondary nameserver resolv.conf not queried
I'm trying to query the second nameserver on a local network to resolve local domain names to IP's.
Code:
$ ping ids.mydomain.loc Code:
$ nslookup hostname 10.0.0.53 Code:
nameserver 123.123.123.123 I'm using CentOS release 5.4. Thanks |
This is how the resolver works. It asks the 1st nameserver in /etc/resolv.conf and if it's not responding it asks the 2nd one.
In your case the 1st (I guess it's a public dns) knows nothing about your domain, so it answers with "host unknown" and the 2nd is never queried. You can exchange the order (or remove the 1st one) to make it work Regards |
Makes sense. Thanks.
Btw. Is there a (config) option to query the secondary dns when the first answers with "host unknown"? The 10.0.0.53 ns is on a vpn and I don't want all name lookups broadcasting on the vpn. That link is slower than the isp's. |
Hi,
I'm afraid there is no such option. You can use the hosts file in every host of your network to bypass queries for your domain, but for a large network it's a pain to keep it updated. Regards |
Hmmm :(
Twould be convenient to have such an option. How about a local DNS slave? Is it possible that a slave defines its own forward servers? |
It can be done.
You can setup a name server as a slave for one or more domains and forwarding for the rest. But as I've already told you, you can put 10.0.0.53 first in /etc/resolv.conf. This way it can resolve your domain and query upstream name servers for the rest |
Quote:
As I've told, 10.0.0.53 resides on a slow network link. Therefore (upstream name server) lookups are slow. I'd rather query upstream name servers via the ISP link which is much faster. |
All times are GMT -5. The time now is 08:19 PM. |