Command (non-interactive) mode is used
to print just the name and requested information for a host or domain.
Use the command mode entry of onslookup command
to specify a single query.
Command mode query is invoked when
the name or IP address of the host to be looked up is given as the
first argument. The optional second argument specifies the host name
or address of a name server.
Note: - The nslookup command 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.
- The onslookup help command works only in the
interactive mode.
Format
>>-onslookup--+-----------------+--+-name----+------------------>
| .-------------. | '-address-'
| V | |
'---| -Option |-+-'
>--+----------------+------------------------------------------><
+-server_name----+
'-server_address-'
Parameters
- -Option
- For a description of the onslookup options,
see onslookup options.
- name
- Queries the name server for the current query-type of name. The
name typically represents a host name.
- address
- Reverses the components of the address and generates a pointer
type (PTR) query to the name server for the in-addr.arpa domain mapping
of the address to a domain name.
- 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 value
is the default name server found by the search order described in onslookup configuration. This address can be an IPv4 or an
IPv6 address.
Usage
Parameter values and domain names
are not case sensitive.
Context
Options can also be specified on
the command line if they precede the arguments and are prefixed with
a hyphen. For example, to change the default query type to host information
and the initial timeout to 10 seconds, type:
nslookup -query=hinfo -timeout=10
To
display a list of options, enter the following from the command line:
onslookup -h
For
a complete list and description of onslookup options,
see onslookup options.