|
|
1.1 root 1: .\" Copyright (c) 1986,1990 Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted provided
5: .\" that: (1) source distributions retain this entire copyright notice and
6: .\" comment, and (2) distributions including binaries display the following
7: .\" acknowledgement: ``This product includes software developed by the
8: .\" University of California, Berkeley and its contributors'' in the
9: .\" documentation or other materials provided with the distribution and in
10: .\" all advertising materials mentioning features or use of this software.
11: .\" Neither the name of the University nor the names of its contributors may
12: .\" be used to endorse or promote products derived from this software without
13: .\" specific prior written permission.
14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17: .\"
18: .\" @(#)nslookup.8 5.3 (Berkeley) 6/24/90
19: .\"
20: .TH NSLOOKUP 8 "June 24, 1990"
21: .UC 6
22: .SH NAME
23: nslookup \- query Internet name servers interactively
24: .SH SYNOPSIS
25: .B nslookup
26: [
27: .I \-option ...
28: ]
29: [
30: .I host-to-find
31: | \- [
32: .I server
33: ]]
34: .SH DESCRIPTION
35: .I Nslookup
36: is a program to query Internet domain name servers.
37: Nslookup has two modes: interactive and non-interactive.
38: Interactive mode allows the user to query name servers for
39: information about various hosts and domains or to print a list of hosts
40: in a domain.
41: Non-interactive mode is used to print just the name and requested information
42: for a host or domain.
43: .sp 1
44: .SH ARGUMENTS
45: Interactive mode is entered in the following cases:
46: .IP a) 4
47: when no arguments are given (the default name server will be used),
48: .IP b) 4
49: when the first argument is a hyphen (\-) and the second argument
50: is the host name or Internet address of a name server.
51: .LP
52: Non-interactive mode is used when the name or Internet address
53: of the host to be looked up
54: is given as the first argument. The optional second argument specifies
55: the host name or address of a name server.
56: .LP
57: The options listed under the ``set'' command below can be specified in
58: the .nslookuprc file in the user's home directory if they are listed
59: one per line. Options can also be specified
60: on the command line if they precede the arguments and are prefixed with
61: a hyphen. For example, to change the default query type to host information,
62: and the initial timeout to 10 seconds, type:
63: .sp .5v
64: nslookup \-query=hinfo \-timeout=10
65: .sp .5v
66: .SH "INTERACTIVE COMMANDS"
67: Commands may be interrupted at any time by typing a control-C.
68: To exit, type a control-D (EOF) or type exit.
69: The command line length must be less than 256 characters.
70: To treat a built-in command as a host name,
71: precede it with an escape character (\e).
72: \fBN.B.\fP an unrecognized command will be interpreted as a host name.
73: .sp .5v
74: .IP "\fIhost\fP [\fIserver\fP]"
75: Look up information for \fIhost\fP using the current default server
76: or using \fIserver\fP if specified.
77: If \fIhost\fP is an Internet address and the query type is A or PTR, the
78: name of the host is returned.
79: If \fIhost\fP is a name and does not have a trailing period, the default
80: domain name is appended to the name. (This behavior depends on the state of the
81: \fBset\fP options \fBdomain\fP, \fBsrchlist\fP,
82: \fBdefname\fP, and \fBsearch\fP).
83: To look up a host not in the current domain, append a period to
84: the name.
85: .sp 1
86: .IP "\fBserver\fP \fIdomain\fP"
87: .ns
88: .IP "\fBlserver\fP \fIdomain\fP"
89: Change the default server to \fIdomain\fP.
90: \fBLserver\fP uses the initial server to look up
91: information about \fIdomain\fP while \fBserver\fP
92: uses the current default server.
93: If an authoritative answer can't be found, the names of servers
94: that might have the answer are returned.
95: .sp 1
96: .IP \fBroot\fP
97: Changes the default server to the server for the root of the domain name space.
98: Currently, the host ns.nic.ddn.mil is used.
99: (This command is a synonym for \fBlserver ns.nic.ddn.mil.\fP)
100: The name of the root server can be changed with the \fBset root\fP command.
101: .sp 1
102: .IP "\fBfinger\fP [\fIname\fP] [\fB>\fP \fIfilename\fP]"
103: .ns
104: .IP "\fBfinger\fP [\fIname\fP] [\fB>>\fP \fIfilename\fP]"
105: Connects with the finger server on the current host.
106: The current host is defined when a previous lookup for a host
107: was successful and returned address information (see the
108: \fBset querytype=A\fP command).
109: \fIName\fP is optional.
110: \fB>\fP and \fB>>\fP can be used to redirect output in the
111: usual manner.
112: .sp 1
113: .IP "\fBls\fR [\fIoption\fR] \fIdomain\fR [\fB>\fR \fIfilename\fR]"
114: .ns
115: .IP "\fBls\fR [\fIoption\fR] \fIdomain\fR [\fB>>\fR \fIfilename\fR]"
116: List the information available for \fIdomain\fP, optionally creating
117: or appending to \fIfilename\fP.
118: The default output contains host names and their Internet addresses.
119: .I Option
120: can be one of the following:
121: .RS
122: .IP "\fB\-t \fIquerytype\fP" 4
123: lists all records of the specified type (see \fIquerytype\fP below).
124: .IP \fB\-a\fP 4
125: lists aliases of hosts in the domain.
126: synonym for \fB\-t\ \ CNAME\fP.
127: .IP \fB\-d\fP 4
128: lists all records for the domain.
129: synonym for \fB\-t\ \ ANY\fP.
130: .IP \fB\-h\fP 4
131: lists CPU and operating system information for the domain.
132: synonym for \fB\-t\ \ HINFO\fP.
133: .IP \fB\-s\fP 4
134: lists well-known services of hosts in the domain.
135: synonym for \fB\-t\ \ WKS\fP.
136: .P
137: When output is directed to a file, hash marks are printed for every
138: 50 records received from the server.
139: .RE
140: .sp 1
141: .IP "\fBview\fP \fIfilename\fP"
142: Sorts and lists the output of previous \fBls\fP command(s) with \fImore\fP(1).
143: .sp 1
144: .ne 4
145: .IP "\fBhelp\fP"
146: .ns
147: .IP "\fB?\fP"
148: Prints a brief summary of commands.
149: .sp 1
150: .IP "\fBexit\fP"
151: Exits the program.
152: .sp 1
153: .IP "\fBset\fP \fIkeyword\fP[=\fIvalue\fP]"
154: This command is used to change state information that affects the lookups.
155: Valid keywords are:
156: .RS
157: .IP "\fBall\fP"
158: Prints the current values of the frequently-used options to \fBset\fP.
159: Information about the current default server and host is also printed.
160: .IP "\fBclass=\fIvalue\fR"
161: Change the query class to one of:
162: .RS
163: .IP IN 10
164: the Internet class.
165: .IP CHAOS 10
166: the Chaos class.
167: .IP HESIOD 10
168: the MIT Athena Hesiod class.
169: .IP ANY 10
170: wildcard (any of the above).
171: .P
172: The class specifies the protocol group of the information.
173: .br
174: (Default = IN, abbreviation = cl)
175: .RE
176: .IP "\fB[no]debug\fP"
177: Turn debugging mode on. A lot more information is printed about the
178: packet sent to the server and the resulting answer.
179: .br
180: (Default = nodebug, abbreviation = [no]deb)
181: .IP "\fB[no]d2\fP"
182: Turn exhaustive debugging mode on.
183: Essentially all fields of every packet are printed.
184: .br
185: (Default = nod2)
186: .IP "\fBdomain=\fIname\fR"
187: Change the default domain name to \fIname\fP.
188: The default domain name is appended to a lookup request depending on the
189: state of the \fBdefname\fP and \fBsearch\fP options.
190: The domain search list contains the parents of the default domain if it has
191: at least two components in its name.
192: For example, if the default domain
193: is CC.Berkeley.EDU, the search list is CC.Berkeley.EDU and Berkeley.EDU.
194: Use the \fBset srchlist\fP command to specify a different list.
195: Use the \fBset all\fP command to display the list.
196: .br
197: (Default = value from hostname, /etc/resolv.conf or LOCALDOMAIN,
198: abbreviation = do)
199: .IP "\fBsrchlist=\fIname1/name2/...\fR"
200: Change the default domain name to \fIname1\fP and the domain search list
201: to \fIname1\fP, \fIname2\fP, etc. A maximum of 6 names separated by slashes (/)
202: can be specified.
203: For example,
204: .sp .5v
205: set\ srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU
206: .sp .5v
207: sets the domain to lcs.MIT.EDU and the search list to the three names.
208: This command overrides the
209: default domain name and search list of the \fBset domain\fP command.
210: Use the \fBset all\fP command to display the list.
211: .br
212: (Default = value based on hostname, /etc/resolv.conf or LOCALDOMAIN,
213: abbreviation = srchl)
214: .IP "\fB[no]defname\fP"
215: If set, append the default domain name to a single-component lookup request
216: (i.e., one that does not contain a period).
217: .br
218: (Default = defname, abbreviation = [no]def)
219: .IP "\fB[no]search\fP"
220: If the lookup request contains at least one period but doesn't end
221: with a trailing period,
222: append the domain names in the domain search list
223: to the request until an answer is received.
224: .br
225: (Default = search, abbreviation = [no]sea)
226: .IP "\fBport=\fIvalue\fR"
227: Change the default TCP/UDP name server port to \fIvalue\fP.
228: .br
229: (Default = 53, abbreviation = po)
230: .IP "\fBquerytype=\fIvalue\fR"
231: .ns
232: .IP "\fBtype=\fIvalue\fR"
233: .ns
234: Change the type of information query to one of:
235: .RS
236: .IP A 10
237: the host's Internet address.
238: .IP CNAME 10
239: the canonical name for an alias.
240: .IP HINFO 10
241: the host CPU and operating system type.
242: .IP MINFO 10
243: the mailbox or mail list information.
244: .IP MX 10
245: the mail exchanger.
246: .IP NS 10
247: the name server for the named zone.
248: .IP PTR 10
249: the host name if the query is an Internet address,
250: otherwise the pointer to other information.
251: .IP SOA 10
252: the domain's ``start-of-authority'' information.
253: .IP TXT 10
254: the text information.
255: .IP UINFO 10
256: the user information.
257: .IP WKS 10
258: the supported well-known services.
259: .P
260: Other types (ANY, AXFR, MB, MD, MF, NULL) are described in the
261: RFC-1035 document.
262: .br
263: (Default = A, abbreviations = q, ty)
264: .RE
265: .IP "\fB[no]recurse\fP"
266: Tell the name server to query other servers if it does not have the
267: information.
268: .br
269: (Default = recurse, abbreviation = [no]rec)
270: .IP \fBretry=\fInumber\fR
271: Set the number of retries to \fInumber\fP.
272: When a reply to a request is not received within a certain
273: amount of time (changed with \fBset timeout\fP),
274: the timeout period is doubled and the request is resent.
275: The retry value controls how many times a request is resent before giving up.
276: .br
277: (Default = 4, abbreviation = ret)
278: .IP \fBroot=\fIhost\fR
279: Change the name of the root server to \fIhost\fP. This
280: affects the \fBroot\fP command.
281: .br
282: (Default = ns.nic.ddn.mil., abbreviation = ro)
283: .IP \fBtimeout=\fInumber\fR
284: Change the initial timeout interval
285: for waiting for a reply
286: to \fInumber\fP seconds.
287: Each retry doubles the timeout period.
288: .br
289: (Default = 5 seconds, abbreviation = ti)
290: .IP "\fB[no]vc\fP"
291: Always use a virtual circuit when sending requests to the server.
292: .br
293: (Default = novc, abbreviation = [no]v)
294: .IP "\fB[no]ignoretc\fP"
295: Ignore packet truncation errors.
296: .br
297: (Default = noignoretc, abbreviation = [no]ig)
298: .RE
299: .SH DIAGNOSTICS
300: If the lookup request was not successful, an error message is printed.
301: Possible errors are:
302: .IP "Timed out" 5
303: The server did not respond to a request after a certain amount of
304: time (changed with \fBset timeout=\fIvalue\fR)
305: and a certain number of retries (changed with \fBset retry=\fIvalue\fR).
306: .IP "No response from server" 5
307: No name server is running on the server machine.
308: .IP "No records" 5
309: The server does not have resource records of the current query type for the
310: host, although the host name is valid.
311: The query type is specified with the \fBset querytype\fP command.
312: .IP "Non-existent domain" 5
313: The host or domain name does not exist.
314: .IP "Connection refused" 5
315: .ns
316: .IP "Network is unreachable" 5
317: The connection to the name or finger server could not be made
318: at the current time.
319: This error commonly occurs with \fBls\fP and \fBfinger\fP requests.
320: .IP "Server failure" 5
321: The name server found an internal inconsistency in its database
322: and could not return a valid answer.
323: .IP "Refused" 5
324: The name server refused to service the request.
325: .IP "Format error" 5
326: The name server found that the request packet was not in the proper format.
327: It may indicate an error in \fInslookup\fP.
328: .sp 1
329: .SH FILES
330: .ta \w'/usr/share/misc/nslookup.helpXXX'u
331: /etc/resolv.conf initial domain name and
332: name server addresses.
333: .br
334: $HOME/.nslookuprc user's initial options.
335: .br
336: /usr/share/misc/nslookup.help summary of commands.
337: .SH ENVIRONMENT
338: .ta \w'HOSTALIASESXXXX'u
339: HOSTALIASES file containing host aliases.
340: .br
341: LOCALDOMAIN overrides default domain.
342: .SH SEE ALSO
343: resolver(3), resolver(5), named(8),
344: .br
345: RFC-1034 ``Domain Names \- Concepts and Facilities''
346: .br
347: RFC-1035 ``Domain Names \- Implementation and Specification''
348: .SH AUTHOR
349: Andrew Cherenson
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.