version 1, including all changes.
.
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(1). |
|
|
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 |
|
|
140 |
keyword[[=value] |
|
|
141 |
This command is used to change state information that |
|
|
142 |
affects the lookups. Valid keywords are: |
|
|
143 |
|
|
|
144 |
|
|
|
145 |
all |
|
|
146 |
Prints the current values of the fre- quently-used options |
|
|
147 |
to set. Information about the current default server and |
|
|
148 |
host is also printed. |
|
|
149 |
|
|
|
150 |
|
|
|
151 |
class=value |
|
|
152 |
Change the query class to one of: |
|
|
153 |
|
|
|
154 |
|
|
|
155 |
IN |
|
|
156 |
the Internet class |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
CHAOS |
|
|
160 |
the Chaos class |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
HESIOD |
|
|
164 |
the MIT Athena Hesiod class |
|
|
165 |
|
|
|
166 |
|
|
|
167 |
ANY |
|
|
168 |
wildcard (any of the above) |
|
|
169 |
|
|
|
170 |
|
|
|
171 |
The class specifies the protocol group of the |
|
|
172 |
information. |
|
|
173 |
|
|
|
174 |
|
|
|
175 |
(Default = IN; abbreviation = cl) |
|
|
176 |
|
|
|
177 |
|
|
|
178 |
[[ |
|
|
179 |
no]debug |
|
|
180 |
Turn debugging mode on. A lot more informa- tion is printed |
|
|
181 |
about the packet sent to the server and the resulting |
|
|
182 |
answer. |
|
|
183 |
|
|
|
184 |
|
|
|
185 |
(Default = nodebug; abbreviation = [[ |
|
|
186 |
no]deb) |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
[[ |
|
|
190 |
no]d2 |
|
|
191 |
Turn exhaustive debugging mode on. Essen- tially all fields |
|
|
192 |
of every packet are printed. |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
(Default = nod2) |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
domain=name |
|
|
199 |
Change the default domain name to name. The default domain |
|
|
200 |
name is appended to a lookup request depending on the state |
|
|
201 |
of the defname and search options. The domain search list |
|
|
202 |
contains the parents of the default domain if it has at |
|
|
203 |
least two compo- nents in its name. For example, if the |
|
|
204 |
default domain is CC.Berkeley.EDU, the search list is |
|
|
205 |
CC.Berkeley.EDU and Berke- ley.EDU. Use the ``set srchlist'' |
|
|
206 |
command to specify a different list. Use the ``set all'' |
|
|
207 |
command to display the list. |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
(Default = value from hostname(1), |
|
|
211 |
/etc/resolv.conf, or LOCALDOMAIN; |
|
|
212 |
abbrevia- tion = do) |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
srchlist=name1/name2/... |
|
|
216 |
Change the default domain name to name1 and the domain |
|
|
217 |
search list to name1, name2, etc. A maximum of 6 names |
|
|
218 |
separated by slashes (/) can be specified. For |
|
|
219 |
example, |
|
|
220 |
|
|
|
221 |
|
|
|
222 |
set srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU |
|
|
223 |
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. |
|
|
224 |
|
|
|
225 |
|
|
|
226 |
(Default = value based on hostname(1), |
|
|
227 |
/etc/resolv.conf, or LOCALDOMAIN; |
|
|
228 |
abbrevia- tion = srchl) |
|
|
229 |
[[ no]defname |
|
|
230 |
|
|
|
231 |
|
|
|
232 |
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) [[ no]search |
|
|
233 |
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) 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. |
|
|
234 |
|
|
|
235 |
|
|
|
236 |
CNAME |
|
|
237 |
the canonical name for an alias. |
|
|
238 |
|
|
|
239 |
|
|
|
240 |
HINFO |
|
|
241 |
the host CPU and operating system type. |
|
|
242 |
|
|
|
243 |
|
|
|
244 |
MINFO |
|
|
245 |
the mailbox or mail list informa- tion. |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
MX |
|
|
249 |
the mail exchanger. |
|
|
250 |
|
|
|
251 |
|
|
|
252 |
NS |
|
|
253 |
the name server for the named zone. |
|
|
254 |
|
|
|
255 |
|
|
|
256 |
PTR |
|
|
257 |
the host name if the query is an Internet address; |
|
|
258 |
otherwise, the pointer to other information. |
|
|
259 |
|
|
|
260 |
|
|
|
261 |
SOA |
|
|
262 |
the domain's ``start-of-authority'' |
|
|
263 |
information. |
|
|
264 |
|
|
|
265 |
|
|
|
266 |
TXT |
|
|
267 |
the text information. |
|
|
268 |
|
|
|
269 |
|
|
|
270 |
UINFO |
|
|
271 |
the user information. |
|
|
272 |
|
|
|
273 |
|
|
|
274 |
WKS |
|
|
275 |
the supported well-known services. |
|
|
276 |
|
|
|
277 |
|
|
|
278 |
Other types (ANY, AXFR, MB, |
|
|
279 |
MD, MF, NULL) are described in |
|
|
280 |
the RFC-1035 document. |
|
|
281 |
|
|
|
282 |
|
|
|
283 |
(Default = A; abbreviations = q, ty) |
|
|
284 |
|
|
|
285 |
|
|
|
286 |
[[ |
|
|
287 |
no]recurse |
|
|
288 |
Tell the name server to query other servers if it does not |
|
|
289 |
have the information. |
|
|
290 |
|
|
|
291 |
|
|
|
292 |
(Default = recurse; abbreviation = [[ |
|
|
293 |
no]rec) |
|
|
294 |
|
|
|
295 |
|
|
|
296 |
retry=number |
|
|
297 |
Set the number of retries to number. When a reply to a |
|
|
298 |
request is not received within a certain amount of time |
|
|
299 |
(changed with ``set timeout''), the timeout period is |
|
|
300 |
doubled and the request is resent. The retry value controls |
|
|
301 |
how many times a request is resent before giving |
|
|
302 |
up. |
|
|
303 |
|
|
|
304 |
|
|
|
305 |
(Default = 4, abbreviation = ret) |
|
|
306 |
|
|
|
307 |
|
|
|
308 |
root=host |
|
|
309 |
Change the name of the root server to host. This affects the |
|
|
310 |
``root'' command. |
|
|
311 |
|
|
|
312 |
|
|
|
313 |
(Default = ns.internic.net.; abbreviation = ro) |
|
|
314 |
|
|
|
315 |
|
|
|
316 |
timeout=number |
|
|
317 |
Change the initial timeout interval for waiting for a reply |
|
|
318 |
to number seconds. Each retry doubles the timeout |
|
|
319 |
period. |
|
|
320 |
|
|
|
321 |
|
|
|
322 |
(Default = 5 seconds; abbreviation = ti) |
|
|
323 |
|
|
|
324 |
|
|
|
325 |
[[ |
|
|
326 |
no]vc |
|
|
327 |
Always use a virtual circuit when sending requests to the |
|
|
328 |
server. |
|
|
329 |
|
|
|
330 |
|
|
|
331 |
(Default = novc; abbreviation = [[ |
|
|
332 |
no]v) |
|
|
333 |
|
|
|
334 |
|
|
|
335 |
[[ |
|
|
336 |
no]ignoretc |
|
|
337 |
Ignore packet truncation errors. |
|
|
338 |
|
|
|
339 |
|
|
|
340 |
(Default = noignoretc; abbreviation = [[ |
|
|
341 |
no]ig) |
|
|
342 |
|
|
|
343 |
|
|
|
344 |
__DIAGNOSTICS__ |
|
|
345 |
|
|
|
346 |
|
|
|
347 |
If the lookup request was not successful, an error message |
|
|
348 |
is printed. Possible errors are: |
|
|
349 |
Timed out |
|
|
350 |
|
|
|
351 |
|
|
|
352 |
The server did not respond to a request after a cer- tain |
|
|
353 |
amount of time (changed with ``set timeout=value'') and a |
|
|
354 |
certain number of retries (changed with `` |
|
|
355 |
set retry=value |
|
|
356 |
''). |
|
|
357 |
|
|
|
358 |
|
|
|
359 |
No response from server |
|
|
360 |
No name server is running on the server |
|
|
361 |
machine. |
|
|
362 |
|
|
|
363 |
|
|
|
364 |
No records |
|
|
365 |
The server does not have resource records of the cur- rent |
|
|
366 |
query type for the host, although the host name is valid. |
|
|
367 |
The query type is specified with the ``set querytype'' |
|
|
368 |
command. |
|
|
369 |
|
|
|
370 |
|
|
|
371 |
Non-existent domain |
|
|
372 |
The host or domain name does not exist. |
|
|
373 |
|
|
|
374 |
|
|
|
375 |
Connection refused |
|
|
376 |
|
|
|
377 |
|
|
|
378 |
Network is unreachable |
|
|
379 |
The connection to the name or finger server could not be |
|
|
380 |
made at the current time. This error commonly occurs with ls |
|
|
381 |
and finger requests. |
|
|
382 |
|
|
|
383 |
|
|
|
384 |
Server failure |
|
|
385 |
The name server found an internal inconsistency in its |
|
|
386 |
database and could not return a valid answer. |
|
|
387 |
|
|
|
388 |
|
|
|
389 |
Refused |
|
|
390 |
The name server refused to service the request. |
|
|
391 |
|
|
|
392 |
|
|
|
393 |
Format error |
|
|
394 |
The name server found that the request packet was not in the |
|
|
395 |
proper format. It may indicate an error in |
|
|
396 |
nslookup. |
|
|
397 |
|
|
|
398 |
|
|
|
399 |
__FILES__ |
|
|
400 |
/etc/resolv.conf |
|
|
401 |
initial domain name and name server |
|
|
402 |
addresses |
|
|
403 |
|
|
|
404 |
|
|
|
405 |
$HOME/.nslookuprc |
|
|
406 |
user's initial options |
|
|
407 |
/usr/share/misc/nslookup.help |
|
|
408 |
summary of commands |
|
|
409 |
|
|
|
410 |
|
|
|
411 |
__ENVIRONMENT__ |
|
|
412 |
HOSTALIASES |
|
|
413 |
file containing host |
|
|
414 |
aliases |
|
|
415 |
|
|
|
416 |
|
|
|
417 |
LOCALDOMAIN |
|
|
418 |
overrides default domain |
|
|
419 |
|
|
|
420 |
|
|
|
421 |
__SEE ALSO__ |
|
|
422 |
|
|
|
423 |
|
|
|
424 |
named(8), resolver(3), |
|
|
425 |
resolver(5); RFC-1034, ``Domain Names - Concepts |
|
|
426 |
and Facilities''; RFC-1035, ``Domain Names - Implementation |
|
|
427 |
and Specification''. |
|
|
428 |
__AUTHOR__ |
|
|
429 |
|
|
|
430 |
|
|
|
431 |
Andrew Cherenson |
|
|
432 |
|
|
|
433 |
|
|
|
434 |
4th Berkeley Distribution June 24, 1990 1 |
|
|
435 |
---- |