hosts file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the purpose of hosts file?
It looks like it is optional.
What are the advantages of putting IP addresses into hosts ?
 
It serves the same function as simple DNS - resolves host names to IP
addresses. By default your computer will try to resolve host names through
its hosts file (if any) before contacting a DNS server. Typical uses would
include resolving lan host names where there is no DNS server configured or
where DNS returns a wrong or unusable address - eg. using a lan machine to
connect to a local Web server by its local IP instead of the public IP
returned by a DNS server.

Doug Sherman
MCSE Win2k/NT4.0, MCSA, MCP+I, MVP
 
Hi
The host file is optional, the advantage would be the host file is
cached in the DNScache when the dns client is started. When a request for
a name that is in cache is made, there is no DNS query for the name, making
name resolution seamless. Also, could be you need to get to a name that
is not in DNS or possibly is in DNS but you need to access it via a
different IP address. In that case you could also use the HOST file. In
general, most people don't use them.

Thank you,

Alan Wood[MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
 
The hosts file is used for manual/static name resolution
for IP-based network clients.

It IS optional, and usually only used for very small
networks or for specific needs.

When a network machine needs to communicate with other
networked machines it must resolve the computer/resource
name (say www.microsoft.com) to an IP address.

Hosts files provide this functionality by statically
mapping a computer name to an ip address in the form of <IP
ADDRESS> <SPACE> <RESOURCE NAME>

The default name resolution service on a machine will look
up the name in this file to get the corresponding IP address.

As you can imagine, having the entire internet worth of
domain names in a hosts file would be HUGE, and parsing it
would become very slow.Also if an IP address changes, all
those MANUAL hosts entries have to be updated.

Microsoft initially developed WINS (Windows Internet Naming
System) as a dynamically updating name resolution service
for Windows-based computers. They developed this in direct
competition to the existing X.500 standard utilized in the
UNIX world. (actually X.500 does much more)

The pitfall to WINS is it's incompatibility with
non-Windows machines. Also, it uses RPC by default, which
is not routed across most routers as it was intended as a
LAN/single-segment solution.

Fast forward from 1988 to 1998 and we find MS delivering a
Better, Faster, Stronger Name Resolution Service in the
form of Dynamic Domain Name Service (DDNS). DDNS is mostly
MS's name for their implementation of the X.500 standard.

Make sense? Please reply to newsgroup for clarification.
 
Thank you everybody for the most comprehensive consultation.
From what you said, In my case of home network of three computers, I should
make it work marginally faster as it tries to read hosts anyway.
 
Back
Top