ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/nslookup.htm

323 lines
15 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Start DNS Query (NSLOOKUP)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="NSLOOKUP.Top_Of_Page"></a>
<h2>Start DNS Query (NSLOOKUP)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>Interactive environments (*INTERACT *IPGM *IREXX *EXEC)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#NSLOOKUP.PARAMETERS.TABLE">Parameters</a><br>
<a href="#STRDNSQRY.COMMAND.EXAMPLES">Examples</a><br>
<a href="#STRDNSQRY.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="STRDNSQRY"></a>
<p>Start DNS Query (STRDNSQRY), and its alias NSLOOKUP, start the NSLookup (Name Server Lookup) tool.
</p>
<p>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.
</p>
<p>
<b>Note: </b>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.
</p>
<p>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.
</p>
<p>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.
</p>
<p>There are two parameters for this command:
</p>
<ol>
<li>HOSTNAME
</li>
<li>DMNNAMSVR
</li>
</ol>
<p>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.
</p>
<p>Following is a list of NSLookup subcommands that can be used once the query session is started.
</p>
<dl>
<dt><b>NAME</b></dt>
<dd>Show the IP address of the host NAME. Substitute a host name for NAME. The current or 'default' DNS server is queried.
</dd>
<dt><b>NAME1 NAME2</b></dt>
<dd>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).
<p>Allows you to direct the query to a DNS server other than the current or 'default' DNS server for the query session.
</p>
</dd>
<dt><b>help (or ?)</b></dt>
<dd>Displays a list of subcommands for the STRDNSQRY (NSLOOKUP) tool.
</dd>
<dt><b>server NAME</b></dt>
<dd>Change the default (current) DNS server to NAME (where NAME is the name of a DNS server), using the current (default) DNS server.
</dd>
<dt><b>lserver NAME</b></dt>
<dd>Change the default (current) DNS server to NAME (where NAME is the name of a DNS server), using the initial default DNS server.
<p>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.
</p>
</dd>
<dt><b>root</b></dt>
<dd>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.
</dd>
<dt><b>set</b></dt>
<dd>The set subcommand allows you to set values for query session options. Valid option values for the set subcommand are:
<dl>
<dt><b>set all</b></dt>
<dd>Show the current values for all of the session options. If no option values have been set, the default values for each option are shown.
</dd>
<dt><b>set debug</b></dt>
<dd>Show debugging information.
</dd>
<dt><b>set nodebug</b></dt>
<dd>Do not show debugging information.
</dd>
<dt><b>set d2</b></dt>
<dd>Show exhaustive (verbose) debugging information.
</dd>
<dt><b>set nod2</b></dt>
<dd>Do not show exhaustive (verbose) debugging information.
</dd>
<dt><b>set defname</b></dt>
<dd>Append the default domain name to each query. The default domain name is defined by the 'set domain=NAME' option.
</dd>
<dt><b>set nodefname</b></dt>
<dd>Do not append the default domain name to each query.
</dd>
<dt><b>set search</b></dt>
<dd>Use the srchlist option instead of the defname option. Uses the list of domain names defined by the 'set srchlist=N1/N2/N3...' option.
</dd>
<dt><b>set nosearch</b></dt>
<dd>Do not use the srchlist option.
</dd>
<dt><b>set recurse</b></dt>
<dd>Query other DNS servers if the default server does not have the information.
</dd>
<dt><b>set norecurse</b></dt>
<dd>Do not query other DNS servers if the default server does not have the information.
</dd>
<dt><b>set vc</b></dt>
<dd>Use TCP for queries instead of UDP.
</dd>
<dt><b>set novc</b></dt>
<dd>Do not use TCP for queries instead of UDP.
</dd>
<dt><b>set ignoretc</b></dt>
<dd>Do not retry query using TCP if UDP reply is truncated.
</dd>
<dt><b>set noignoretc</b></dt>
<dd>Retry query using TCP if UDP reply is truncated.
</dd>
<dt><b>set domain=NAME</b></dt>
<dd>Set default domain name to NAME (substitute a domain name for NAME). Defines the default domain name used by the 'set defname' option.
</dd>
<dt><b>set srchlist=N1/N2/N3...</b></dt>
<dd>Creates a list of domain names to append to each query. Each domain name in the list is appended to the query until a reply is received, or there are no more names in the list. Substitute domain names for N1, N2, N3, etc.
</dd>
<dt><b>set root=NAME</b></dt>
<dd>Set root server to NAME (substitute a DNS server name for NAME). Defines the server used by the 'root' subcommand.
</dd>
<dt><b>set retry=X</b></dt>
<dd>Set the number of retries to X (where X is a numerical value).
<p>
<b>Note: </b>The default value for number of retries is 1. The retry value works together with the timeout value, which is the time in seconds that NSLookup waits before making the first retry. Retry values are usually set to 1 or 2.
</p>
</dd>
<dt><b>set timeout=X</b></dt>
<dd>Set initial timeout interval to X seconds (where X is a numerical value).
<p>
<b>Note: </b>timeout=X determines how long NSLookup waits before making the first retry if no reply is received on the first query. The timeout value doubles after each unsuccessful retry. The default value is 5 seconds.
</p>
</dd>
<dt><b>set type=X</b></dt>
<dd>Determines the type of DNS record that the DNS server will use to answer the query. Substitute 'X' for one of the following DNS record types:
<dl>
<dt><b>A</b></dt>
<dd>IP Address record. This is the default value.
</dd>
<dt><b>ANY</b></dt>
<dd>Any record type that exists for the subject of the query.
</dd>
<dt><b>CNAME</b></dt>
<dd>Canonical Name record. Returns a list of aliases for the true (canonical) host name if any exist.
</dd>
<dt><b>HINFO</b></dt>
<dd>Host information. Information about the CPU type and operating system of subject of the query.
</dd>
<dt><b>MX</b></dt>
<dd>Mail Exchange record.
</dd>
<dt><b>NS</b></dt>
<dd>Name server (DNS server) information for the zone
</dd>
<dt><b>PTR</b></dt>
<dd>Pointer record. Returns a host name for an IP address.
</dd>
<dt><b>SOA</b></dt>
<dd>Start of Authority record.
</dd>
<dt><b>TXT</b></dt>
<dd>Text record.
</dd>
<dt><b>WKS</b></dt>
<dd>Well-known services or applications available on this host.
<p>
<b>Note: </b>This type of information record is not usually available.
</p>
</dd>
</dl>
</dd>
<dt><b>set port=X</b></dt>
<dd>Use TCP/IP port 'X' to query the DNS server, where 'X' is a TCP/IP port number. The default value is port 53.
<p>
<b>Note: </b>The well known port number for DNS servers is 53 and most DNS servers use it. You do not normally need to set the port value unless the DNS server you want to query is not using port 53. Other ports are sometimes used under special circumstances. To query DNS server that is not using port 53, set the port value to the same port number the DNS server is using.
</p>
</dd>
</dl>
</dd>
<dt><b>ls</b></dt>
<dd>List. The list subcommand is used to display information or write it to a file. It is used with additional values to determine the kind of information displayed or written, and if written, the path and file name of the file to write the information to. Values for the ls subcommand are:
<dl>
<dt><b>ls DOMAIN &gt; FILE</b></dt>
<dd>Write a list of IP addresses in DOMAIN to FILE. Substitute the name of the domain for DOMAIN, and the full path and filename to write to for FILE.
<p>
<pre>
ls company.us.com &gt; /temp/filename.extension
</pre>
</p>
</dd>
<dt><b>ls -a DOMAIN</b></dt>
<dd>List all canonical (true) names and aliases in DOMAIN (substitute a domain name for DOMAIN).
</dd>
<dt><b>ls -h DOMAIN</b></dt>
<dd>List HINFO (CPU type and operating system) for DOMAIN (substitute a domain name for DOMAIN).
</dd>
<dt><b>ls -s DOMAIN</b></dt>
<dd>List the well-known services available on DOMAIN (substitute a domain name for DOMAIN).
</dd>
<dt><b>ls -d DOMAIN</b></dt>
<dd>List all available records for DOMAIN (substitute a domain name for DOMAIN). Includes all DNS record types.
</dd>
<dt><b>ls -t TYPE DOMAIN</b></dt>
<dd>List all DNS TYPE records for DOMAIN. Substitute a DNS record type for TYPE, and a domain name for DOMAIN. See the 'set type=X' subcommand for a list of DNS record types.
</dd>
</dl>
</dd>
<dt><b>view FILE</b></dt>
<dd>Display the contents of ls output FILE (substitute the ls output file name for FILE).
</dd>
<dt><b>exit</b></dt>
<dd>End the query session. Then hit enter to return to the command line.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#NSLOOKUP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="NSLOOKUP.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#STRDNSQRY.HOSTNAME"><b>HOSTNAME</b></a></td>
<td valign="top">Host</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#STRDNSQRY.DMNNAMSVR"><b>DMNNAMSVR</b></a></td>
<td valign="top">Domain Name Server</td>
<td valign="top"><i>Character value</i>, <b><u>*CFG</u></b></td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#NSLOOKUP.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="STRDNSQRY.HOSTNAME"></a>
<h3>Host (HOSTNAME)</h3>
<p>Specify the TCP/IP host that you want the Domain Name Service (DNS) server to supply information about. You can use either the host's worded name, or its numerical IP address. For example, a host's name is anybiz.usa.com, and its numerical address is 123.4.56.7. Use either the name to obtain the address, or the address to obtain the name.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No host name is provided. This is the default value for the HOSTNAME parameter and is used if you do not supply a host name or address. An interactive NSLookup session will be started.
</dd>
<dt><b><i>host-name</i></b></dt>
<dd>Specify the name of the host to use for the DNS server query.
</dd>
<dt><b><i>host-IP-address</i></b></dt>
<dd>Specify the IP address of the host to use for the DNS server query.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#NSLOOKUP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRDNSQRY.DMNNAMSVR"></a>
<h3>Domain Name Server (DMNNAMSVR)</h3>
<p>Specify the name or the IP address of the DNS server that NSLookup will use as its default server for the query session.
</p>
<p>
<b>Note: </b>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.
</p>
<p>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.
</p>
<p>Use the DMNNAMSVR parameter of the STRDNSQRY command to specify a default DNS server for your NSLookup query session. You can specify any DNS server your TCP/IP network has access to. Or, if you want to test the response of a DNS server prior to designating it for use by your system, specify that server.
</p>
<dl>
<dt><b><u>*CFG</u></b></dt>
<dd>Use the DNS server that is currently designated for use by this system.
</dd>
<dt><b><i>domain-name-server-name</i></b></dt>
<dd>Specify the name of a DNS server.
</dd>
<dt><b><i>domain-name-server-IP-address</i></b></dt>
<dd>Specify the IP address of a DNS server.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#NSLOOKUP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="STRDNSQRY.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
STRDNSQRY HOSTNAME('9.12.234.14') DMNNAMSVR(*CFG)
</pre>
</p>
<p>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.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#NSLOOKUP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="STRDNSQRY.ERROR.MESSAGES">Error messages</a> </h3>
<p>None
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#NSLOOKUP.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>