Inside Windows Server 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Inside Windows Server 1002003 [Electronic resources] - نسخه متنی

Addison Wesley

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









Resolving NetBIOS Names Using Lmhosts


In the early days of NetBIOS, Microsoft borrowed an idea from UNIX for resolving host names using a static lookup file. UNIX hosts were resolved using a Hosts file, and because the Microsoft team was working on OS/2 LAN Manager at the time, the NetBIOS name lookup table was called Lmhosts. Neither filename has an extension.


TCP/IP-Related File Locations


The \Windows\System32\Drivers\etc folder holds a sample Lmhosts file called Lmhosts.sam. You can either rename this file to Lmhosts and modify the contents or you can create a new file called Lmhosts.

The directory holding Lmhosts is defined by the following Registry entry:














Key:


HKLM | SYSTEM | CurrentControlSet | Services | Tcpip | Parameters


Value:


DataBasePath

The \Windows\System32\Drivers\etc directory holds these other TCP/IP-related files:


  • Hosts.
    Used to provide TCP/IP host name lookups.


  • Services.
    Contains well-known TCP and UDP ports and their uses.


  • Protocol.
    Contains the list of IP protocols used on the computer in accordance with RFC 1060.


  • Networks.
    Contains a quick lookup of network names and their corresponding gateway IP addresses.


  • Quotes.
    Supports the ever-popular Quote of the Day protocol. The default entries lean rather heavily on George Bernard Shaw and Charles Dickens, but you're free to add more.


Configuring Lmhosts


The idea behind Lmhosts is to have a place where Netbt.sys can resolve a name without broadcasting. The file is a plain ASCII text file consisting of IP addresses and host names. Here is an example listing three servers, two of which are domain controllers in a domain called COMPANY:


# Lmhosts file for Domain COMPANY
10.1.1.10 DC01 #PRE #DOM:COMPANY
10.1.1.20 DC02 #PRE #DOM:COMPANY
10.1.1.30 PRO3 #PRE
10.1.1.100 PRO4 #PRE
#BEGIN_ALTERNATE
#INCLUDE \\PRO3\PUBLIC\ETC\Lmhosts
#INCLUDE \\DC02\PUBLIC\ETC\Lmhosts
#END_ALTERNATE

The pound sign (#) has two functions:


  • Precedes a standard Lmhosts parameter such as #PRE, #DOM, and #INCLUDE


  • If not followed by a recognized parameter, indicates a remark, such as that used in the first line



Here are the standard Lmhosts parameters. The name must be uppercase, otherwise the entry is considered a remark:


  • #PRE .
    This parameter tells the system to load the associated entry into the NetBIOS name cache at boot time. This speeds up initial name lookups.


  • #DOM .
    This parameter flags the entry as a domain controller with the name after the colon being the domain name. If you use Lmhosts in a domain environment, this switch is a necessity because it tells the local client where to go to get authenticated.


  • #INCLUDE .
    Tells Tcpip.sys to load the Lmhosts file from another computer. The #INCLUDE option enables you to maintain a single, central Lmhosts file that can be referenced by other workstations in a workgroup. The entry uses a UNC name, such as \\SRV1\Public, where Public is a share name. There is a subtle Catch-22 at work here. The UNC path contains a NetBIOS name, so you must make sure the local Lmhosts file has an entry for that name.


  • #BEGIN_ALTERNATE and

    #END_ALTERNATE .
    Use these statements to bracket multiple entries under a single #INCLUDE statement. If you have only one #INCLUDE statement, you do not need bracketing statements.



Using Lmhosts


Lmhosts

/ 245