Penguin
Annotated edit history of nslookup(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 ----
2 __NAME__
3
4
5 nslookup - query Internet name servers
6 interactively
7 __SYNOPSIS__
8
9
10 nslookup [[-option ...] [[host-to-find |
11 -[[server]]
12 __DESCRIPTION__
13
14
15 Nslookup is a program to query Internet domain name servers.
16 Nslookup has two modes: interactive and non-interactive.
17 Interactive mode allows the user to query name servers for
18 information about various hosts and domains or to print a
19 list of hosts in a domain. Non-interactive mode is used to
20 print just the name and requested information for a host or
21 domain.
22 __ARGUMENTS__
23
24
25 Interactive mode is entered in the following
26 cases:
27 a)
28
29
30 when no arguments are given (the default name serverwill be used),b)when the first argument is a hyphen (-) and the secondargument is the host name or Internet address of a nameserver.Non-interactive mode is used when the name or Internetaddress of the host to be looked up is given as the firstargument. The optional second argument specifies the hostname or address of a name server.The options listed under the ``set'' command below can be specified in the .nslookuprc file in the user's home direc- tory if they are listed one per line. 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:
31
32
33 nslookup -query=hinfo -timeout=10
34 __INTERACTIVE COMMANDS__
35
36
37 Commands may be interrupted at any time by typing a con-
38 trol-C. To exit, type a control-D (EOF) or type
39 exit. The command line length must be less than 256
40 characters. To treat a built-in command as a host name,
41 precede it with an escape character (.N.B.:__
42 unrecognized command will be interpreted as a host
43 name.
44 host [[server]
45
46
47 Look up information for host using the currentdefault server or using server, if specified. Ifhost is an Internet 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.)
48
49
50 To look up a host not in the current domain, append a period
51 to the name.
52
53
54 server domain
55
56
57 lserver domain
58 Change the default server to domain; lserver uses the
59 initial server to look up information about domain, while
60 server uses the current default server. If an authoritative
61 answer can't be found, the names of servers that might have
62 the answer are returned.
63
64
65 root
66 Changes the default server to the server for the root of the
67 domain name space. Currently, the host
68 ns.internic.net is used. (This command is a synonym
69 for ``lserver ns.internic.net''.) The name of the root
70 server can be changed with the ``set root''
71 command.
72
73
74 finger [[name] [[
75
76
77 finger [[name] [[
78 Connects with the finger server on the current host. The
79 current host is defined when a previous lookup for a host
80 was successful and returned address information (see the
81 ``set querytype=A'' command). The name is optional.
82
83
84 ls [[option] domain [[
85
86
87 ls [[option] domain [[
88 List the information available for domain, option- ally
89 creating or appending to filename. The default output
90 contains host names and their Internet addresses. Option can
91 be one of the following:
92
93
94 -t querytype
95 lists all records of the specified type (see querytype
96 below).
97
98
99 -a
100 lists aliases of hosts in the domain; synonym for ``-t
101 CNAME''.
102
103
104 -d
105 lists all records for the domain; synonym for ``-t
106 ANY''.
107
108
109 -h
110 lists CPU and operating system information for the domain;
111 synonym for ``-t HINFO''.
112
113
114 -s
115 lists well-known services of hosts in the domain; synonym
116 for ``-t WKS''.
117
118
119 When output is directed to a file, hash marks are printed
120 for every 50 records received from the server.
121
122
123 view filename
124 Sorts and lists the output of previous ls command(s) with
125 more(@CMD_EXT@).
126
127
128 help
129
130
131 ?
132 Prints a brief summary of commands.
133
134
135 exit
136 Exits the program.
137
138
139 set keyword [[=value]
140 This command is used to change state information that
141 affects the lookups. Valid keywords are:
142
143
144 all
145 Prints the current values of the fre- quently-used options
146 to set. Information about the current default server and
147 host is also printed.
148
149
150 class=value
151 Change the query class to one of:
152
153
154 IN
155 the Internet class
156
157
158 CHAOS
159 the Chaos class
160
161
162 HESIOD
163 the MIT Athena Hesiod class
164
165
166 ANY
167 wildcard (any of the above)
168
169
170 The class specifies the protocol group of the
171 information.
172
173
174 (Default = IN; abbreviation = cl)
175
176
177 [[no] debug
178 Turn debugging mode on. A lot more informa- tion is printed
179 about the packet sent to the server and the resulting
180 answer.
181
182
183 (Default = nodebug; abbreviation =
184 [[no] deb)
185
186
187 [[no] d2
188 Turn exhaustive debugging mode on. Essen- tially all fields
189 of every packet are printed.
190
191
192 (Default = nod2)
193
194
195 domain=name
196 Change the default domain name to name. The default domain
197 name is appended to a lookup request depending on the state
198 of the defname and search options. The domain search list
199 contains the parents of the default domain if it has at
200 least two compo- nents in its name. For example, if the
201 default domain is CC.Berkeley.EDU, the search list is
202 CC.Berkeley.EDU and Berke- ley.EDU. Use the ``set srchlist''
203 command to specify a different list. Use the ``set all''
204 command to display the list.
205
206
207 (Default = value from hostname(@CMD_EXT@),
208 /etc/resolv.conf, or LOCALDOMAIN;
209 abbrevia- tion = do)
210
211
212 srchlist=name1/name2/...
213 Change the default domain name to name1 and the domain
214 search list to name1, name2, etc. A maximum of 6 names
215 separated by slashes (/) can be specified. For
216 example,
217
218
219 set srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU
220 sets the domain to lcs.MIT.EDU and the search list to the three names. This com- mand overrides the default domain name and search list of the ``set domain'' command. Use the ``set all'' command to display the list.
221
222
223 (Default = value based on hostname(@CMD_EXT@),
224 /etc/resolv.conf, or LOCALDOMAIN;
225 abbreviation = srchl)
226 [[no] defname
227
228
229 If set, append the default domain name to asingle-component lookup request (i.e., onethat does not contain a period).(Default = defname; abbreviation = [[no]defname)
230 [[no] search
231 If the lookup request contains at least oneperiod but '' doesn't'' end with a trailingperiod, append the domain names in thedomain search list to the request until ananswer is received.(Default = search; abbreviation = [[no]sea)
232 port=value Change the default TCP/UDP name server portto value.(Default = 53; abbreviation = po) querytype=value type=value Change the type of information query to oneof: Athe host's Internet address.
233
234
235 CNAME
236 the canonical name for an alias.
237
238
239 HINFO
240 the host CPU and operating system type.
241
242
243 MINFO
244 the mailbox or mail list informa- tion.
245
246
247 MX
248 the mail exchanger.
249
250
251 NS
252 the name server for the named zone.
253
254
255 PTR
256 the host name if the query is an Internet address;
257 otherwise, the pointer to other information.
258
259
260 SOA
261 the domain's ``start-of-authority''
262 information.
263
264
265 TXT
266 the text information.
267
268
269 UINFO
270 the user information.
271
272
273 WKS
274 the supported well-known services.
275
276
277 Other types (ANY, AXFR, MB, MD, MF, NULL) are
278 described in the RFC-1035 document.
279
280
281 (Default = A; abbreviations = q, ty)
282
283
284 [[no] recurse
285 Tell the name server to query other servers if it does not
286 have the information.
287
288
289 (Default = recurse; abbreviation =
290 [[no] rec)
291
292
293 retry=number
294 Set the number of retries to number. When a reply to a
295 request is not received within a certain amount of time
296 (changed with ``set timeout''), the timeout period is
297 doubled and the request is resent. The retry value controls
298 how many times a request is resent before giving
299 up.
300
301
302 (Default = 4, abbreviation = ret)
303
304
305 root=host
306 Change the name of the root server to host. This affects the
307 ``root'' command.
308
309
310 (Default = ns.internic.net.; abbreviation = ro)
311
312
313 timeout=number
314 Change the initial timeout interval for waiting for a reply
315 to number seconds. Each retry doubles the timeout
316 period.
317
318
319 (Default = 5 seconds; abbreviation = ti)
320
321
322 [[no] vc
323 Always use a virtual circuit when sending requests to the
324 server.
325
326
327 (Default = novc; abbreviation =
328 [[no] v)
329
330
331 [[no] ignoretc
332 Ignore packet truncation errors.
333
334
335 (Default = noignoretc; abbreviation =
336 [[no] ig)
337
338
339 __DIAGNOSTICS__
340
341
342 If the lookup request was not successful, an error message
343 is printed. Possible errors are:
344 Timed out
345
346
347 The server did not respond to a request after a cer- tain
348 amount of time (changed with ``set timeout=value'') and a
349 certain number of retries (changed with ``set
350 retry=value'').
351
352
353 No response from server
354 No name server is running on the server
355 machine.
356
357
358 No records
359 The server does not have resource records of the cur- rent
360 query type for the host, although the host name is valid.
361 The query type is specified with the ``set querytype''
362 command.
363
364
365 Non-existent domain
366 The host or domain name does not exist.
367
368
369 Connection refused
370
371
372 Network is unreachable
373 The connection to the name or finger server could not be
374 made at the current time. This error commonly occurs with ls
375 and finger requests.
376
377
378 Server failure
379 The name server found an internal inconsistency in its
380 database and could not return a valid answer.
381
382
383 Refused
384 The name server refused to service the request.
385
386
387 Format error
388 The name server found that the request packet was not in the
389 proper format. It may indicate an error in
390 nslookup.
391
392
393 __FILES__
394 /etc/resolv.conf
395 initial domain name and name server
396 addresses
397
398
399 $HOME/.nslookuprc
400 user's initial options
401 /usr/share/misc/nslookup.help
402 summary of commands
403
404
405 __ENVIRONMENT__
406 HOSTALIASES
407 file containing host
408 aliases
409
410
411 LOCALDOMAIN
412 overrides default domain
413
414
415 __SEE ALSO__
416
417
418 @INDOT@named(@SYS_OPS_EXT@),
419 resolver(@LIB_NETWORK_EXT@),
420 resolver(@FORMAT_EXT@); RFC-1034, ``Domain Names -
421 Concepts and Facilities''; RFC-1035, ``Domain Names -
422 Implementation and Specification''.
423 __AUTHOR__
424
425
426 Andrew Cherenson
427
428
429 4th Berkeley Distribution June 24, 1990 1
430 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.