[9] | 1 | .\" ++Copyright++ 1993
|
---|
| 2 | .\" -
|
---|
| 3 | .\" Copyright (c) 1993
|
---|
| 4 | .\" The Regents of the University of California. All rights reserved.
|
---|
| 5 | .\"
|
---|
| 6 | .\" Redistribution and use in source and binary forms, with or without
|
---|
| 7 | .\" modification, are permitted provided that the following conditions
|
---|
| 8 | .\" are met:
|
---|
| 9 | .\" 1. Redistributions of source code must retain the above copyright
|
---|
| 10 | .\" notice, this list of conditions and the following disclaimer.
|
---|
| 11 | .\" 2. Redistributions in binary form must reproduce the above copyright
|
---|
| 12 | .\" notice, this list of conditions and the following disclaimer in the
|
---|
| 13 | .\" documentation and/or other materials provided with the distribution.
|
---|
| 14 | .\" 3. All advertising materials mentioning features or use of this software
|
---|
| 15 | .\" must display the following acknowledgement:
|
---|
| 16 | .\" This product includes software developed by the University of
|
---|
| 17 | .\" California, Berkeley and its contributors.
|
---|
| 18 | .\" 4. Neither the name of the University nor the names of its contributors
|
---|
| 19 | .\" may be used to endorse or promote products derived from this software
|
---|
| 20 | .\" without specific prior written permission.
|
---|
| 21 | .\"
|
---|
| 22 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
---|
| 23 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
| 24 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
| 25 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
---|
| 26 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
| 27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
| 28 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
| 29 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
| 30 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
| 31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
| 32 | .\" SUCH DAMAGE.
|
---|
| 33 | .\" -
|
---|
| 34 | .\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
---|
| 35 | .\"
|
---|
| 36 | .\" Permission to use, copy, modify, and distribute this software for any
|
---|
| 37 | .\" purpose with or without fee is hereby granted, provided that the above
|
---|
| 38 | .\" copyright notice and this permission notice appear in all copies, and that
|
---|
| 39 | .\" the name of Digital Equipment Corporation not be used in advertising or
|
---|
| 40 | .\" publicity pertaining to distribution of the document or software without
|
---|
| 41 | .\" specific, written prior permission.
|
---|
| 42 | .\"
|
---|
| 43 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
---|
| 44 | .\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
---|
| 45 | .\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
---|
| 46 | .\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
---|
| 47 | .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
---|
| 48 | .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
---|
| 49 | .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
| 50 | .\" SOFTWARE.
|
---|
| 51 | .\" -
|
---|
| 52 | .\" --Copyright--
|
---|
| 53 | .\" $Id: host.1,v 1.1 2005/05/02 13:01:39 beng Exp $
|
---|
| 54 | .TH HOST 1
|
---|
| 55 | .SH NAME
|
---|
| 56 | host \- look up host names using domain server
|
---|
| 57 | .SH SYNOPSIS
|
---|
| 58 | host [-l] [-v] [-w] [-r] [-d] [-t querytype] [-a] host [ server ]
|
---|
| 59 | .SH DESCRIPTION
|
---|
| 60 | .I Host
|
---|
| 61 | looks for information about Internet hosts. It gets this information
|
---|
| 62 | from a set of interconnected servers that are spread across the
|
---|
| 63 | country. By default, it simply converts between host names and
|
---|
| 64 | Internet addresses. However with the -t or -a options, it can be used
|
---|
| 65 | to find all of the information about this host that is maintained
|
---|
| 66 | by the domain server.
|
---|
| 67 | .PP
|
---|
| 68 | The arguments can be either host names or host numbers. The program
|
---|
| 69 | first attempts to interpret them as host numbers. If this fails,
|
---|
| 70 | it will treat them as host names. A host number consists of
|
---|
| 71 | first decimal numbers separated by dots, e.g. 128.6.4.194
|
---|
| 72 | A host name
|
---|
| 73 | consists of names separated by dots, e.g. topaz.rutgers.edu.
|
---|
| 74 | Unless the name ends in a dot, the local domain
|
---|
| 75 | is automatically tacked on the end. Thus a Rutgers user can say
|
---|
| 76 | "host topaz", and it will actually look up "topaz.rutgers.edu".
|
---|
| 77 | If this fails, the name is tried unchanged (in this case, "topaz").
|
---|
| 78 | This same convention is used for mail and other network utilities.
|
---|
| 79 | The actual suffix to tack on the end is obtained
|
---|
| 80 | by looking at the results of a "hostname" call, and using everything
|
---|
| 81 | starting at the first dot. (See below for a description of
|
---|
| 82 | how to customize the host name lookup.)
|
---|
| 83 | .PP
|
---|
| 84 | The first argument is the host name you want to look up.
|
---|
| 85 | If this is a number, an "inverse query" is done, i.e. the domain
|
---|
| 86 | system looks in a separate set of databases used to convert numbers
|
---|
| 87 | to names.
|
---|
| 88 | .PP
|
---|
| 89 | The second argument is optional. It
|
---|
| 90 | allows you to specify a particular server to query. If you don't
|
---|
| 91 | specify this argument, the default server (normally the local machine)
|
---|
| 92 | is used.
|
---|
| 93 | .PP
|
---|
| 94 | If a name is specified, you may see output of three different kinds.
|
---|
| 95 | Here is an example that shows all of them:
|
---|
| 96 | .br
|
---|
| 97 | % host sun4
|
---|
| 98 | .br
|
---|
| 99 | sun4.rutgers.edu is a nickname for ATHOS.RUTGERS.EDU
|
---|
| 100 | .br
|
---|
| 101 | ATHOS.RUTGERS.EDU has address 128.6.5.46
|
---|
| 102 | .br
|
---|
| 103 | ATHOS.RUTGERS.EDU has address 128.6.4.4
|
---|
| 104 | .br
|
---|
| 105 | ATHOS.RUTGERS.EDU mail is handled by ARAMIS.RUTGERS.EDU
|
---|
| 106 | .br
|
---|
| 107 | The user has typed the command "host sun4". The first line indicates
|
---|
| 108 | that the name "sun4.rutgers.edu" is actually a nickname. The official
|
---|
| 109 | host name is "ATHOS.RUTGERS.EDU'. The next two lines show the
|
---|
| 110 | address. If a system has more than one network interface, there
|
---|
| 111 | will be a separate address for each. The last line indicates
|
---|
| 112 | that ATHOS.RUTGERS.EDU does not receive its own mail. Mail for
|
---|
| 113 | it is taken by ARAMIS.RUTGERS.EDU. There may be more than one
|
---|
| 114 | such line, since some systems have more than one other system
|
---|
| 115 | that will handle mail for them. Technically, every system that
|
---|
| 116 | can receive mail is supposed to have an entry of this kind. If
|
---|
| 117 | the system receives its own mail, there should be an entry
|
---|
| 118 | the mentions the system itself, for example
|
---|
| 119 | "XXX mail is handled by XXX". However many systems that receive
|
---|
| 120 | their own mail do not bother to mention that fact. If a system
|
---|
| 121 | has a "mail is handled by" entry, but no address, this indicates
|
---|
| 122 | that it is not really part of the Internet, but a system that is
|
---|
| 123 | on the network will forward mail to it. Systems on Usenet, Bitnet,
|
---|
| 124 | and a number of other networks have entries of this kind.
|
---|
| 125 | .PP
|
---|
| 126 | There are a number of options that can be used before the
|
---|
| 127 | host name. Most of these options are meaningful only to the
|
---|
| 128 | staff who have to maintain the domain database.
|
---|
| 129 | .PP
|
---|
| 130 | The option -w causes host to wait forever for a response. Normally
|
---|
| 131 | it will time out after around a minute.
|
---|
| 132 | .PP
|
---|
| 133 | The option -v causes printout to be in a "verbose" format. This
|
---|
| 134 | is the official domain master file format, which is documented
|
---|
| 135 | in the man page for "named". Without this option, output still follows
|
---|
| 136 | this format in general terms, but some attempt is made to make it
|
---|
| 137 | more intelligible to normal users. Without -v,
|
---|
| 138 | "a", "mx", and "cname" records
|
---|
| 139 | are written out as "has address", "mail is handled by", and
|
---|
| 140 | "is a nickname for", and TTL and class fields are not shown.
|
---|
| 141 | .PP
|
---|
| 142 | The option -r causes recursion to be turned off in the request.
|
---|
| 143 | This means that the name server will return only data it has in
|
---|
| 144 | its own database. It will not ask other servers for more
|
---|
| 145 | information.
|
---|
| 146 | .PP
|
---|
| 147 | The option -d turns on debugging. Network transactions are shown
|
---|
| 148 | in detail.
|
---|
| 149 | .PP
|
---|
| 150 | The option -t allows you to specify a particular type of information
|
---|
| 151 | to be looked up. The arguments are defined in the man page for
|
---|
| 152 | "named". Currently supported types are a, ns, md, mf, cname,
|
---|
| 153 | soa, mb, mg, mr, null, wks, ptr, hinfo, minfo, mx, uinfo,
|
---|
| 154 | uid, gid, unspec, and the wildcard, which may be written
|
---|
| 155 | as either "any" or "*". Types must be given in lower case.
|
---|
| 156 | Note that the default is to look first for "a", and then "mx", except
|
---|
| 157 | that if the verbose option is turned on, the default is only "a".
|
---|
| 158 | .PP
|
---|
| 159 | The option -a (for "all") is equivalent to "-v -t any".
|
---|
| 160 | .PP
|
---|
| 161 | The option -l causes a listing of a complete domain. E.g.
|
---|
| 162 | .br
|
---|
| 163 | host -l rutgers.edu
|
---|
| 164 | .br
|
---|
| 165 | will give a listing of all hosts in the rutgers.edu domain. The -t
|
---|
| 166 | option is used to filter what information is presented, as you
|
---|
| 167 | would expect. The default is address information, which also
|
---|
| 168 | include PTR and NS records. The command
|
---|
| 169 | .br
|
---|
| 170 | host -l -v -t any rutgers.edu
|
---|
| 171 | .br
|
---|
| 172 | will give a complete download of the zone data for rutgers.edu,
|
---|
| 173 | in the official master file format. (However the SOA record is
|
---|
| 174 | listed twice, for arcane reasons.) NOTE: -l is implemented by
|
---|
| 175 | doing a complete zone transfer and then filtering out the information
|
---|
| 176 | the you have asked for. This command should be used only if it
|
---|
| 177 | is absolutely necessary.
|
---|
| 178 | .SH CUSTOMIZING HOST NAME LOOKUP
|
---|
| 179 | In general, if the name supplied by the user does not
|
---|
| 180 | have any dots in it, a default domain is appended to the end.
|
---|
| 181 | This domain can be defined in /etc/resolv.conf, but is normally derived
|
---|
| 182 | by taking the local hostname after its first dot. The user can override
|
---|
| 183 | this, and specify a different default domain, using the environment
|
---|
| 184 | variable
|
---|
| 185 | .IR LOCALDOMAIN .
|
---|
| 186 | In addition, the user can supply his own abbreviations for host names.
|
---|
| 187 | They should be in a file consisting of one line per abbreviation.
|
---|
| 188 | Each line contains an abbreviation, a space, and then the full
|
---|
| 189 | host name. This file must be pointed to by an environment variable
|
---|
| 190 | .IR HOSTALIASES ,
|
---|
| 191 | which is the name of the file.
|
---|
| 192 | .SH "See Also"
|
---|
| 193 | named (8)
|
---|
| 194 | .SH BUGS
|
---|
| 195 | Unexpected effects can happen when you type a name that is not
|
---|
| 196 | part of the local domain. Please always keep in mind the
|
---|
| 197 | fact that the local domain name is tacked onto the end of every
|
---|
| 198 | name, unless it ends in a dot. Only if this fails is the name
|
---|
| 199 | used unchanged.
|
---|
| 200 | .PP
|
---|
| 201 | The -l option only tries the first name server listed for the
|
---|
| 202 | domain that you have requested. If this server is dead, you
|
---|
| 203 | may need to specify a server manually. E.g. to get a listing
|
---|
| 204 | of foo.edu, you could try "host -t ns foo.edu" to get a list
|
---|
| 205 | of all the name servers for foo.edu, and then try "host -l foo.edu xxx"
|
---|
| 206 | for all xxx on the list of name servers, until you find one that
|
---|
| 207 | works.
|
---|