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