On Thu, Jan 03, 2002 at 10:46:25PM -0600, Julian Opificius wrote:
> That much I knew ... it's a data file containing links between IPs and
> friendly names. But who uses it?
It's used in small networks. It's also used as a "shim" to fix bad DNS
responses. A good example--a friend of mine has DSL service from DirecTV.
I just moved to DirecTV, and found I suddenly can't send mail to him.
Some poking with 'nslookup' and 'dig' showed that one of DirecTV's own
DNS servers is returning a bad IP address for his domain. Until they
figure out what's broken, I've just entered his domain and correct IP
address in my server's local hosts file. Voila!
> Right, but somebody uses the info in /etc/hosts, don't they?
Wrong, as I said--it DOES resolve named-to-address, just as does DNS.
The order in which the resolver routines that actually USE lookup services
consult these sources is controlled by /etc/host.conf, which is usually
set to use the local hosts file first.
> I thought (don't ask me where I got this idea) that bind (ie.named) looked
> in /etc/hosts first before going to an upstream DNS server.
This is usually true because of the default ordering in /etc/host.conf
> Don't know what you mean by that. Is the "hosts" file only looked at
> by the machine upon which it resides, then?
Said elsewhere, but it doesn't hurt to reinforce--yes, this is true.
> So who is it that looks at /etc/hosts then?
> Help me out here ...
Do a 'man -k resolv'. Look at all the man pages that are mumbling about
"resolver routines".
> There's the DNS service, ...
You have this essentially correct. The only misconception I see--and the
earlier poster also seems to be carrying this--is that the resolver is NOT
the DNS service. The resolver routines USE data sources to determine
address mappings--and these sources are usually only 'hosts' and 'bind'.
Note that any other name resolution scheme will be consulted, if it's
named in host.conf and honors the resolver interface.
> Who uses /etc/resolv.conf? Another daemon?
This file is used by the resolver routines to determine the order in
which DNS servers are consulted when trying to resolve a name. Do
'man 5 resolver'.
> Basically, how does a machine on the LAN get resolution to an IP
> from a friendly name for a) another machine on the LAN, and b)
> a machine somewhere out on the Internet ?
It depends. If the default /etc/host.conf configuration of "hosts,
bind" is in effect, then /etc/hosts will be consulted first, then DNS.
If the name isn't a FQDN (Fully Qualified Domain Name), and a 'search'
directive is in the /etc/resolv.conf file, that will be tacked on if
the name doesn't resolve by itself.
But in either case, the order of consultation of sources is identical.
> Maybe if you could also tell me where WINS fits into all this, that would
> help a lot too!
WINS is MicroSoft's own name resolution service. It serves, via different
mechanisms, exactly the same purpose as DNS or hosts--reconcile machine
names to addresses. Its native mode, however, is NETBIOS addressing,
not IP, although there is DNS over WINS. I believe even MicroSoft
is deprecating this as time goes on, but it'll probably never go away
totally.
Cheers,
--
Dave Ihnat
[EMAIL PROTECTED]
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list