O'Reilly logo

Special Edition Using Microsoft Active Directory by James Hudson, Sean Fullerton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The hosts File

A hosts file provides similar functionality to lmhosts. This static text file also must be in \winnt\system32\drivers\etc. Although its syntax is similar to lmhosts, it is used to map hostnames, whereas lmhosts is used to map NetBIOS names. A sample hosts file appears in Listing 8.3.

Code Listing 8.3. Using a hosts File to Map DNS Names to IP Addresses
C:\WINNT\system32\drivers\etc>type hosts
192.168.2.200   server11.fis.local server11 dc
192.168.2.199   server12.fis.local server12

Tip

Make sure your text editor is not automatically appending a file extension to either the lmhosts or hosts file. If, for example, Notepad saves your hosts file as hosts.txt, it will not function.

ipconfig

Notice from the lines of the hosts file in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required