System Administration Guide: IP Services

/etc/inet/netmasks File

If your network runs NIS or LDAP, the servers for these name services maintain netmasks databases. For networks that use local files for the name service, this information is maintained in the /etc/inet/netmasks file.

Note –

For compatibility with BSD-based operating systems, the /etc/netmasks file is a symbolic link to /etc/inet/netmasks.

The following example shows the /etc/inet/netmasks file for a class B network.

Example 10–4 /etc/inet/netmasks File for a Class B Network

 # The netmasks file associates Internet Protocol (IPv4) address
 # masks with IPv4 network numbers.
 # 	network-number	netmask
 # Both the network-number and the netmasks are specified in
 # “decimal dot” notation, e.g:

If the /etc/netmasks file does not exist, create it with a text editor. Use the following syntax:

network-number	netmask-number

Refer to the netmasks(4) man page for complete details.

When creating netmask numbers, type the network number that is assigned by the ISP or Internet Registry (not the subnet number) and the netmask number in /etc/inet/netmasks. Each subnet mask should be on a separate line.

For example:

You can also type symbolic names for network numbers in the /etc/inet/hosts file. You can then use these network names instead of the network numbers as parameters to commands.