background image
Subnetting
147
Subnet Masks
For the subnet address scheme to work, every machine on the network must
know which part of the host address will be used as the subnet address. This
is accomplished by assigning a subnet mask to each machine. A subnet
mask is a 32-bit value that allows the recipient of IP packets to distinguish
the network ID portion of the IP address from the host ID portion of the
IP address.
The network administrator creates a 32-bit subnet mask composed of 1s
and 0s. The 1s in the subnet mask represent the positions that refer to the
network or subnet addresses.
Not all networks need subnets, meaning they use the default subnet mask.
This is basically the same as saying that a network doesn't have a subnet
address. Table 3.4 shows the default subnet masks for Classes A, B, and C.
These cannot change. In other words, you can't make a Class B subnet mask
read 255.0.0.0. If you try, the host will read that address as invalid and usu-
ally won't even let you type it in. For a Class A network, you can't change
the first byte in a subnet mask; it must read 255.0.0.0 at a minimum. Simi-
larly, you cannot assign 255.255.255.255, as this is all 1s--a broadcast
address. A Class B address must start with 255.255.0.0, and a Class C has
to start with 255.255.255.0.
Subnetting Class C Addresses
There are many different ways to subnet a network. The right way is the way
that works best for you. First I'll show you how to use the binary method,
and then we'll look at an easier way to do the same thing.
In a Class C address, only 8 bits are available for defining the hosts.
Remember that subnet bits start at the left and go to the right, without
T A B L E 3 . 4
Default Subnet Mask
Class
Format
Default Subnet Mask
A
network.node.node.node
255.0.0.0
B
network.network.node.node
255.255.0.0
C
network.network.network.node
255.255.255.0
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com