Annotation of src/usr.bin/whois/whois.1, Revision 1.27
1.27 ! henning 1: .\" $OpenBSD: whois.1,v 1.26 2007/08/06 19:16:06 sobrado Exp $
1.1 deraadt 2: .\" $NetBSD: whois.1,v 1.5 1995/08/31 21:51:32 jtc Exp $
3: .\"
4: .\" Copyright (c) 1985, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
1.20 millert 15: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 16: .\" may be used to endorse or promote products derived from this software
17: .\" without specific prior written permission.
18: .\"
19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29: .\" SUCH DAMAGE.
30: .\"
31: .\" @(#)whois.1 8.2 (Berkeley) 6/20/94
32: .\"
1.27 ! henning 33: .Dd $Mdocdate: August 6 2007 $
1.1 deraadt 34: .Dt WHOIS 1
1.5 aaron 35: .Os
1.1 deraadt 36: .Sh NAME
37: .Nm whois
1.3 deraadt 38: .Nd Internet domain name and network number directory service
1.1 deraadt 39: .Sh SYNOPSIS
40: .Nm whois
1.23 jmc 41: .Op Fl 6AadgilmQRr
1.19 millert 42: .Oo
43: .Fl c Ar country-code | Fl h Ar host
44: .Oc
45: .Op Fl p Ar port
1.26 sobrado 46: .Ar name ...
1.1 deraadt 47: .Sh DESCRIPTION
1.19 millert 48: The
1.13 aaron 49: .Nm
1.19 millert 50: utility looks up records in the databases maintained by several
1.3 deraadt 51: Network Information Centers
1.21 jmc 52: .Pq Tn NICs .
1.1 deraadt 53: .Pp
54: The options are as follows:
55: .Bl -tag -width Ds
1.23 jmc 56: .It Fl 6
57: Use the IPv6 Resource Center
58: .Pq Tn 6bone
59: database.
60: It contains network names and addresses for the IPv6 network.
61: .It Fl A
62: Use the Asia/Pacific Network Information Center
63: .Pq Tn APNIC
64: database.
65: It contains network numbers used in East Asia, Australia,
66: New Zealand, and the Pacific islands.
1.3 deraadt 67: .It Fl a
68: Use the American Registry for Internet Numbers
69: .Pq Tn ARIN
1.13 aaron 70: database.
71: It contains network numbers used in those parts of the world
1.3 deraadt 72: covered neither by
1.27 ! henning 73: .Tn AfriNIC ,
! 74: .Tn APNIC ,
! 75: .Tn LACNIC ,
1.19 millert 76: nor by
1.3 deraadt 77: .Tn RIPE .
1.19 millert 78: .Pp
79: (Hint: All point of contact handles in the
80: .Tn ARIN
81: whois database end with
82: .Qq Li -ARIN . )
1.18 millert 83: .It Fl c Ar country-code
84: This is the equivalent of using the
85: .Fl h
86: option with an argument of
87: .Qq Ar country-code Ns Li .whois-servers.net .
1.3 deraadt 88: .It Fl d
1.19 millert 89: Use the US Department of Defense database.
1.13 aaron 90: It contains points of contact for subdomains of
1.21 jmc 91: .Tn \&.MIL .
1.8 millert 92: .It Fl g
93: Use the US non-military federal government database, which contains points of
94: contact for subdomains of
1.21 jmc 95: .Tn \&.GOV .
1.3 deraadt 96: .It Fl h Ar host
97: Use the specified host instead of the default NIC
1.8 millert 98: (whois.crsnic.net).
1.3 deraadt 99: Either a host name or an IP address may be specified.
1.19 millert 100: .Pp
101: By default
102: .Nm
103: constructs the name of a whois server to use from the top-level domain
104: .Pq Tn TLD
105: of the supplied (single) argument, and appending
106: .Qq Li .whois-servers.net .
107: This effectively allows a suitable whois server to be selected
108: automatically for a large number of
109: .Tn TLDs .
110: .Pp
111: In the event that an IP
1.21 jmc 112: address is specified, the whois server will default to the American
1.19 millert 113: Registry for Internet Numbers
114: .Pq Tn ARIN .
115: If a query to
116: .Tn ARIN
117: references
118: .Tn APNIC , LACNIC ,
119: or
120: .Tn RIPE ,
121: that server will be queried also, provided that the
122: .Fl Q
123: option is not specified.
124: .Pp
125: If the query is not a domain name or IP address,
126: .Nm
127: will fall back to
128: .Pa whois.crsnic.net .
1.8 millert 129: .It Fl i
130: Use the Network Solutions Registry for Internet Numbers
1.19 millert 131: .Pq Tn whois.networksolutions.com
1.13 aaron 132: database.
1.19 millert 133: Historically, it contained network numbers and domain contact information
134: for most of
1.8 millert 135: .Tn \&.COM ,
136: .Tn \&.NET ,
137: .Tn \&.ORG
138: and
139: .Tn \&.EDU
140: domains.
1.19 millert 141: However, the registration of these domains is now done by a number of
142: independent and competing registrars and this database holds no information
143: on the domains registered by organizations other than Network Solutions, Inc.
144: Also, note that the
145: .Tn InterNIC
146: database
147: .Pq Pa whois.internic.net
148: is no longer handled by Network Solutions, Inc.
1.21 jmc 149: For details, see
1.19 millert 150: .Pa http://www.internic.net/ .
151: .Pp
152: (Hint: Contact information, identified by the term
153: .Em handle ,
154: can be looked up by prefixing
1.22 jmc 155: .Qq Li \&!
1.19 millert 156: or
1.22 jmc 157: .Qq Li handle\ \&
1.19 millert 158: to the
159: .Tn NIC
160: handle in the query.)
1.17 fgsch 161: .It Fl l
1.19 millert 162: Use the Latin American and Caribbean IP address Regional Registry
1.17 fgsch 163: .Pq Tn LACNIC
164: database.
1.19 millert 165: It contains network numbers used in much of Latin America and the
1.21 jmc 166: Caribbean.
1.6 deraadt 167: .It Fl m
168: Use the Route Arbiter Database
169: .Pq Tn RADB
1.14 aaron 170: database.
171: It contains route policy specifications for a large
1.6 deraadt 172: number of operators' networks.
1.19 millert 173: .It Fl p Ar port
174: Connect to the whois server on
175: .Ar port .
176: If this option is not specified,
177: .Nm
178: defaults to the
179: .Dq whois
180: port listed in
181: .Pa /etc/services
182: (port 43).
1.9 millert 183: .It Fl Q
1.13 aaron 184: Do a quick lookup.
185: This means that
1.9 millert 186: .Nm
1.24 jmc 187: will not attempt to lookup the name in the authoritative whois
1.9 millert 188: server (if one is listed) nor will it contact InterNic if a lookup
1.13 aaron 189: fails.
190: This flag has no effect when combined with any other flag.
1.8 millert 191: .It Fl R
192: Use the Russia Network Information Center
193: .Pq Tn RIPN
1.13 aaron 194: database.
195: It contains network numbers and domain contact information
1.8 millert 196: for subdomains of
1.21 jmc 197: .Tn \&.RU .
1.19 millert 198: This option is deprecated; use the
1.21 jmc 199: .Fl c
1.19 millert 200: option with an argument of
201: .Qq Li RU
202: instead.
1.23 jmc 203: .It Fl r
204: Use the R\(aaeseaux IP Europ\(aaeens
205: .Pq Tn RIPE
1.18 millert 206: database.
1.23 jmc 207: It contains network numbers and domain contact information for Europe.
1.1 deraadt 208: .El
209: .Pp
210: The default action, unless directed otherwise with a special
211: .Ar name ,
212: is to do a very broad search, looking for matches to
213: .Ar name
214: in all types of records and most fields (name, nicknames, hostname, net
215: address, etc.) in the database.
216: For more information as to what
217: .Ar name
218: operands have special meaning, and how to guide the search, use
219: the special name
1.13 aaron 220: .Dq help .
1.19 millert 221: .Ss Special cases
222: Queries beginning with an exclamation point
1.22 jmc 223: .Ql \&!
1.19 millert 224: are assumed to be
225: .Tn NSI
226: contact handles.
227: Unless a host or domain is specified on the command line,
228: .Pq Tn whois.networksolutions.com
229: will be used as the
230: .Nm
231: database.
232: .Pp
233: Similarly, queries beginning with
234: .Dq COCO-
235: are assumed to be
236: .Tn CORE
237: contact handles.
238: Unless a host or domain is specified on the command line,
239: .Pq Tn whois.corenic.net
240: will be used as the
241: .Nm
242: database.
1.18 millert 243: .Sh EXAMPLES
244: Most types of data, such as domain names and
245: .Tn IP
246: addresses, can be used as arguments to
247: .Nm
248: without any options, and
249: .Nm
250: will choose the correct whois server to query.
251: Some exceptions, where
252: .Nm
253: will not be able to handle data correctly, are detailed below.
254: .Pp
255: To obtain contact information about an
256: administrator located in the Russian
257: .Tn TLD
258: domain
259: .Qq Li RU ,
260: use the
261: .Fl c
262: option as shown in the following example, where
263: .Ar CONTACT-ID
264: is substituted with the actual contact identifier.
265: .Pp
266: .Dl "whois -c RU CONTACT-ID"
267: .Pp
268: (Note: This example is specific to the
269: .Tn TLD
270: .Qq Li RU ,
271: but other
272: .Tn TLDs
273: can be queried by using a similar syntax.)
274: .Pp
275: The following example demonstrates how to obtain information about an
276: .Tn IPv6
277: address or hostname using the
278: .Fl 6
279: option, which directs the query to
280: .Tn 6bone .
281: .Pp
282: .Dl "whois -6 IPv6-IP-Address"
1.19 millert 283: .Pp
284: The following example demonstrates how to query
285: a whois server using a non-standard port, where
286: .Dq Li query-data
287: is the query to be sent to
288: .Dq Li whois.example.com
1.21 jmc 289: on port
1.19 millert 290: .Dq Li rwhois
291: (written numerically as 4321).
292: .Pp
293: .Dl "whois -h whois.example.com -p rwhois query-data"
1.1 deraadt 294: .Sh SEE ALSO
1.18 millert 295: .Rs
296: .%A Ken Harrenstien
297: .%A Vic White
298: .%T NICNAME/WHOIS
299: .%D 1 March 1982
300: .%O RFC 812
301: .Re
1.1 deraadt 302: .Sh HISTORY
303: The
1.13 aaron 304: .Nm
1.1 deraadt 305: command appeared in
306: .Bx 4.3 .