DNS and Hostnames
Trying to remember many IP addresses is nearly impossible for anyone, especially with the growth of the Internet during the past 10 years. Hostnames make everyone’s life easier by giving an IP address a memorable name. After all, remembering microsoft.com is much easier than remembering 207.46.130.149.
Originally, in the dark days of the Internet and TCP/IP, hostname
resolution was left to a single text file, called the HOSTS file. Hostnames were manually added to
this file, and then the file was downloaded and distributed to each
TCP/IP host. HOSTS files work
fine and are manageable if your network is small. HOSTS files in Windows NT and Windows 2000
are stored in the %systemroot%\SYSTEM32\DRIVERS\ETC directory.
Example 1.1 shows a sample HOSTS
file.
Example 1-1. Sample HOSTS File
# Copyright (c) 1994 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Chicago # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost 192.168.0.l cg141484-a 192.168.0.254 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access