Derek wrote:
>
> While browsing the web usually see "resolving host: www.somehost.com"
> in the status line of the browser. It takes about 5 seconds before
> things get sorted out. The pause is annoying and doesn't happen with
> my windows machines that exist on the same network.
>
> Here is my resolv.conf file:
> domain grandprixsw.com
> search f1.grandprixsw.com #grandprixsw.com
> nameserver 10.0.0.1
> nameserver 4.2.2.2
> nameserver 24.52.223.218
>
> 10.0.0.1 is my local DNS on a Win2k server. the other two nameservers
> are supplied by my ISP.
>
> If I move 10.0.0.1 down to become the second listed nameserver then
> none of my local machines are ever resolved. But I get slightly better
> name resolution performance for hosts outside of my local network.
> That said it still sometimes pauses for 5 seconds or so when looking
> up a name.
>
> What have I goofed up on in my nameserver configuration? If anyone can
> point to a decent link explaining the best way to configure for
> resolving both internal and external hosts quickly I'd really
> appreciate it.
It's hard to tell exactly what's happing without knowing exactly what
your Windows DNS server does.
This setup definitely isn't correct. All the servers you list in
resolv.conf are supposed to give the same answers to all queries and
it's clear at least that your Windows server answers for your local
names and your ISP ones do not. Also you should not have both "domain"
and "search". Remove "domain" and put both on the "search" entry.
What is not clear is what your Windows server does when sent a query for
a name which isn't yours. Does it just not answer? This would explain
the behaviour you describe. If this is the case, then the difference
between Windows and Linux is explained by the strange non standard way
the Windows resolver works. It sends queries to all nameservers it knows
about simultaneously. The Linux resolver follows the standards and
starts with the first, moving on to the second if it gets no response.
You could fix your Windows server to resolve Internet names properly.
But this still would not make your configuration correct, as you would
still have nameservers in the list which gave different responses.
If you are using DNS locally with domains which do not exist on the
Internet then you should *only* have your own servers listed in
resolv.conf. You should set them up so that they resolve both your
domains and the Internet.
With bind on Linux there are three ways to do this. You either use the
"forwarders" and "forward only" options to refer all external queries to
your ISP's nameservers, or you have a zone called "." of type "hint"
which lists the root nameservers and do it all yourself. Or you can have
a hybrid with "forward first" which will ask your ISP first then try
itself if it doesn't get an answer. Which is best probably depends on
which is fastest and this depends on how good your ISP's servers are.
Either way you put your local information in local zones. These will
always be used in preference to the forwarders even if "forward only" is
specified (which perhaps isn't obvious).
It's normally recommended to have at least two nameservers on a LAN, one
being the master and one the slave for your local domains. If the LAN is
very small one is probably enough.
Regards, Ian
|