Jeff Chan wrote:

>On Thursday, April 21, 2005, 5:12:37 AM, Mike Grice wrote:
>  
>
>>why would SA
>>time it out?  The system should use the hostfile in preference to DNS
>>(e.g., in nsswitch.conf), but for some bizarre reason this lookup isn't.
>>    
>>
>
>BIND does the forwarding to rbldnsd.
>
>Jeff C.
>  
>

Or, more to the point, BIND does the forwarding, thus BIND must know
about this resolution.

If you were just resolving dnsbl-sorbs-net.dnsbl.plus.net, the system
would resolve it as 127.0.0.2 without calling BIND.

However, in reality you are not looking up
dnsbl-sorbs-net.dnsbl.plus.net, you are looking up
1.2.3.4.dnsbl-sorbs-net.dnsbl.plus.net. That host isn't in your hosts
file, and will require the system to ask BIND.

Once BIND gets the query, it is not going to go back and ask the system
any questions, such as where to find .net, it's going to resolve it
entirely itself, without any input from /etc/hosts.

That's why you need it in named.conf. /etc/hosts does take precedence,
but only when it can completely answer the question. Hosts.conf will
never act to over-ride part of a query for named.

Besides, even if named did such a thing, hosts is only used as a
replacement A and PTR records.. But named isn't asking for A or PTR
records for the intermediate names, it's going to be asking for NS records.

ie: when trying to resolve www.evi-inc.com, BIND does not ask a TLD
server for the A record for .com, it asks for the NS record for .com,
then asks that for the NS record for evi-inc.com, then finally asks my
nameserver for the A record of www.evi-inc.com.



Reply via email to