135.109.0.0001010100000000000000000 000011110.0.15.42Host ID
F13us01
Figure 13-1 The subnet mask separates the host ID and the network ID.
Classful IP Addressing
IP addresses are organized into classes that help define the size of the network being
addressed, a system referred to as classful IP addressing. Five different classes of IP
addresses define different-sized networks that are capable of holding varying numbers
of hosts.
Classful IP addressing is based on the structure of the IP address and provides a sys-
tematic way to differentiate network IDs from host IDs. As you learned earlier, there
are four numerical segments of an IP address, ranging from 0 to 255. Here, those seg-
ments are represented as w.x.y.z. Based on the value of the first octet (w), IP addresses
are categorized into the five address classes listed in Table 13-1.
Table 13-1 IP Address Classes
Number of Range of Available Network Class Network IDFirst OctetSegmentsAvailable Hosts Subnet MaskA w.0.0.0 1–126 126 16,777,214 255.0.0.0
B w.x.0.0 128–191 16,384 65,534 255.255.0.0
C w.x.y.0 192–223 2,097,152 254 255.255.255.0
D N/A 224–239 N/A N/A N/A
E N/A 240–255 N/A N/A N/A
Classes A, B, and C are available for registration by public organizations. Actually, most
of these addresses were snapped up long ago by major companies and Internet service
providers (ISPs), so the actual assignment of an IP address to your organization will
likely come from your chosen ISP. Classes D and E are reserved for special use.
The address class determines the subnet mask used, and therefore determines the divi-
sion between the network ID and the host ID. For class A, the network ID is the first
octet in the IP address (for example, the 98 in the address 98.162.102.53 is the network
ID). For class B, it is the first two octets; and for class C, it is the first three octets. The
remaining octets not used by the network ID identify the host ID.
!
Exam Tip Remember the IP address ranges that fall into each class and the default sub-net mask for each class. This information not only helps to determine how a classful IP addressing scheme will apply to a situation, but also how to customize a scheme using the classless method (discussed next).
Classless Interdomain Routing (CIDR)
In the classful method of IP addressing, the number of networks and hosts available for
a specific address class is predetermined by the default subnet mask for the class. As a
result, an organization that is allocated a network ID has a single fixed network ID and
a specific number of hosts. With the single network ID, the organization can have only
one network connecting its allocated number of hosts. If the number of hosts is large,
the network cannot perform efficiently. To solve this problem, the concept of classless
interdomain routing (CIDR) was introduced.
CIDR allows a single classful network ID to be divided into smaller network IDs. The
idea is that you take the default subnet mask used for the class to which your IP
address range belongs, and then borrow some of the bits used for the host ID to use
as an extension to the network ID, creating a custom subnet mask.