1.\" $NetBSD: networks.5,v 1.14 2001/09/11 01:01:58 wiz 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 November 17, 2000 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.Dl name network [alias ...] 74.Pp 75These are: 76.Bl -tag -width network -offset indent -compact 77.It Em name 78Official network name 79.It Em network 80IP network number 81.It Em alias 82Network alias 83.El 84.Pp 85Items are separated by any number of blanks and/or tab characters. 86A 87.Dq \&# 88indicates the beginning of a comment; characters up to the end of 89the line are not interpreted by routines which search the file. 90.Pp 91Network number may be specified in the conventional dot 92.Pq Dq \&. 93notation using the 94.Xr inet_network 3 95routine 96from the 97.Tn IP 98address manipulation library, 99.Xr inet 3 . 100Network names may contain 101.Qq a 102through 103.Qq z , 104zero through nine, and dash. 105.Pp 106.Tn IP 107network numbers on the 108.Tn Internet 109are generally assigned to a site by its Internet Service Provider 110.Pq Tn ISP , 111who, in turn, get network address space assigned to them by one of 112the regional Internet Registries (e.g. ARIN, RIPE NCC, APNIC). 113These registries, in turn, answer to the Internet Assigned Numbers 114Authority 115.Pq Tn IANA . 116.Pp 117If a site changes its ISP from one to another, it will generally 118be required to change all its assigned IP addresses as part of the 119conversion; that is, return the previous network numbers to the previous 120.Tn ISP , 121and assign addresses to its hosts from 122.Tn IP 123network address space given by the new 124.Tn ISP . 125Thus, it is best for a savvy network manager to configure his 126hosts for easy renumbering, to preserve his ability to easily 127change his 128.Tn ISP 129should the need arise. 130.Sh FILES 131.Bl -tag -width /etc/networks -compact 132.It Pa /etc/networks 133The 134.Nm 135file resides in 136.Pa /etc . 137.El 138.Sh SEE ALSO 139.Xr getnetent 3 , 140.Xr nsswitch.conf 5 , 141.Xr resolv.conf 5 , 142.Xr hostname 7 , 143.Xr dhclient 8 , 144.Xr dhcpd 8 , 145.Xr named 8 146.Rs 147.%R RFC 148.%N 2317 149.%D March 1998 150.%T "Classless IN-ADDR.ARPA delegation" 151.Re 152.Rs 153.%R RFC 154.%N 1918 155.%D February 1996 156.%T "Address Allocation for Private Internets" 157.Re 158.Rs 159.%R RFC 160.%N 1627 161.%D July 1994 162.%T "Network 10 Considered Harmful" 163.Re 164.Rs 165.%R RFC 166.%N 1519 167.%D September 1993 168.%T "Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy" 169.Re 170.Rs 171.%R RFC 172.%N 1101 173.%D April 1989 174.%T "DNS Encoding of Network Names and Other Types" 175.Re 176.Sh HISTORY 177The 178.Nm 179file format appeared in 180.Bx 4.2 . 181