Home Up Contents

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           localhost    myntdomsvr   myntdomsvr.mydomname.dom    wrkstation1    wrkstation1.mydomname.dom    wrkstation2    wrkstation2.mydomname.dom    wrkstation3    wrkstation3.mydomname.dom

hosts example annotated           localhost

The local loopback address: "Here's looking at yourself kid".    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, the NetBIOS name (ping myntdomsvr), or the FQDN (ping myntdomsvr.mydomname.dom).    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.    wrkstation2    wrkstation2.mydomname.dom    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