MCSE Boot Camp by MCSE Camp MCSE $3750,CCNA $1500
MCSE Boot Camp by MCSE Camp 98% Success Ratio           
MCSE Boot Camp by MCSE Camp Boot Camp Since 1999
      

Get Certify Get Ahead

MCSE Boot Camp Schedule Schedule  MCSE Boot Camp FAQ FAQ  MCSE Boot Camp Vibrant Why Vibrant   MCSE Boot Camp location Location                                                                                                                                                   

Leading MCSE, CCNA, CCNP Certification boot camp training provider in India, USA, UK.

 

[Contents] [Back] [<< Prev] [Next >>]

The LMHOSTS File

Microsoft has been building network operating systems for a long time. Before Windows NT, Microsoft put out a product called LAN Manager. LAN Manager was based internally on NetBIOS and used NetBEUI as a protocol, which you may recall has one major problem—it cannot be routed from network to network. Microsoft choose NetBEUI in the first place because the NetBEUI protocol was compatible with the NetBIOS networking model that they were using.

To make LAN Manager more acceptable as a network operating system, Microsoft included TCP/IP as an alternate protocol for medium-to-large organizations wanting to use their product (which was based on Microsoft OS/2 version 1.3). But there was a problem: How do you resolve NetBIOS names using TCP/IP on a routed network? On the local network, the system could use the NetBIOS Name Service port and broadcast a request for the local name.


[note.gif]

Windows NT only checks the LMHOSTS file if a broadcast on the local network fails to resolve the address.

The solution was relatively easy: create a list of the systems to which the computer would have to talk. Given peer-to-peer networking had not become in vogue, only a limited number existed, anyway. In this file, you could put the IP address and the NetBIOS name of an systems you need to talk to. It was an obvious solution that does work. However, in some situations, the client would not be talking to a single machine, but rather searching for any machine with a particular service (the Netlogon service is a good example).

The list is the file LMHOSTS (no extension), which is located in the \%winroot%\system32\drivers\etc directory. A sample LMHOSTS file also was added during installation; this file is called lmhosts.sam. (If you use Notepad to create or edit the file, ensure that the file is saved as text and not as Unicode.)


[note.gif]

All the hosts on the Internet used to be listed in a single file at Stanford Research Institute’s Network Information Center (SRI-NIC.) Whenever you tried to connect to another host, your system had to consult this file on the SRI-NIC server to find the IP address. The file was called hosts.txt.

The solution to the problem of finding a system running a particular service (such as Netlogon) rather than a particular computer was solved by including tags. Microsoft introduced several tags that enabled systems to send a request to all the computers that had a particular service running (for example, the #DOM tag tells your system that a particular system should be running the Netlogon service).

The result was a system that could communicate across routers even though it internally used NetBIOS. A workable compromise —sort of. As time went on, the amount of time that was spent updating the LMHOSTS file increased. In addition, because this file needs to be located on every host, the task became even more difficult.

Tags were a good solution once, and again proved to be able to resolve the issue. Microsoft added new tags that enabled computers to read a central LMHOSTS file. The client computer still needed a local LMHOSTS file so the system would know where and how to find the central one, however; this reduced the required number of lines from 70 or 80 or more, to 5 or 6.

Windows NT supports and uses several tags. Table 7.2 describes the tags available.


[note.gif]

The LMHOSTS file is scanned from top to bottom. Therefore, your most frequently used servers should be listed first. Any entries to preload a server address should be at the bottom because they will already be in the NetBIOS Name Cache.

The following is an example of what an LMHOSTS file might contain:

152.42.35.2 victoria1 #DOM:MYCORP #PRE
152.42.9.255 london2 #DOM:MYCORP
152.42.160.45 ottawa8 #PRE
152.42.97.56 houston4 #PRE
#INCLUDE \\victoria1\INFO\LMHOSTS
#BEGIN_ALTERNATE
#INCLUDE \\ottawa8\INFO\LMHOSTS
#INCLUDE \\houston4\INFO\LMHOSTS
#END_ALTERNATE
152.42.193.5 capetown4 #PRE #DOM:MYCORP
152.42.194.255 capetown8 #PRE #DOM:MYCORP


[note.gif]

Use nbtstat -R to flush the NetBIOS Name Cache and reload from the LMHOSTS file. This enables you to test an LMHOSTS file as you create it.

Of course, nothing in this world is perfect, so you need to keep the following facts in mind when using the LMHOSTS file:
  • If the IP address is wrong, then your system resolves the address. However, you cannot connect. Normally this shows up as a “Network Name not Found” error.
  • Windows NT is good; however, if the NetBIOS name is spelled wrong in the LMHOSTS file, Windows NT can do nothing to resolve it. (Note the names are not case sensitive.)
  • If the LMHOSTS file has multiple entries, the address for the first one is returned. If that entry is wrong, the result is the same as have a wrong IP address.
Only one registry entry affects LMHOSTS; however, you can easily change the entry in the Network Settings dialog box. The entry is Enable LMHOSTS, and if it is not selected, the system ignores the LMHOSTS file. This is selected by default in Windows NT and Windows 95, but deselected in Windows for Workgroups.

To change the Enable LMHOSTS setting, perform the following steps:
1.Open the Network Settings dialog box.
2.Select the Protocol tab and open the Properties for TPC/IP.
3.On the WINS Addressing tab, ensure there is a check in the Enable LMHOSTS Lookup check box to turn this on. Clear the check box to turn it off.
4.Close the TCP/IP Settings dialog box and the Network Settings dialog box.
5.Restart your computer.

 Vibrant Advantage :

MICROSOFT Training PartnerMCSE Camp No Prestudy
MCSE Camp Longest Duration Camp
MCSE Camp Chalk Talk TrainingRed Hat Training Partner
MCSE Camp Highest Passing Rate
MCSE Camp Bootcamp since 1999
MCSE Camp Guaranteed Certification ...

Testimonials :

MCSE Certification boot camp

The instructor taught real world experience and did not just teach us to pass the test. He knew the subject well and was encouraging. His lectures were very well delivered....

Colver Dennis, USA 

 | MCSE Boot Camp India | MCSE Camp UKMCSE CampMCSE Camp USAMCSE Camp|MCSE CampIndia InformationMCSE Camp|MCSE CampCard PaymentMCSE Camp|MCSE CampSite MapMCSE Camp|MCSE CampContactMCSE Camp|MCSE CampHomeMCSE Camp ref1 | Ref2 | RHCE | RHCT | Redhat | RHCE / RHCT | RHCE Boot Camp
© Copyright 2007 MCSE Camp