NetAdminTools.com
 
Categories:
GNU/Linux | Homebrew designs | Perl | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS | Hail Support


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·REALbasic
·All Categories


Using the LMHOSTS file to backup WINS
Topic: Name Resolution   Posted:1997-09-12
Printer Friendly: Print

spacer
In addition to resolving NetBIOS names for small networks, the LMHOSTS file can be used to back up WINS. Since the cached entries are referred to first, you can manually reset the cache of a corrupt or missing domain by reloading the entries in the LMHOSTS file.

Make sure your system has the LMHOSTS checked on the WINS tab and has been restarted:

Even if the LMHOSTS file doesn't exist, we can still get name resolution working.

Let's say we create an lmhosts file using the #PRE to load the values without any expiration time into the NBT cache.

D:\WINNT\system32\drivers\etc>type lmhosts
10.10.10.10SAMPLEHOST#PRE #DOM: SAMPLEDOMAIN
D:\WINNT\system32\drivers\etc>nbtstat -c
No names in cache

Nbtstat -c lists the names in the cache. There are no entries, because the lmhosts file didn't exist at bootup and no new connections have been cached temporarily. This is pretty slick, because you don't have to do any extra configuration until later. Let's reload the cache with the nbtstat -R command.

D:\WINNT\system32\drivers\etc>nbtstat -R
Successful purge and preload of the NBT Remote Cache Name Table.
D:\WINNT\system32\drivers\etc>nbtstat -c
Node IpAddress: [10.50.100.1] Scope Id: []

NetBIOS Remote Cache Name Table 
Name  Type  Host Address  Life (sec) 
SAMPLEHOST <03> UNIQUE 10.10.10.10 -1 
SAMPLEHOST <00> UNIQUE 10.10.10.10 -1 
SAMPLEHOST <20> UNIQUE 10.10.10.10 -1 

D:\WINNT\system32\drivers\etc>ping samplehost
Pinging samplehost [10.10.10.10] with 32 bytes of data:
Request timed out.
Request timed out.
^C

We have entered permanent cache entries for SAMPLEHOST. These entries will take priority over WINS, broadcasts, or DNS. If there are missing entries in your WINS database, or your WINS server is unavailable, you can force the correct entries into the cache with this method. You could keep this entry and add other key servers, or you could delete it when your WINS server is running again if you are concerned about maintaining LMHOSTS files.





Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 NetAdminTools.com