|
|
1.1 root 1: .\" Copyright (c) 1986 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)nslookup.1 1.2 (Berkeley) 11/21/87
6: .\"
7: .TH NSLOOKUP 1 "November 21, 1987"
8: .UC 6
9: .SH NAME
10: nslookup \- query name servers interactively
11: .SH SYNOPSIS
12: .B nslookup
13: [
14: .I host-to-find | \-
15: [
16: .I server address | server name
17: ]]
18: .SH DESCRIPTION
19: .IR Nslookup
20: is a program to query DARPA Internet domain name servers.
21: Nslookup has two modes: interactive and non-interactive.
22: Interactive mode allows the user to query the name server for
23: information about various hosts and domains or print a list of hosts
24: in the domain.
25: Non-interactive mode is used to print just the name and Internet address
26: of a host or domain.
27: .sp 1
28: .SH ARGUMENTS
29: Interactive mode is entered in the following cases:
30: .IP a) 4
31: when no arguments are given (the default name server will be used), and
32: .IP b) 4
33: when the first argument is a hyphen (\-) and the second argument
34: is the host name of a name server.
35: .LP
36: Non-interactive mode is used when the name of the host to be looked up
37: is given as the first argument. The optional second argument specifies
38: a name server.
39: .sp 1
40: .SH "INTERACTIVE COMMANDS"
41: Commands may be interrupted at any time by typing a control-C.
42: To exit, type a control-D (EOF).
43: The command line length must be less than 80 characters.
44: \fBN.B.\fP an unrecognized command will be interpreted as a host name.
45: .sp 1
46: .IP "host [server]"
47: Look up information for \fIhost\fP using the current default server
48: or using \fIserver\fP if it is specified.
49: .sp 1
50: .IP "\fBserver\fP \fIdomain\fP"
51: .ns
52: .IP "\fBlserver\fP \fIdomain\fP"
53: Change the default server to \fIdomain\fP.
54: \fBLserver\fP uses the initial server to look up
55: information about \fIdomain\fP while \fBserver\fP
56: uses the current default server.
57: If an authoritative answer can't be found, the names of servers
58: that might have the answer are returned.
59: .sp 1
60: .IP \fBroot\fP
61: Changes the default server to the server for the root of the domain name space.
62: Currently, the host sri-nic.arpa is used.
63: (This command is a synonym for the \fBlserver sri-nic.arpa\fP.)
64: The name of the root server can be changed with the \fBset root\fP command.
65: .sp 1
66: .IP "\fBfinger\fP [\fIname\fP] [\fB>\fP \fIfilename\fP]"
67: .ns
68: .IP "\fBfinger\fP [\fIname\fP] [\fB>>\fP \fIfilename\fP]"
69: Connects with the finger server on the current host.
70: The current host is defined when a previous lookup for a host
71: was successful and returned address information (see the
72: \fBset querytype=A\fP command).
73: \fIName\fP is optional.
74: \fB>\fP and \fB>>\fP can be used to redirect output in the
75: usual manner.
76: .sp 1
77: .IP "\fBls\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
78: .ns
79: .IP "\fBls\fP \fIdomain\fP [\fB>>\fP \fIfilename\fP]"
80: .ns
81: .IP "\fBls -a\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
82: .ns
83: .IP "\fBls -a\fP \fIdomain\fP [\fB>>\fP \fIfilename\fP]"
84: .ns
85: .IP "\fBls -h\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
86: .ns
87: .IP "\fBls -h\fP \fIdomain\fP [\fB>>\fP \fIfilename\fP]"
88: .IP "\fBls -d\fP \fIdomain\fP [\fB>\fP \fIfilename\fP]"
89: .ns
90: List the information available for \fIdomain\fP.
91: The default output contains host names and their Internet addresses.
92: The \fB-a\fP option lists aliases of hosts in the domain.
93: The \fB-h\fP option lists CPU and operating system information for the domain.
94: The \fB-d\fP option lists all contents of a zone transfer.
95: When output is directed to a file, hash marks are printed for every
96: 50 records received from the server.
97: .sp 1
98: .IP "\fBview\fP \fIfilename\fP"
99: Sorts and lists the output of previous \fBls\fP command(s) with \fImore\fP(1).
100: .sp 1
101: .IP "\fBhelp\fP"
102: .ns
103: .IP "\fB?\fP"
104: Prints a brief summary of commands.
105: .sp 1
106: .IP "\fBset\fP \fIkeyword\fP[=\fIvalue\fP]"
107: This command is used to change state information that affects the lookups.
108: Valid keywords are:
109: .RS
110: .IP "\fBall\fP"
111: Prints the current values of the various options to \fBset\fP.
112: Information about the current default server and host is also printed.
113: .IP "\fB[no]debug\fP"
114: Turn debugging mode on. A lot more information is printed about the
115: packet sent to the server and the resulting answer.
116: .br
117: (Default = nodebug, abbreviation = [no]deb)
118: .IP "\fB[no]d2\fP"
119: Turn exhaustive debugging mode on.
120: Essentially all fields of every packet are printed.
121: .br
122: (Default = nod2)
123: .IP "\fB[no]defname\fP"
124: Append the default domain name to every lookup.
125: .br
126: (Default = defname, abbreviation = [no]def)
127: .IP "\fB[no]search\fP"
128: With defname, search for each name in parent domains of the current domain.
129: .br
130: (Default = search)
131: .IP "\fBdomain=\fIname\fR"
132: Change the default domain name to \fIname\fP.
133: The default domain name is appended to all lookup requests if
134: the \fBdefname\fP option has been set.
135: The search list is set to parents of the domain with at least two components
136: in their names.
137: .br
138: (Default = value in hostname or /etc/resolv.conf, abbreviation = do)
139: .IP "\fBquerytype=\fIvalue\fR"
140: .IP "\fBtype=\fIvalue\fR"
141: Change the type of information returned from a query to one of:
142: .RS
143: .IP A 10
144: the host's Internet address (the default).
145: .IP CNAME 10
146: the canonical name for an alias.
147: .IP HINFO 10
148: the host CPU and operating system type.
149: .IP MD 10
150: the mail destination.
151: .IP MX 10
152: the mail exchanger.
153: .IP MG 10
154: the mail group member.
155: .IP MINFO 10
156: the mailbox or mail list information.
157: .IP MR 10
158: the mail rename domain name.
159: .IP NS 10
160: nameserver for the named zone.
161: .RE
162: Other types specified in the RFC883 document are valid but aren't
163: very useful.
164: .br
165: (Abbreviation = q)
166: .IP "\fB[no]recurse\fP"
167: Tell the name server to query other servers if it does not have the
168: information.
169: .br
170: (Default = recurse, abbreviation = [no]rec)
171: .IP \fBretry=\fInumber\fR
172: Set the number of retries to \fInumber\fP.
173: When a reply to a request is not received within a certain
174: amount of time (changed with \fBset timeout\fP),
175: the request is resent.
176: The retry value controls how many times a request is resent before giving up.
177: .br
178: (Default = 2, abbreviation = ret)
179: .IP \fBroot=\fIhost\fR
180: Change the name of the root server to \fIhost\fP. This
181: affects the \fBroot\fP command.
182: .br
183: (Default = sri-nic.arpa, abbreviation = ro)
184: .IP \fBtimeout=\fInumber\fR
185: Change the time-out interval for waiting for a reply to \fInumber\fP seconds.
186: .br
187: (Default = 10 seconds, abbreviation = t)
188: .IP "\fB[no]vc\fP"
189: Always use a virtual circuit when sending requests to the server.
190: .br
191: (Default = novc, abbreviation = [no]v)
192: .RE
193: .SH DIAGNOSTICS
194: If the lookup request was not successful, an error message is printed.
195: Possible errors are:
196: .IP "Time-out"
197: The server did not respond to a request after a certain amount of
198: time (changed with \fBset timeout=\fIvalue\fR)
199: and a certain number of retries (changed with \fBset retry=\fIvalue\fR).
200: .IP "No information"
201: Depending on the query type set with the \fBset querytype\fP command,
202: no information about the host was available, though the host name is
203: valid.
204: .IP "Non-existent domain"
205: The host or domain name does not exist.
206: .IP "Connection refused"
207: .ns
208: .IP "Network is unreachable"
209: The connection to the name or finger server could not be made
210: at the current time.
211: This error commonly occurs with \fBfinger\fP requests.
212: .IP "Server failure"
213: The name server found an internal inconsistency in its database
214: and could not return a valid answer.
215: .IP "Refused"
216: The name server refused to service the request.
217: .sp 1
218: .PP
219: The following error should not occur and it indicates a bug in the program.
220: .IP "Format error"
221: The name server found that the request packet was not in the proper format.
222: .sp 1
223: .SH FILES
224: /etc/resolv.conf initial domain name and name server addresses.
225: .SH SEE ALSO
226: resolver(3), resolver(5), named(8), RFC882, RFC883
227: .SH AUTHOR
228: Andrew Cherenson
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.