Wednesday, June 29, 2005

How to Set a Netmask under Solaris

3.9: How to Set a Netmask under Solaris

In order to include a permanent netmask on your Solaris machine, you
must make an entry in the /etc/netmasks file, in the following format:

network-address netmask

For example:

%%%% cat /etc/netmasks

The above would subnet the class B network,, into 254
subnets, from to
In 2.5.1 and below, only one entry for the entire class network is allowed
to support standard subnetting as specified in RFC-950
It is important to note that the entry in the left hand column must be
the original base network number (ie #.0.0.0 for a Class A, #.#.0.0
for a Class B and #.#.#.0 for a Class C), not the subnet.

The 2.6 kernel has changed to support VLSM. It is now possible to combine
the RFC-950 and RFC-1519 form of subnet masks in the netmasks file.
The network address should be the "SUBNETTED" address NOT the standard
network number based on the hosts ip address. (see man page for netmasks)

Here are a few examples:

A host address with a netmask of


A host address with a netmask of


See section 3.10 to get a better understanding of how to subnet by bit.


Post a Comment

<< Home