Home Up Contents

hosts
lmhosts hosts

 

hosts file

Remember: the hosts file is the static equivalent of a DNS (Domain Name Server) and equates the IP address with the FQDN (Fully Qualified Domain Name), and/or the NetBIOS name, and/or any other chosen aliases, for IP commands and services such http, ftp, ping, nntp, etc. It is always recommend when using static IP addresses and no DNS server.

Like the lmhosts file, hosts is placed in the \windows folder for Windows for Workgroups 3.11, Windows 95/98 systems and placed in the \winnt\system32\drivers\etc folder for Windows NT systems. It must not have a file extension such as ".txt". It is named just plain "hosts". Place a copy on every system.

hosts example

127.0.0.1           localhost
192.168.12.1    myntdomsvr   myntdomsvr.mydomname.dom
192.168.12.2    wrkstation1    wrkstation1.mydomname.dom
192.168.12.3    wrkstation2    wrkstation2.mydomname.dom
192.168.12.4    wrkstation3    wrkstation3.mydomname.dom

hosts example annotated

127.0.0.1           localhost

The local loopback address: "Here's looking at yourself kid".

192.168.12.1    myntdomsvr   myntdomsvr.mydomname.dom

The IP address is equated to the NetBIOS name and an FQDN. The .dom extension is just an example that demonstrates our freedom of choice when the particular subnet is not directly connected to the Internet. We can now ping this machine using either the IP address (ping 192.168.12.1), the NetBIOS name (ping myntdomsvr), or the FQDN (ping myntdomsvr.mydomname.dom).

192.168.12.2    wrkstation1    wrkstation1.mydomname.dom

See above. The distinctions maintained in the lmhosts file for NT domain controllers are not applicable; nor are the lmhosts flags #PRE and #DOM valid.

192.168.12.3    wrkstation2    wrkstation2.mydomname.dom

192.168.12.4    wrkstation3    wrkstation3.mydomname.dom

Important! You don't see it here but be sure to hit "enter" after typing in the last entry as the file must terminate with a carriage return.

 

 

 
contact tcg
Last modified: January 16, 2002