<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'> Thanks a lot.<br> <BR><div>> To: houguanghua@hotmail.com<br>> CC: bind-users@isc.org<br>> From: marka@isc.org<br>> Subject: Re: Does bind read /etc/hosts?<br>> Date: Wed, 16 Jul 2014 11:33:00 +1000<br>> <br>> <br>> In message <BAY173-W26F0D751D9E56FFDA14B15BBF70@phx.gbl>, houguanghua writes:<br>> > Sorry for what I said isn't very clear. I did know when the /etc/hosts is <br>> > accessed in the OS.<br>> > What I want to know is whether the named access the hosts file.<br>> <br>>       And I gave you a clear, unequivicable "No".  Named does not<br>>     read /etc/hosts.<br>> <br>>   Mark<br>> <br>> > The <br>> > /etc/hosts file isn't in the client's system, but in the system of Local <br>> > DNS server where the 'named' task runs. For example:<br>> >       In the /etc/hosts file of Local DNS server(LDNS), one line exists <br>> > as follows:<br>> >           10.10.10.1     www.google.com   <br>> >      A client querys this LDNS to get the IP of 'www.google.com' (the <br>> > client may use dig,nslookup command. No host line is configured in <br>> > /etc/hosts of this client ), what IP will be returned to the client?  Can <br>> > the LDNS  return 10.10.10.1 defined in the /etc/hosts to the client?  <br>> > maybe some special configuration in named can support this feature.<br>> >  <br>> > Thanks,<br>> > Guanghua<br>> >  <br>> > > To: houguanghua@hotmail.com<br>> > > CC: bind-users@isc.org<br>> > > From: marka@isc.org<br>> > > Subject: Re: Does bind read /etc/hosts?<br>> > > Date: Tue, 15 Jul 2014 20:38:12 +1000<br>> > > <br>> > > <br>> > > In message <BAY173-W11D824E324939A1BB89852BBF60@phx.gbl>, houguanghua <br>> > writes:<br>> > > > Dear sir/madam,<br>> > > >  <br>> > > > Before Bind consults authority NS, does it access /etc/hosts?  In my <br>> > > > testing,  it does not even seem to access /etc/hosts. But someone <br>> > tells <br>> > > > me Bind can access /etc/hosts first. Can you pls tell me how to <br>> > config <br>> > > > Bind to access /etc/hosts fist?<br>> > > >  <br>> > > > Thanks,<br>> > > > Guanghua<br>> > > <br>> > > No.<br>> > > <br>> > > getaddrinfo, gethostbyname etc. however may access /etc/hosts, NIS,<br>> > > mDNS, DNS and other databases.  You need to read the documentation<br>> > > that comes with your system for how to control these.<br>> > > <br>> > > Mark<br>> > > -- <br>> > > Mark Andrews, ISC<br>> > > 1 Seymour St., Dundas Valley, NSW 2117, Australia<br>> > > PHONE: +61 2 9871 4742                 INTERNET: marka@isc.org<br>> >                                     <br>> <br>> -- <br>> Mark Andrews, ISC<br>> 1 Seymour St., Dundas Valley, NSW 2117, Australia<br>> PHONE: +61 2 9871 4742                 INTERNET: marka@isc.org<br></div>                                    </div></body>
</html>