netmasks

- network mask database

Synopsis

/etc/inet/netmasks

/etc/netmasks

Description

The netmasks file contains network masks used to implement IP subnetting. It
supports both standard subnetting as specified in RFC-950 and variable length subnetting as
specified in RFC-1519. When using standard subnetting there should be a single
line for each network that is subnetted in this file with the
network number, any number of SPACE or TAB characters, and the network
mask to use on that network. Network numbers and masks may be
specified in the conventional IP `.' (dot) notation (like IP host addresses,
but with zeroes for the host part). For example,

128.32.0.0 255.255.255.0

can be used to specify that the Class B network 128.32.0.0 should
have eight bits of subnet field and eight bits of host field,
in addition to the standard sixteen bits in the network field.

When using variable length subnetting, the format is identical. However, there should
be a line for each subnet with the first field being
the subnet and the second field being the netmask that applies to
that subnet. The users of the database, such as ifconfig(1M), perform a
lookup to find the longest possible matching mask. It is possible to
combine the RFC-950 and RFC-1519 form of subnet masks in
the netmasks file. For example,

can be used to specify different netmasks in different parts of the
128.32.0.0 Class B network number. Addresses 128.32.27.0 through 128.32.27.255 have a subnet
mask with 28 bits in the combined network and subnet fields
(often referred to as the subnet field) and 4 bits in the
host field. Furthermore, addresses 128.32.64.0 through 128.32.64.63 have a 26 bits in
the subnet field. Finally, all other addresses in the range 128.32.0.0 through
128.32.255.255 have a 24 bit subnet field.