System Administration Guide: IP Services

Other Network Databases

The remaining network databases seldom need to be edited.

networks database

The networks database associates network names with network numbers, enabling some applications to use and display names rather than numbers. The networks database is based on information in the /etc/inet/networks file. This file contains the names of all networks to which your network connects through routers.

The Solaris installation program configures the initial networks database. However, if you add a new network to your existing network topology, you must update this database.

The networks(4) man page contains the complete syntax for /etc/inet/networks. The basic format is shown here:


network-name  network-number  nickname(s)  #comment
network-name

Official name for the network

network-number

Number assigned by the ISP or Internet Registry

nickname

Any other name by which the network is known

#comment

Any note that you want to append to an entry in the file

You must maintain the networks file. The netstat program uses the information in this database to produce status tables.

A sample /etc/networks file follows.


Example 9–8 /etc/networks File


#ident	"@(#)networks	1.4	92/07/14 SMI"	/* SVr4.0 1.1	*/
#
# The networks file associates Internet Protocol (IP) network
# numbers with network names. The format of this file is:
#
# 	network-name		 	 network-number		 	 nicnames . . .

# The loopback network is used only for intra-machine communication
loopback		 	 127

#
# Internet networks
#
arpanet     10	   arpa  # Historical
#
# local networks

eng   192.168.9 #engineering
acc   192.168.5 #accounting
prog  192.168.2 #programming