xref: /minix3/share/man/man5/hosts.5 (revision 9b6c0eaf748c80797c013b0e156c99b004e79124)
1*9b6c0eafSDavid van Moolenbroek.\"	$NetBSD: hosts.5,v 1.13 2003/08/07 10:31:17 agc Exp $
2*9b6c0eafSDavid van Moolenbroek.\"
3*9b6c0eafSDavid van Moolenbroek.\" Copyright (c) 1983, 1991, 1993
4*9b6c0eafSDavid van Moolenbroek.\"	The Regents of the University of California.  All rights reserved.
5*9b6c0eafSDavid van Moolenbroek.\"
6*9b6c0eafSDavid van Moolenbroek.\" Redistribution and use in source and binary forms, with or without
7*9b6c0eafSDavid van Moolenbroek.\" modification, are permitted provided that the following conditions
8*9b6c0eafSDavid van Moolenbroek.\" are met:
9*9b6c0eafSDavid van Moolenbroek.\" 1. Redistributions of source code must retain the above copyright
10*9b6c0eafSDavid van Moolenbroek.\"    notice, this list of conditions and the following disclaimer.
11*9b6c0eafSDavid van Moolenbroek.\" 2. Redistributions in binary form must reproduce the above copyright
12*9b6c0eafSDavid van Moolenbroek.\"    notice, this list of conditions and the following disclaimer in the
13*9b6c0eafSDavid van Moolenbroek.\"    documentation and/or other materials provided with the distribution.
14*9b6c0eafSDavid van Moolenbroek.\" 3. Neither the name of the University nor the names of its contributors
15*9b6c0eafSDavid van Moolenbroek.\"    may be used to endorse or promote products derived from this software
16*9b6c0eafSDavid van Moolenbroek.\"    without specific prior written permission.
17*9b6c0eafSDavid van Moolenbroek.\"
18*9b6c0eafSDavid van Moolenbroek.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19*9b6c0eafSDavid van Moolenbroek.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*9b6c0eafSDavid van Moolenbroek.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*9b6c0eafSDavid van Moolenbroek.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22*9b6c0eafSDavid van Moolenbroek.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23*9b6c0eafSDavid van Moolenbroek.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24*9b6c0eafSDavid van Moolenbroek.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25*9b6c0eafSDavid van Moolenbroek.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26*9b6c0eafSDavid van Moolenbroek.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27*9b6c0eafSDavid van Moolenbroek.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28*9b6c0eafSDavid van Moolenbroek.\" SUCH DAMAGE.
29*9b6c0eafSDavid van Moolenbroek.\"
30*9b6c0eafSDavid van Moolenbroek.\"     @(#)hosts.5	8.2 (Berkeley) 12/11/93
31*9b6c0eafSDavid van Moolenbroek.\"
32*9b6c0eafSDavid van Moolenbroek.Dd November 17, 2000
33*9b6c0eafSDavid van Moolenbroek.Dt HOSTS 5
34*9b6c0eafSDavid van Moolenbroek.Os
35*9b6c0eafSDavid van Moolenbroek.Sh NAME
36*9b6c0eafSDavid van Moolenbroek.Nm hosts
37*9b6c0eafSDavid van Moolenbroek.Nd host name data base
38*9b6c0eafSDavid van Moolenbroek.Sh DESCRIPTION
39*9b6c0eafSDavid van MoolenbroekThe
40*9b6c0eafSDavid van Moolenbroek.Nm hosts
41*9b6c0eafSDavid van Moolenbroekfile contains information regarding the known hosts on the network.
42*9b6c0eafSDavid van MoolenbroekIt can be used in conjunction with the DNS, and the
43*9b6c0eafSDavid van Moolenbroek.Tn NIS
44*9b6c0eafSDavid van Moolenbroekmaps
45*9b6c0eafSDavid van Moolenbroek.Sq hosts.byaddr ,
46*9b6c0eafSDavid van Moolenbroekand
47*9b6c0eafSDavid van Moolenbroek.Sq hosts.byname ,
48*9b6c0eafSDavid van Moolenbroekas controlled by
49*9b6c0eafSDavid van Moolenbroek.Xr nsswitch.conf 5 .
50*9b6c0eafSDavid van Moolenbroek.Pp
51*9b6c0eafSDavid van MoolenbroekFor each host a single line should be present
52*9b6c0eafSDavid van Moolenbroekwith the following information:
53*9b6c0eafSDavid van Moolenbroek.Dl address hostname [alias ...]
54*9b6c0eafSDavid van Moolenbroek.Pp
55*9b6c0eafSDavid van MoolenbroekThese are:
56*9b6c0eafSDavid van Moolenbroek.Bl -tag -width hostname -compact -offset indent
57*9b6c0eafSDavid van Moolenbroek.It Em address
58*9b6c0eafSDavid van MoolenbroekInternet address
59*9b6c0eafSDavid van Moolenbroek.It Em hostname
60*9b6c0eafSDavid van MoolenbroekOfficial host name
61*9b6c0eafSDavid van Moolenbroek.It Em alias
62*9b6c0eafSDavid van MoolenbroekAlias host name
63*9b6c0eafSDavid van Moolenbroek.El
64*9b6c0eafSDavid van Moolenbroek.Pp
65*9b6c0eafSDavid van MoolenbroekItems are separated by any number of blanks and/or
66*9b6c0eafSDavid van Moolenbroektab characters.  A hash sign
67*9b6c0eafSDavid van Moolenbroek.Pq Dq \&#
68*9b6c0eafSDavid van Moolenbroekindicates the beginning of
69*9b6c0eafSDavid van Moolenbroeka comment; characters up to the end of the line are
70*9b6c0eafSDavid van Moolenbroeknot interpreted by routines which search the file.
71*9b6c0eafSDavid van Moolenbroek.Pp
72*9b6c0eafSDavid van MoolenbroekWhen using the name server
73*9b6c0eafSDavid van Moolenbroek.Xr named 8 ,
74*9b6c0eafSDavid van Moolenbroekor
75*9b6c0eafSDavid van Moolenbroek.Xr ypserv 8 ,
76*9b6c0eafSDavid van Moolenbroekthis file provides a backup when the name server
77*9b6c0eafSDavid van Moolenbroekis not running.
78*9b6c0eafSDavid van MoolenbroekFor the name server, it is suggested that only a few addresses
79*9b6c0eafSDavid van Moolenbroekbe included in this file.
80*9b6c0eafSDavid van MoolenbroekThese include address for the local interfaces that
81*9b6c0eafSDavid van Moolenbroek.Xr ifconfig 8
82*9b6c0eafSDavid van Moolenbroekneeds at boot time and a few machines on the local network.
83*9b6c0eafSDavid van Moolenbroek.Pp
84*9b6c0eafSDavid van MoolenbroekThis file may be created from the official host
85*9b6c0eafSDavid van Moolenbroekdata base maintained at the Network Information Control
86*9b6c0eafSDavid van MoolenbroekCenter
87*9b6c0eafSDavid van Moolenbroek.Pq Tn NIC ,
88*9b6c0eafSDavid van Moolenbroekthough local changes may be required
89*9b6c0eafSDavid van Moolenbroekto bring it up to date regarding unofficial aliases
90*9b6c0eafSDavid van Moolenbroekand/or unknown hosts.  As the data base maintained at
91*9b6c0eafSDavid van Moolenbroek.Tn NIC
92*9b6c0eafSDavid van Moolenbroekis incomplete, use of the name server is recommended for
93*9b6c0eafSDavid van Moolenbroeksites on the
94*9b6c0eafSDavid van Moolenbroek.Tn DARPA
95*9b6c0eafSDavid van MoolenbroekInternet.
96*9b6c0eafSDavid van Moolenbroek.Pp
97*9b6c0eafSDavid van MoolenbroekAs network addresses, both IPv4 and IPv6 addresses are allowed.
98*9b6c0eafSDavid van MoolenbroekIPv4 addresses are specified in the conventional dot
99*9b6c0eafSDavid van Moolenbroek.Pq Dq \&.
100*9b6c0eafSDavid van Moolenbroeknotation using the
101*9b6c0eafSDavid van Moolenbroek.Xr inet_pton 3
102*9b6c0eafSDavid van Moolenbroekroutine
103*9b6c0eafSDavid van Moolenbroekfrom the Internet address manipulation library,
104*9b6c0eafSDavid van Moolenbroek.Xr inet 3 .
105*9b6c0eafSDavid van MoolenbroekIPv6 addresses are specified in the standard hex-and-colon notation.
106*9b6c0eafSDavid van MoolenbroekHost names may contain any printable
107*9b6c0eafSDavid van Moolenbroekcharacter other than a field delimiter, newline,
108*9b6c0eafSDavid van Moolenbroekor comment character.
109*9b6c0eafSDavid van Moolenbroek.Sh FILES
110*9b6c0eafSDavid van Moolenbroek.Bl -tag -width /etc/hosts -compact
111*9b6c0eafSDavid van Moolenbroek.It Pa /etc/hosts
112*9b6c0eafSDavid van MoolenbroekThe
113*9b6c0eafSDavid van Moolenbroek.Nm hosts
114*9b6c0eafSDavid van Moolenbroekfile resides in
115*9b6c0eafSDavid van Moolenbroek.Pa /etc .
116*9b6c0eafSDavid van Moolenbroek.El
117*9b6c0eafSDavid van Moolenbroek.Sh SEE ALSO
118*9b6c0eafSDavid van Moolenbroek.Xr gethostbyname 3 ,
119*9b6c0eafSDavid van Moolenbroek.Xr nsswitch.conf 5 ,
120*9b6c0eafSDavid van Moolenbroek.Xr ifconfig 8 ,
121*9b6c0eafSDavid van Moolenbroek.Xr named 8
122*9b6c0eafSDavid van Moolenbroek.Rs
123*9b6c0eafSDavid van Moolenbroek.%T "Name Server Operations Guide for BIND"
124*9b6c0eafSDavid van Moolenbroek.Re
125*9b6c0eafSDavid van Moolenbroek.Sh HISTORY
126*9b6c0eafSDavid van MoolenbroekThe
127*9b6c0eafSDavid van Moolenbroek.Nm
128*9b6c0eafSDavid van Moolenbroekfile format appeared in
129*9b6c0eafSDavid van Moolenbroek.Bx 4.2 .
130