background image
IP Addressing and Subnetting 239
To fully appreciate what the mask is used for, you must understand the format of an IP address.
Consider Figure 5-18, which shows the format of Class A, B, and C addresses when no
subnetting is used.
Figure 5-18
Address Formats, When No Subnetting Is Used
Notice that there are only two portions of the address--namely, the network part and the host
part. The only variable is whether the address in question is in a Class A, B, or C network.
The default mask used with each class of network defines the number of host bits. The mask
has binary 0 for each corresponding bit position in the address that is considered to be part of
the host portion of the address. Similarly, it appears that the mask implies the size and position
of the network part of the address; however, the network part is actually already implied by the
class of network. Table 5-12 summarizes the default masks and reflects the sizes of the two parts
of an IP address.
When subnetting, a third part of an IP address appears--namely, the subnet part of the address.
This field is created by "stealing" bits from the host part of the address. Figure 5-19 shows the
format of addresses when subnetting.
Three portions of the address now exist: network, subnet, and host. The network part size is
determined by the class (A, B, or C). The host part is determined by the subnet mask in use--
the number of bits of value 0 in the subnet mask define the number of host bits. The remaining
bits define the size of the subnet part of the address. For instance, a mask of 255.255.255.240,
used with a Class C network, implies four host bits. As shown in Figure 5-19, a Class C network
has 24 network bits. (The mask can be more easily converted to decimal using the table in
Appendix B.) The mask has four binary 0s at the end, implying 4 host bits.
Table 5-12
Class A, B, and C Networks--Network and Host Parts and Default Masks
Class of Address
Size of Network
Part of Address, in
Bits
Size of Host Part of
Address, in Bits
Default Mask for
Each Class of
Network
A
8
24
255.0.0.0
B
16
16
255.255.0.0
C
24
8
255.255.255.0
Network
Host
Class A
8
24
Network
Host
Class B
16
16
Host
Network
Class C
8
24
ch05.fm Page 239 Monday, March 20, 2000 5:06 PM