Classful IP Networks: An Introduction to IP Address Classes

When the concept of subnetting comes up, there is a need to first establish what networks were like before the Internet Standard Subnetting Procedure was introduced in RFC950. Prior to the use of subnet masks, networked devices made assumtions about the network and host portion of the address. This process by which these assumptions is made was defined in RFC791

Addresses are fixed length of four octets (32 bits). An address
begins with a network number, followed by local address (called the
“rest” field). There are three formats or classes of internet
addresses: in class a, the high order bit is zero, the next 7 bits
are the network, and the last 24 bits are the local address; in
class b, the high order two bits are one-zero, the next 14 bits are
the network and the last 16 bits are the local address; in class c,
the high order three bits are one-one-zero, the next 21 bits are the
network and the last 8 bits are the local address.

If that leaves you a bit confused, you are in the right place. This article works through the concept of the IP Address Class. Readers should gain the understanding required to decipher things like what is meant by Class A IP Address. The first thing the excerpt states is that IP addresses are in the form of x.x.x.x, where x is a number between 0 and 255. There are some special rules, beyond the scope of this article, that need to be understood as addresses are assigned to devices.

In the example of x.x.x.x, each “x” is what we call an octet (group of eight [bits]). The first octet is special because it defines the class of the address. Specifically, the first three bits of the first octet will specify the class an IP address belongs to. Understanding this requires looking at the first octet as a binary number.

First Octet Binary Value to IP Class Mapping

0ddddddd = Class A
10dddddd = Class B
110ddddd = Class C

It is possible to use this mapping to determine the decimal values of the IP address ranges that fall into each category. To do so, a binary digits of 0 would be used for the bottom of the range and a binary digits of 1 for the top of the range.

0ddddddd = Class A -> 00000000 (0)    01111111 (127)
10dddddd = Class B -> 10000000 (128)  10111111 (191)
110ddddd = Class C -> 11000000 (192)  11011111 (223)

I like to memorize the class-to-binary mapping by thinking about where the first 0 is found. If the first zero is in the first bit position, it is Class A. If the first binary 0 is in the second bit position, it is Class B. Class C would have the first 0 in the third position.

So I remember [Class] A, B, C is easy as 1, 2, 3. (An old song by the Jackson 5)

Using this concept, combined with the value of the first octet, the class of an IP address can be determined. For example, an IP address of 192.0.2.200 is a class C address. This is because 192, the value of the first octet, falls into the range that identifies it as class C.

This class of address matters because, prior to subnetting, it identifies what portion of the IP address is part of the network and what portion is the host. A class C address would tell the networked device that the first three octets identify the network and the last octet identifies the host. So in the example of 192.0.2.200, the network is 192.0.2 and the host is 200. Class A addresses would only have one octet that indicates the network, while a class B address has two octets indicating the network.

N = Network
H = Host

Class A -> 00000000 (0)    01111111 (127) -- N.H.H.H
Class B -> 10000000 (128)  10111111 (191) -- N.N.H.H
Class C -> 11000000 (192)  11011111 (223) -- N.N.N.H

Why do we care?

Asking why this matters is a perfectly valid question. Since RFC950 described the use of subnet masks a long time ago, it seems unnecessary to even care about Classful Networks. However, the classful network is the reference point for the subnetting process that is also defined in RFC950. For example, a requirement may specify the use 5 bits of subnetting. The resulting subnet mask would be very different when 5 bits are subnetted from a Class C network as opposed to a Class A network. This has an impact on the number of useable IP addresses per subnet and the number of assignable subnets.

Conclusion

Classful Addressing is an old concept. While it seems obsolete, it is still a necessary part of the learning process. Understanding the binary rules for address classes should help store this knowledge in long-term memory. In any case, solidifying this knowledge is an important prerequisite to understanding subnetting and other key components of IP networking.

About Paul Stewart, CCIE 26009 (Security)

Paul is a Network and Security Engineer, Trainer and Blogger who enjoys understanding how things really work. With over 15 years of experience in the technology industry, Paul has helped many organizations build, maintain and secure their networks and systems.
This entry was posted in CCNA, Certification, General, Network, Technology and tagged , , . Bookmark the permalink.