System Administration Guide: IP Services

/etc/inet/netmasks File

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

Note –

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

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

Example 5–3 /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 file does not exist, create it. 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 InterNIC (not the subnet number) and 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.