CL Command Reference - NSLOOKUP
CL Command List > NSLOOKUP Reference
Description:
Start DNS Query (STRDNSQRY), and its alias NSLOOKUP, start the NSLookup (Name Server Lookup) tool.
NSLookup is an interactive query tool that allows you to retrieve information from, or test the response of a DNS server. You can verify that a DNS server is responding correctly before you configure your system to use it. You can also retrieve DNS information about hosts, domains, and DNS servers.
Note: NSLookup asks for (queries) information from DNS servers. To begin a NSLookup query session, an active DNS server must be designated the ¡¯default¡¯ server for the query session. The default server is the DNS server that NSLookup sends all queries to unless you tell it otherwise. All references in the following help to ¡¯the default server¡¯, or ¡¯the default DNS server¡¯, refer only to the default DNS server for the current NSLookup query session.
NSLookup retrieves information from DNS servers. It needs an active DNS server to send its queries to. If you do not specify a DNS server with DMNAMSVR when you start the tool, it will attempt to set one of the following as its default DNS server for the session: 1. The DNS server your system is configured to use, or 2. The DNS server that is running on your local system.
If neither of these conditions exist, NSLookup will not be able to retrieve any information until you specify a DNS server to query. DMNNAMSVR allows you to start the query session and set the DNS server of your choice as the default server for the session.
There are two parameters for this command:
1. HOSTNAME
2. DMNNAMSVR
These parameters are used with STRDNSQRY to specify a default DNS server for the query session or, to request information about a specific host on session start up. Help for these parameters follows the list of session subcommands.
Following is a list of NSLookup subcommands that can be used once the query session is started.
NAME
Show the IP address of the host NAME. Substitute a host name for NAME. The current or ¡¯default¡¯ DNS server is queried.
NAME1 NAME2
Show the IP address of the host NAME (NAME1), but query NAME2 for the information instead of the current (default) DNS server (where NAME2 is name of a DNS server).
Allows you to direct the query to a DNS server other than the current or ¡¯default¡¯ DNS server for the query session.
help (or ?)
Displays a list of subcommands for the STRDNSQRY (NSLOOKUP) tool.
server NAME
Change the default (current) DNS server to NAME (where NAME is the name of a DNS server), using the current (default) DNS server.
lserver NAME
Change the default (current) DNS server to NAME (where NAME is the name of a DNS server), using the initial default DNS server.
Useful if you switched default DNS servers during your query session, and the current DNS server cannot resolve the new DNS server name. lserver allows you to make the switch using your initial default DNS server instead of the current one. If the initial DNS server also cannot resolve the new DNS name, substitute the IP address for the name, if you know it. If you do not know the IP address for the new DNS server, try restarting the NSLookup session using the DMNNAMSVR parameter to specify the new DNS server as the default server for the query session.
root
Makes the root DNS server the default DNS server for the query session. The root DNS server is defined by the ¡¯set root=NAME¡¯ option.
Examples:
STRDNSQRY HOSTNAME(¡¯9.12.234.14¡¯) DMNNAMSVR(*CFG)
This command starts a DNS query using the host located at IP address 9.12.234.14 and the DNS server that is currently designated for use by this system.