2.11BSD/src/man/man1/nslookup.1

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1986 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)nslookup.1	1.2 (Berkeley) 11/21/87
.\"
.TH NSLOOKUP 1 "November 21, 1987"
.UC 6
.SH NAME
nslookup \- query name servers interactively
.SH SYNOPSIS
.B nslookup
[
.I host-to-find | \-
[
.I server address | server name
]] 
.SH DESCRIPTION
.IR Nslookup
is a program to query DARPA Internet domain name servers. 
Nslookup has two modes: interactive and non-interactive.
Interactive mode allows the user to query the name server for
information about various  hosts and domains or print a list of hosts 
in the domain. 
Non-interactive mode is used to print just the name and Internet address
of a host or domain.
.sp 1
.SH ARGUMENTS
Interactive mode is entered in the following cases:
.IP a) 4
when no arguments are given (the default name server will be used), and
.IP b) 4
when the first argument is a hyphen (\-) and the second argument
is the host name of a name server.
.LP
Non-interactive mode is used when the name of the host to be looked up
is given as the first argument. The optional second argument specifies
a name server.
.sp 1
.SH "INTERACTIVE COMMANDS"
Commands may be interrupted at any time by typing a control-C.
To exit, type a control-D (EOF).
The command line length must be less than 80 characters.
\fBN.B.\fP an unrecognized command will be interpreted as a host name.
.sp 1
.IP "host [server]"
Look up information for \fIhost\fP using the current default server
or using \fIserver\fP if it is specified.
.sp 1
.IP "\fBserver\fP \fIdomain\fP"
.ns
.IP "\fBlserver\fP \fIdomain\fP"
Change the default server to \fIdomain\fP. 
\fBLserver\fP uses the initial server to look up 
information about \fIdomain\fP while \fBserver\fP
uses the current default server. 
If an authoritative answer can't be found, the names of servers
that might have the answer are returned.
.sp 1
.IP \fBroot\fP
Changes the default server to the server for the root of the domain name space.
Currently, the host sri-nic.arpa is used.
(This command is a synonym for the \fBlserver sri-nic.arpa\fP.)
The name of the root server can be changed with the \fBset root\fP command.
.sp 1
.IP "\fBfinger\fP [\fIname\fP] [\fB>\fP \fIfilename\fP]"
.ns
.IP "\fBfinger\fP [\fIname\fP] [\fB>>\fP \fIfilename\fP]"
Connects with the finger server on the current host. 
The current host is defined when a previous lookup for a host
was successful and returned address information (see the 
\fBset querytype=A\fP command).
\fIName\fP is optional. 
\fB>\fP and \fB>>\fP can be used to redirect output in the
usual manner.
.sp 1
.IP "\fBls\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
.ns
.IP "\fBls\fP \fIdomain\fP [\fB>>\fP \fIfilename\fP]"
.ns
.IP "\fBls -a\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
.ns
.IP "\fBls -a\fP \fIdomain\fP [\fB>>\fP \fIfilename\fP]"
.ns
.IP "\fBls -h\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
.ns
.IP "\fBls -h\fP \fIdomain\fP [\fB>>\fP \fIfilename\fP]"
.IP "\fBls -d\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
.ns
List the information available for \fIdomain\fP. 
The default output contains host names and their Internet addresses. 
The \fB-a\fP option lists aliases of hosts in the domain.
The \fB-h\fP option lists CPU and operating system information for the domain.
The \fB-d\fP option lists all contents of a zone transfer.
When output is directed to a file, hash marks are printed for every
50 records received from the server.
.sp 1
.IP "\fBview\fP \fIfilename\fP"
Sorts and lists the output of previous \fBls\fP command(s) with \fImore\fP(1).
.sp 1
.IP "\fBhelp\fP"
.ns
.IP "\fB?\fP"
Prints a brief summary of commands.
.sp 1
.IP "\fBset\fP \fIkeyword\fP[=\fIvalue\fP]"
This command is used to change state information that affects the lookups.
Valid keywords are:
.RS
.IP "\fBall\fP"
Prints the current values of the various options to \fBset\fP.
Information about the  current default server and host is also printed.
.IP "\fB[no]debug\fP"
Turn debugging mode on. A lot more information is printed about the
packet sent to the server and the resulting answer.
.br
(Default = nodebug, abbreviation = [no]deb)
.IP "\fB[no]d2\fP"
Turn exhaustive debugging mode on.
Essentially all fields of every packet are printed.
.br
(Default = nod2)
.IP "\fB[no]defname\fP"
Append the default domain name to every lookup.
.br
(Default = defname, abbreviation = [no]def)
.IP "\fB[no]search\fP"
With defname, search for each name in parent domains of the current domain.
.br
(Default = search)
.IP "\fBdomain=\fIname\fR"
Change the default domain name to \fIname\fP. 
The default domain name is appended to all lookup requests if 
the \fBdefname\fP option has been set.
The search list is set to parents of the domain with at least two components
in their names.
.br
(Default = value in hostname or /etc/resolv.conf, abbreviation = do)
.IP "\fBquerytype=\fIvalue\fR"
.IP "\fBtype=\fIvalue\fR"
Change the type of information returned from a query to one of:
.RS
.IP A 10
the host's Internet address (the default).
.IP CNAME  10
the canonical name for an alias. 
.IP HINFO 10
the host CPU and operating system type.
.IP MD 10
the mail destination.
.IP MX 10
the mail exchanger.
.IP MG     10
the mail group member.
.IP MINFO 10
the mailbox or mail list information.
.IP MR     10
the mail rename domain name.
.IP NS     10
nameserver for the named zone.
.RE
Other types specified in the RFC883 document are valid but aren't
very useful.
.br
(Abbreviation = q)
.IP "\fB[no]recurse\fP"
Tell the name server to query other servers if it does not have the
information.
.br
(Default = recurse, abbreviation = [no]rec)
.IP \fBretry=\fInumber\fR
Set the number of retries to \fInumber\fP. 
When a reply to a request is not received within a certain 
amount of time (changed with \fBset timeout\fP), 
the request is resent. 
The retry value controls how many times a request is resent before giving up.
.br
(Default = 2, abbreviation = ret)
.IP \fBroot=\fIhost\fR
Change the name of the root server to \fIhost\fP. This
affects the \fBroot\fP command. 
.br
(Default = sri-nic.arpa, abbreviation = ro)
.IP \fBtimeout=\fInumber\fR
Change the time-out interval for waiting for a reply to \fInumber\fP seconds.
.br
(Default = 10 seconds, abbreviation = t)
.IP "\fB[no]vc\fP"
Always use a virtual circuit when sending requests to the server.
.br
(Default = novc, abbreviation = [no]v)
.RE
.SH DIAGNOSTICS
If the lookup request was not successful, an error message is printed.
Possible errors are:
.IP "Time-out"
The server did not respond to a request after a certain amount of
time (changed with \fBset timeout=\fIvalue\fR) 
and a certain number of retries (changed with \fBset retry=\fIvalue\fR).
.IP "No information"
Depending on the query type set with the \fBset querytype\fP command,
no information about the host was available, though the host name is
valid.
.IP "Non-existent domain"
The host or domain name does not exist.
.IP "Connection refused"
.ns
.IP "Network is unreachable"
The connection to the name or finger server could not be made 
at the current time.
This error commonly occurs with \fBfinger\fP requests. 
.IP "Server failure"
The name server found an internal inconsistency in its database
and could not return a valid answer.
.IP "Refused"
The name server refused to service the request.
.sp 1
.PP
The following error should not occur and it indicates a bug in the program.
.IP "Format error"
The name server found that the request packet was not in the proper format.
.sp 1
.SH FILES
/etc/resolv.conf	initial domain name and name server addresses.
.SH SEE ALSO
resolver(3), resolver(5), named(8), RFC882, RFC883
.SH AUTHOR
Andrew Cherenson