NBLookup.exe command-line tool
On This PageSUMMARY NBLookup is a command line diagnostic tool that uses the
User Datagram Protocol (UDP) to send NetBIOS name queries to Microsoft Windows
Internet Naming Service (WINS) servers. NBLookup requires TCP/IP version 4 to
run. WINS servers accept name resolution requests on UDP port 137.
NBLookup runs on the following operating systems:
The following file is available for download from the Microsoft Download Center: Download
the NBLookupV1.exe package now. (http://download.microsoft.com/download/f/3/a/f3adc5b4-2716-4ef3-bbb8-f4cd4446d415/nblookupv1.exe)For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591 (http://support.microsoft.com/kb/119591/) How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
NBLookup can be run in command-line mode, in interactive mode, and in query list mode. The following table contains the correct syntax for each mode.
Command-Line ModeYou can use Command Line mode to send a single NetBIOS name query to a single WINS server. After the response appears, the program ends. The following table contains the possible return values for this query.
These return values can be useful in scripts. To exit NBLookup before it has completed in command-line mode, press CTRL+C. Command-Line Mode OptionsCommand line mode uses the following syntax:nblookup [-options]
NetBIOS_Name_to_Query NetBIOS_Name_to_Query must be a valid
NetBIOS name that has a maximum of 15 alphanumeric characters. This NetBIOS
name cannot contain period (.) characters (dots) or any special characters such
as ampersands (&) or percent signs (%).The following table contains descriptions of the options that you can use with NBLookup in command-line mode.
Command-Line Mode ExamplesThe following example queries WINS server 169.254.1.10 for the File Server service that computer1 has registered:nblookup /s 169.254.1.10 computer1 The following example queries the WINS server that is named WINS1
for the domain controllers that are registered in the domain that is named
DOMAIN1:nblookup /s WINS1 /x 1C DOMAIN1 Interactive ModeThis mode is similar to the interactive mode of the NSLookup tool.NBLookup starts a command shell that accepts a limited number of commands and parameter settings. You can use this mode to troubleshoot issues that require you to send the same queries repeatedly, although each repetition may use different parameter settings. To exit NBLookup before it has completed in interactive mode, type quit or exit, and then press ENTER. The program exits the command shell and the program ends. Interactive Mode OptionsInteractive mode uses the following syntax:nblookup [-options] The following table lists the options that are available in
interactive mode.
You can use the set OPTION=value option to set specified option values for NBLookup. The following table describes the option values that you can set by using the set option.
To view a list of query types that you can use with the set suffix=x option, type nblookup /suffix_help at a command prompt, and then press ENTER, or type shelp from within NBLookup. Interactive Mode ExamplesTo use NBLookup in interactive mode, type the following command at a command prompt, and then press ENTER:path\NBLookup.exe Note In this example, path is the path of the NBLookup.exe file on your computer.The greater-than (>) sign appears in the NBLookup interface as a prompt. To run any of the following commands, type the command at the > prompt, and then press ENTER:
Query List ModeQuery list mode uses the following syntax:nblookup -ql input_file [-qr
report_file] Query List Mode uses an input file to specify the parameters of
WINS queries. Query List Mode OptionsThe following table lists the options that are available in query list mode.
Query List Mode ExamplesThe following command builds a sample input file that is named In-nblookup.txt:nblookup /ql The following command runs queries that are specified in the input
file that is named In-nblookup.txt. The command then creates a report that is
named Myreport.htm:nblookup /ql in-nblookup.txt /qr myreport Input FileAfter you have identified all the WINS servers and all the WINS records that are important in your environment, you can write your own customized NBLookup input files. You can then use these customized files with NBLookup and DNSLint to help you with administration, ongoing maintenance, and troubleshooting.DNSLint is a tool for DNS troubleshooting. DNSLint also has a /ql (Query List) option. You can use NBLookup and DNSLint to quickly collect information about WINS and DNS records that are important in your environment. NBLookup verifies the specified input file before using its contents to send WINS queries. NBLookup verifies the specified IP addresses to make sure that they are valid. NBLookup also verifies the validity of each field on each line. Comments that start with a semicolon (;) are ignored. Comments that start with a plus sign (+) are printed in the report. Typically, these comments are small (less than 500 characters). After NBLookup has verified the input file, it starts to send the WINS queries that are listed in the input file to the WINS servers that are specified in the input file. If a destination WINS server does not respond to a query, NBLookup retries the query. If the WINS server does not respond again, NBLookup bypasses any other queries that are specified in the input file for that WINS server. This behavior avoids the delay that occurs if many WINS queries are sent to a server that is not responding. For example, if two queries to a WINS server time out two times, NBLookup does not send any other queries that are listed in the input file to that WINS server. Input File FormatThe input file has the following format:The following table describes the elements of this input file.
Query FormatThe queries in the input file use the following syntax:mydomain,1b The first field in the line is the NetBIOS name to query. In this
example, the name is mydomain. A comma must follow the NetBIOS name. No spaces
are permitted on either side of the comma.The second field follows the comma that appears immediately after the NetBIOS name to query. The second field is the type of record or the NetBIOS suffix (the 16th character) to query for. (For more information about common valid types, see the "Common Valid Record Types" table that appears later in this section.) If the suffix that is specified is the asterisk character (*), NBLookup queries for the specified name by using the 00, the 20, and the 03 records in one command. A comma always follows the type of record. No spaces are permitted on either side of the comma. You may use an optional third field to turn recursion on or off. This field immediately follows the comma that appears after the second field. By default, recursion is on. To turn off recursion, append ,nr after the query type. Nothing follows the third field. The first two fields are required and no spaces are permitted in the query line. Note You can view the list of common valid record types by running one of the following commands:
Common Valid Record Types
NBLookup Comment TypesNBLookup supports two types of comments that use two different symbols:
The sample input file In-nblookup.txt is generated in the local
directory. If the file already exists, NBLookup prompts you for permission to
overwrite it.To process the input file, run the following command at a command prompt: nblookup /ql input.txt NBLookup Usage ExamplesIf you verify a specified set of WINS records on multiple WINS servers, this information can help you to diagnose and to fix problems that missing or incorrect WINS records may have caused.For example, if clients are experiencing problems when they try to log on to the domain, verify that the 1C records that the clients use to find domain controllers are available and are accurate. This information can help you determine if WINS is a cause of the problem. Also, if you receive reports that users are having problems browsing the network by using NetBIOS browsing through Windows Explorer, this tool quickly verifies all the 1B records that are involved with NetBIOS browsing on the network on all the WINS servers that are supposed to have these records. Therefore, you can quickly determine if missing or incorrect WINS records may be related to the problem. In another case, some users may be experiencing problems when they try to gain access to shares on servers by using the servers' names. However, the users can gain access to the shares by using the IP addresses. To determine whether name resolution is the problem, or to rule out name resolution as a possible cause, you must verify all the related WINS records on all the WINS servers that are used to resolve a server's name. The /ql (Query List) option that permits NBLookup to read instructions from the specified text file provides this functionality. After NBLookup has verified that the file is a valid NBLookup input file, it runs the queries that are specified in the file and then returns the results in an easy-to-read HTML report. Administrators can customize this input file to specify the WINS servers to query and to specify the WINS records to look for on each server. REFERENCES For additional
information about the DNSLint tool, click the following article numbers to view
the articles in the Microsoft Knowledge Base: 321045 (http://support.microsoft.com/kb/321045/)
Description of the DNSLint Utility
330105 (http://support.microsoft.com/kb/330105/) How to verify large numbers of DNS records by using DNSLint
APPLIES TO
| Article Translations
|


Back to the top
