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
150.101.0.0 255.255.255.0

The above would subnet the class B network, 150.101.0.0, into 254
subnets, from 150.101.1.0 to 150.101.254.0.
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 192.188.206.65 with a netmask of 255.255.255.224

/etc/netmasks

192.188.206.64 255.255.255.224

A host address 172.31.16.193 with a netmask of 255.255.255.192

/etc/netmasks

172.31.16.192 255.255.255.192

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

0 Comments:

Post a Comment

<< Home