Interactive
mode enables you to query one or more name servers repeatedly for
information about various hosts and domains, to display that information
on your console, and, in some cases, to write response data to a file. nslookup is
a synonym for the onslookup command in the z/OS UNIX shell. nslookup command
syntax is the same as that for the onslookup command.
You
can enter the interactive mode under the following conditions only:
- No arguments are supplied on command invocation. The default name
server is used.
- The first argument is a hyphen (-), and the second argument is
the host name or IP address of a name server.
In interactive mode:
- An initial query is made to the selected name server to verify
that the server is accessible.
- All subsequent interactive queries are sent to that server unless
you specify another server using the server or lserver subcommands.
- The command line length must be less than 256 characters.
- To treat a built-in command as a host name, precede it with an
escape character (\). An unrecognized command is interpreted as a
host name.
For a complete list and description of onslookup options,
see onslookup options. See nslookup versions for listing
of valid commands and start options.
Format
- Interactive mode
>>-onslookup--+-----------------+--+------------------+--------->
| .-------------. | +- -server_name----+
| V | | '- -server_address-'
'---| -Option |-+-'
>--Enter-------------------------------------------------------><
- Interactive commands, subsequent queries
>>-+----------------------+--Enter-----------------------------><
+-exit-----------------+
+-host--+--------+-----+
| '-server-' |
+-lserver--+-name----+-+
| '-address-' |
+-server--+-name----+--+
| '-address-' |
'-set--| option |------'
Parameters
- -Option
- For a description of the onslookup options,
see onslookup options.
- -server_name
- Directs the default name server to map -server_name to
an IP address and then uses the name server at that address. This
argument is optional. The default is the default name server found
by the search order described in onslookup configuration.
This name can be a name that resolves to an IPv4 or an IPv6 address.
- -server_address
- Specifies the IP address of the name server to be queried other
than the default name server. A query for the address is initially
made to the default name server to map the IP address to a domain
name for the server. This argument is optional. The default is the
default name server found by the search order described in onslookup configuration. This can be an IPv4 or an IPv6 address.
- exit
- Exits from onslookup interactive mode.
- host
- host is the host name or IP address you want the name server
to resolve. Use this format to look up information for a host using
the current default server or using server if
specified. If host is an IP address and the query type is
A or PTR, the name of the host is returned. If host is a name
and does not have a trailing period, the default domain name is appended
to the name. (This behavior depends on the state of the set options
-domain, -srchlist, -defname, and -search.) To look up a host not
in the current domain, append a period to the name.
- lserver
- Change the default server to one determined by name or address.
This command uses the initial server to look up information about
the new server. This can be a name that resolves to an IPv4 or an
IPv6 address, or an actual IPv4 or IPv6 address.
If an authoritative
answer cannot be found, the names of servers that might have the answer
are returned.
- server
- Change the default server to one determined by name or address.
This command uses the current default server to look up information
about the new server. This can be a name that resolves to an IPv4
or IPv6 address, or an actual IPv4 or IPv6 address.
If an authoritative
answer cannot be found, the names of servers that might have the answer
are returned.
- set keyword
- Allows changes to query environment. The following describes the keyword and
values that can be used.
- all
- Prints the current values of the frequently used options to set.
Information about the current default server and host is also printed.
- class=query_class
- The
class specifies the protocol group of the information. The class changes
the query class. See the z/OS Communications Server: IP Configuration
Reference for detailed information about valid query
types. The default class is IN. The keyword class can
be abbreviated as cl.
- [no]d2
- Turn exhaustive debugging mode on (d2) or off
(nod2). You will not see any difference between
debug, d2 and trace resolver. This turns on nslookup internal
trace. The default is nod2.
- [no]debug
- Turn basic debugging mode on (debug) or off (nodebug).
Information is printed about the packet sent to the server and the
resulting answer. The default is nodebug. The keyword debug can
be abbreviated as deb.
- [no]defname
- If set, append the default domain name to a single-component lookup
request (one that does not contain a period). The default is defname.
The keyword defname can be abbreviated as def.
This is equivalent to the [no]search option. Specifying the '-domain='
option also causes the default domain name to be appended to the name
being queried.
- domain=name
- Change the default domain name to name.
The default domain name is appended to a lookup request depending
on the state of the defname and search options. The keyword domain can
be abbreviated as do. This also causes the -search
option to be turned on. Also, this becomes the default search list
and overrides the default domain specified in the resolver configuration
file.
- port=value
- Change the default TCP/UDP name server port to value.
The default port number is 53. The keyword port can
be abbreviated as po.
- querytype=type
-
- The keyword querytype can be abbreviated as type.
- The keyword querytype can also be abbreviated
as qu.
Change the type of information query type.
See the z/OS Communications Server: IP Configuration
Reference for detailed information about valid query
types. The default value is A.
- [no]recurse
- Tell the name server to query other servers if it does not have
the information. The default is recurse. The keyword recurse can
be abbreviated as rec.
- retry=number
- Set the number of retries to number.
When a reply to a request is not received within a certain amount
of time (changed with set timeout), the timeout period
is doubled and the request is resent. The retry value controls how
many times a request is sent before giving up. The default is 4. The
keyword retry can be abbreviated as ret.
- [no]search
- If the lookup request contains at least one period but does not
end with a trailing period, append the domain names in the domain
search list to the request until an answer is received. The default
is search. The keyword search can
be abbreviated as sea. This is equivalent to the
[no]defname option.
- timeout=number
- Change the initial timeout interval for waiting for a reply to number seconds.
Each retry doubles the timeout period. The default
is 5 seconds. The kewyord timeout can be abbreviated
as t.
- [no]vc
- Always use a virtual circuit (TCP) when sending requests to the
server. The default is novc. The keyword vc can
be abbreviated as v.