xref: /netbsd-src/share/man/man5/networks.5 (revision 481fca6e59249d8ffcf24fef7cfbe7b131bfb080)
1.\"	$NetBSD: networks.5,v 1.9 1999/03/17 20:19:47 garbled Exp $
2.\"
3.\" Copyright (c) 1983, 1991, 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.\"     @(#)networks.5	8.1 (Berkeley) 6/5/93
35.\"
36.Dd January 16, 1999
37.Dt NETWORKS 5
38.Os
39.Sh NAME
40.Nm networks
41.Nd Internet Protocol network name data base
42.Sh DESCRIPTION
43The
44.Nm
45file is used as a local source to translate between Internet Protocol
46.Pq Tn IP
47network addresses and network names (and vice versa).
48It can be used in conjunction with the DNS,
49.\"and the
50.\".Tn NIS
51.\"maps
52.\".Sq networks.byaddr ,
53.\"and
54.\".Sq networks.byname ,
55as controlled by
56.Xr nsswitch.conf 5 .
57.Pp
58While the
59.Nm
60file was originally intended to be an exhaustive list of all
61.Tn IP
62networks that the local host could communicate with, distribution
63and update of such a list for the world-wide
64.Tn Internet
65(or, indeed, for any large "enterprise" network) has proven to be
66prohibitive, so the Domain Name System
67.Pq Tn DNS
68is used instead, except as noted.
69.Pp
70For each
71.Tn IP
72network a single line should be present with the following information:
73.Bd -unfilled -offset indent
74official network name
75ip network number
76aliases
77.Ed
78.Pp
79Items are separated by any number of blanks and/or tab characters.
80A ``#'' indicates the beginning of a comment; characters up to the end of
81the line are not interpreted by routines which search the file.
82.Pp
83Network number may be specified in the conventional
84``.''  (dot) notation using the
85.Xr inet_network 3
86routine
87from the
88.Tn IP
89address manipulation library,
90.Xr inet 3 .
91Network names may contain
92.Qq a
93through
94.Qq z ,
95zero through nine, and dash.
96.Pp
97.Tn IP
98network numbers on the
99.Tn Internet
100are generally assigned to a site by its Internet Service Provider
101.Pq Tn ISP ,
102who, in turn, get network address space assigned to them by one of
103the regional Internet Registries (e.g. ARIN, RIPE NCC, APNIC).
104These registries, in turn, answer to the Internet Assigned Numbers
105Authority
106.Pq Tn IANA .
107.Pp
108If a site changes its ISP from one to another, it will generally
109be required to change all its assigned IP addresses as part of the
110conversion; that is, return the previous network numbers to the previous
111.Tn ISP ,
112and assign addresses to its hosts from
113.Tn IP
114network address space given by the new
115.Tn ISP .
116Thus, it is best for a savvy network manager to configure his
117hosts for easy renumbering, to preserve his ability to easily
118change his
119.Tn ISP
120should the need arise.
121.Sh FILES
122.Bl -tag -width /etc/networks -compact
123.It Pa /etc/networks
124The
125.Nm
126file resides in
127.Pa /etc .
128.El
129.Sh SEE ALSO
130.Xr getnetent 3 ,
131.Xr resolv.conf 5 ,
132.Xr nsswitch.conf 5 ,
133.Xr hostname 7 ,
134.Xr dhclient 8 ,
135.Xr dhcpd 8 ,
136.Xr named 8 ,
137.Rs
138.%R RFC
139.%N 2317
140.%D March 1998
141.%T "Classless IN-ADDR.ARPA delegation"
142.Re
143.Rs
144.%R RFC
145.%N 1918
146.%D February 1996
147.%T "Address Allocation for Private Internets"
148.Re
149.Rs
150.%R RFC
151.%N 1627
152.%D July 1994
153.%T "Network 10 Considered Harmful"
154.Re
155.Rs
156.%R RFC
157.%N 1519
158.%D September 1993
159.%T "Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy"
160.Re
161.Rs
162.%R RFC
163.%N 1101
164.%D April 1989
165.%T "DNS Encoding of Network Names and Other Types"
166.Re
167.Sh HISTORY
168The
169.Nm
170file format appeared in
171.Bx 4.2 .
172