xref: /netbsd-src/share/man/man5/networks.5 (revision 288b76eaefd9904b9c5954f5a3a54d058f60139b)
1*288b76eaSnia.\"	$NetBSD: networks.5,v 1.18 2020/01/20 13:08:40 nia Exp $
2b5930afcSjtc.\"
3b5930afcSjtc.\" Copyright (c) 1983, 1991, 1993
4b5930afcSjtc.\"	The Regents of the University of California.  All rights reserved.
561f28255Scgd.\"
661f28255Scgd.\" Redistribution and use in source and binary forms, with or without
761f28255Scgd.\" modification, are permitted provided that the following conditions
861f28255Scgd.\" are met:
961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright
1061f28255Scgd.\"    notice, this list of conditions and the following disclaimer.
1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
1261f28255Scgd.\"    notice, this list of conditions and the following disclaimer in the
1361f28255Scgd.\"    documentation and/or other materials provided with the distribution.
14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors
1561f28255Scgd.\"    may be used to endorse or promote products derived from this software
1661f28255Scgd.\"    without specific prior written permission.
1761f28255Scgd.\"
1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2161f28255Scgd.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2861f28255Scgd.\" SUCH DAMAGE.
2961f28255Scgd.\"
30b5930afcSjtc.\"     @(#)networks.5	8.1 (Berkeley) 6/5/93
3161f28255Scgd.\"
32be6fcce3Smaya.Dd July 14, 2018
3361f28255Scgd.Dt NETWORKS 5
347a1aea16Sgarbled.Os
3561f28255Scgd.Sh NAME
3661f28255Scgd.Nm networks
377f57f59aSfair.Nd Internet Protocol network name data base
3861f28255Scgd.Sh DESCRIPTION
3961f28255ScgdThe
40fa72f5deSfair.Nm
41abda4debSlukemfile is used as a local source to translate between Internet Protocol
42c747f256Sfair.Pq Tn IP
43abda4debSlukemnetwork addresses and network names (and vice versa).
44abda4debSlukemIt can be used in conjunction with the DNS,
45abda4debSlukem.\"and the
46abda4debSlukem.\".Tn NIS
47abda4debSlukem.\"maps
48abda4debSlukem.\".Sq networks.byaddr ,
49abda4debSlukem.\"and
50abda4debSlukem.\".Sq networks.byname ,
51abda4debSlukemas controlled by
52abda4debSlukem.Xr nsswitch.conf 5 .
53c747f256Sfair.Pp
54c747f256SfairWhile the
55c747f256Sfair.Nm
56c747f256Sfairfile was originally intended to be an exhaustive list of all
57c747f256Sfair.Tn IP
58c747f256Sfairnetworks that the local host could communicate with, distribution
59c747f256Sfairand update of such a list for the world-wide
60fa72f5deSfair.Tn Internet
61c747f256Sfair(or, indeed, for any large "enterprise" network) has proven to be
62c747f256Sfairprohibitive, so the Domain Name System
63c747f256Sfair.Pq Tn DNS
64c747f256Sfairis used instead, except as noted.
65c747f256Sfair.Pp
66c747f256SfairFor each
67c747f256Sfair.Tn IP
68c747f256Sfairnetwork a single line should be present with the following information:
69ae840bf4Slukem.Dl name network [alias ...]
70ae840bf4Slukem.Pp
71ae840bf4SlukemThese are:
72ae840bf4Slukem.Bl -tag -width network -offset indent -compact
73ff1595ffSlukem.It Em name
74ae840bf4SlukemOfficial network name
75ff1595ffSlukem.It Em network
76ae840bf4SlukemIP network number
77ff1595ffSlukem.It Em alias
78ae840bf4SlukemNetwork alias
79ae840bf4Slukem.El
8061f28255Scgd.Pp
8161f28255ScgdItems are separated by any number of blanks and/or tab characters.
8271e62d7dSlukemA
8371e62d7dSlukem.Dq \&#
8471e62d7dSlukemindicates the beginning of a comment; characters up to the end of
8561f28255Scgdthe line are not interpreted by routines which search the file.
8661f28255Scgd.Pp
8771e62d7dSlukemNetwork number may be specified in the conventional dot
8871e62d7dSlukem.Pq Dq \&.
8971e62d7dSlukemnotation using the
9061f28255Scgd.Xr inet_network 3
9161f28255Scgdroutine
92c747f256Sfairfrom the
93c747f256Sfair.Tn IP
94c747f256Sfairaddress manipulation library,
9561f28255Scgd.Xr inet 3 .
96c747f256SfairNetwork names may contain
97c747f256Sfair.Qq a
98c747f256Sfairthrough
99c747f256Sfair.Qq z ,
100c747f256Sfairzero through nine, and dash.
1017f57f59aSfair.Pp
1027f57f59aSfair.Tn IP
1037f57f59aSfairnetwork numbers on the
1047f57f59aSfair.Tn Internet
1057f57f59aSfairare generally assigned to a site by its Internet Service Provider
1067f57f59aSfair.Pq Tn ISP ,
1077f57f59aSfairwho, in turn, get network address space assigned to them by one of
1087f57f59aSfairthe regional Internet Registries (e.g. ARIN, RIPE NCC, APNIC).
1097f57f59aSfairThese registries, in turn, answer to the Internet Assigned Numbers
1107f57f59aSfairAuthority
1117f57f59aSfair.Pq Tn IANA .
1127f57f59aSfair.Pp
1137f57f59aSfairIf a site changes its ISP from one to another, it will generally
1147f57f59aSfairbe required to change all its assigned IP addresses as part of the
1157f57f59aSfairconversion; that is, return the previous network numbers to the previous
1167f57f59aSfair.Tn ISP ,
1177f57f59aSfairand assign addresses to its hosts from
1187f57f59aSfair.Tn IP
1197f57f59aSfairnetwork address space given by the new
1207f57f59aSfair.Tn ISP .
121*288b76eaSniaThus, it is best for a savvy network manager to configure their
122*288b76eaSniahosts for easy renumbering, to preserve their ability to easily
123*288b76eaSniachange their
1247f57f59aSfair.Tn ISP
1257f57f59aSfairshould the need arise.
12661f28255Scgd.Sh FILES
12761f28255Scgd.Bl -tag -width /etc/networks -compact
12861f28255Scgd.It Pa /etc/networks
12961f28255ScgdThe
130fa72f5deSfair.Nm
13161f28255Scgdfile resides in
13261f28255Scgd.Pa /etc .
13361f28255Scgd.El
13461f28255Scgd.Sh SEE ALSO
135c747f256Sfair.Xr getnetent 3 ,
136abda4debSlukem.Xr nsswitch.conf 5 ,
13742704c41Swiz.Xr resolv.conf 5 ,
138c747f256Sfair.Xr hostname 7 ,
139be6fcce3Smaya.Xr dhcpcd 8 ,
1407f57f59aSfair.Xr dhcpd 8 ,
14142704c41Swiz.Xr named 8
142c747f256Sfair.Rs
14347190e80Swiz.%R RFC 2317
144c747f256Sfair.%D March 1998
145c747f256Sfair.%T "Classless IN-ADDR.ARPA delegation"
146c747f256Sfair.Re
147c747f256Sfair.Rs
14847190e80Swiz.%R RFC 1918
149c747f256Sfair.%D February 1996
150c747f256Sfair.%T "Address Allocation for Private Internets"
151c747f256Sfair.Re
152c747f256Sfair.Rs
15347190e80Swiz.%R RFC 1627
154c747f256Sfair.%D July 1994
155c747f256Sfair.%T "Network 10 Considered Harmful"
156c747f256Sfair.Re
157c747f256Sfair.Rs
15847190e80Swiz.%R RFC 1519
159c747f256Sfair.%D September 1993
160c747f256Sfair.%T "Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy"
161c747f256Sfair.Re
162c747f256Sfair.Rs
16347190e80Swiz.%R RFC 1101
164c747f256Sfair.%D April 1989
165c747f256Sfair.%T "DNS Encoding of Network Names and Other Types"
166c747f256Sfair.Re
16761f28255Scgd.Sh HISTORY
16861f28255ScgdThe
16961f28255Scgd.Nm
17061f28255Scgdfile format appeared in
17161f28255Scgd.Bx 4.2 .
172