1NSLOOKUP(1)                 General Commands Manual                NSLOOKUP(1)
2
3
4

NAME

6       nslookup - query name servers interactively
7

SYNOPSIS

9       nslookup [ host-to-find | - [ server address | server name ]]
10

DESCRIPTION

12       Nslookup  is  a  program  to  query DARPA Internet domain name servers.
13       Nslookup has two modes: interactive and  non-interactive.   Interactive
14       mode  allows  the  user  to query the name server for information about
15       various  hosts and domains or print a list  of  hosts  in  the  domain.
16       Non-interactive  mode  is  used  to  print  just  the name and Internet
17       address of a host or domain.
18
19

ARGUMENTS

21       Interactive mode is entered in the following cases:
22
23       a)  when no arguments are given (the default name server will be used),
24           and
25
26       b)  when  the first argument is a hyphen (-) and the second argument is
27           the host name of a name server.
28
29       Non-interactive mode is used when the name of the host to be looked  up
30       is  given as the first argument. The optional second argument specifies
31       a name server.
32
33

INTERACTIVE COMMANDS

35       Commands may be interrupted at any time  by  typing  a  control-C.   To
36       exit,  type  a  control-D  (EOF).  The command line length must be less
37       than 80 characters.  N.B. an unrecognized command will  be  interpreted
38       as a host name.
39
40
41       host [server]
42              Look up information for host using the current default server or
43              using server if it is specified.
44
45
46       server domain
47       lserver domain
48              Change the default server to domain.  Lserver uses  the  initial
49              server to look up information about domain while server uses the
50              current default server.  If an  authoritative  answer  can't  be
51              found,  the  names  of  servers  that  might have the answer are
52              returned.
53
54
55       root   Changes the default server to the server for  the  root  of  the
56              domain  name  space.   Currently, the host sri-nic.arpa is used.
57              (This command is a synonym for the lserver  sri-nic.arpa.)   The
58              name  of  the  root server can be changed with the set root com‐
59              mand.
60
61
62       finger [name] [> filename]
63       finger [name] [>> filename]
64              Connects with the finger server on the current host.   The  cur‐
65              rent  host is defined when a previous lookup for a host was suc‐
66              cessful and returned address information  (see  the  set  query‐
67              type=A command).  Name is optional.  > and >> can be used to re‐
68              direct output in the usual manner.
69
70
71       ls domain [> filename]
72       ls domain [>> filename]
73       ls -a domain [> filename]
74       ls -a domain [>> filename]
75       ls -h domain [> filename]
76       ls -h domain [>> filename]
77
78       ls -d domain [> filename]
79              List the information available for domain.  The  default  output
80              contains host names and their Internet addresses.  The -a option
81              lists aliases of hosts in the domain.  The -h option  lists  CPU
82              and  operating system information for the domain.  The -d option
83              lists all contents of a zone transfer.  When output is  directed
84              to  a file, hash marks are printed for every 50 records received
85              from the server.
86
87
88       view filename
89              Sorts and lists  the  output  of  previous  ls  command(s)  with
90              more(1).
91
92
93       help
94
95       ?      Prints a brief summary of commands.
96
97
98       set keyword[=value]
99              This  command  is  used to change state information that affects
100              the lookups.  Valid keywords are:
101
102              all    Prints the current values of the various options to  set.
103                     Information about the  current default server and host is
104                     also printed.
105
106              [no]debug
107                     Turn debugging mode on. A lot more information is printed
108                     about  the  packet  sent  to the server and the resulting
109                     answer.
110                     (Default = nodebug, abbreviation = [no]deb)
111
112              [no]d2 Turn  exhaustive  debugging  mode  on.   Essentially  all
113                     fields of every packet are printed.
114                     (Default = nod2)
115
116              [no]defname
117                     Append the default domain name to every lookup.
118                     (Default = defname, abbreviation = [no]def)
119
120              [no]search
121                     With  defname,  search for each name in parent domains of
122                     the current domain.
123                     (Default = search)
124
125              domain=name
126                     Change the default domain  name  to  name.   The  default
127                     domain  name  is  appended  to all lookup requests if the
128                     defname option has been set.  The search list is  set  to
129                     parents  of  the  domain  with at least two components in
130                     their names.
131                     (Default = value in hostname or /etc/resolv.conf,  abbre‐
132                     viation = do)
133
134              querytype=value
135
136              type=value
137                     Change  the  type of information returned from a query to
138                     one of:
139
140                     A         the host's Internet address (the default).
141
142                     CNAME     the canonical name for an alias.
143
144                     HINFO     the host CPU and operating system type.
145
146                     MD        the mail destination.
147
148                     MX        the mail exchanger.
149
150                     MG        the mail group member.
151
152                     MINFO     the mailbox or mail list information.
153
154                     MR        the mail rename domain name.
155
156                     NS        nameserver for the named zone.
157              Other types specified in  the  RFC883  document  are  valid  but
158              aren't very useful.
159              (Abbreviation = q)
160
161              [no]recurse
162                     Tell  the  name  server to query other servers if it does
163                     not have the information.
164                     (Default = recurse, abbreviation = [no]rec)
165
166              retry=number
167                     Set the number of retries to number.  When a reply  to  a
168                     request  is  not received within a certain amount of time
169                     (changed with set timeout), the request is  resent.   The
170                     retry  value  controls how many times a request is resent
171                     before giving up.
172                     (Default = 2, abbreviation = ret)
173
174              root=host
175                     Change the name of the root server to host. This  affects
176                     the root command.
177                     (Default = sri-nic.arpa, abbreviation = ro)
178
179              timeout=number
180                     Change  the  time-out interval for waiting for a reply to
181                     number seconds.
182                     (Default = 10 seconds, abbreviation = t)
183
184              [no]vc Always use a virtual circuit when sending requests to the
185                     server.
186                     (Default = novc, abbreviation = [no]v)
187

DIAGNOSTICS

189       If  the lookup request was not successful, an error message is printed.
190       Possible errors are:
191
192       Time-out
193              The server did not respond to a request after a  certain  amount
194              of time (changed with set timeout=value) and a certain number of
195              retries (changed with set retry=value).
196
197       No information
198              Depending on the query type set with the set querytype  command,
199              no  information  about  the  host was available, though the host
200              name is valid.
201
202       Non-existent domain
203              The host or domain name does not exist.
204
205       Connection refused
206       Network is unreachable
207              The connection to the name or finger server could not be made at
208              the  current  time.   This  error  commonly  occurs  with finger
209              requests.
210
211       Server failure
212              The name server found an internal inconsistency in its  database
213              and could not return a valid answer.
214
215       Refused
216              The name server refused to service the request.
217
218
219       The following error should not occur and it indicates a bug in the pro‐
220       gram.
221
222       Format error
223              The name server found that the request packet  was  not  in  the
224              proper format.
225
226

FILES

228       /etc/resolv.conf    initial domain name and name server addresses.
229

SEE ALSO

231       resolver(3), resolver(5), named(8), RFC882, RFC883
232

AUTHOR

234       Andrew Cherenson
235
236
237
2384.3 Berkeley Distribution      November 21, 1987                   NSLOOKUP(1)
Impressum