IPv4 Classful Allocation

Originally (before CIDR) the IPv4 address space was divided into 5 ranges, based on the first few bits of the address. These were called address classes (or "classful allocation"). You still sometimes see references to this scheme, such as referring to multicast addresses as "class D".

Blocks of IPv4 addresses are often described in what is now called "CIDR notation". This consists of the bit pattern in the first n bits, followed by a slash, followed by the value of n. For example, the block of addresses from 10.0.0.0 to 10.255.255.255 is called "10/8". You might sometimes see the entire first address of the block used instead of just the value of the first n bits, e.g. "10.0.0.0/8". The block of addresses from 192.168.0.0 to 192.168.255.255 is called "192.168/16" (or "192.168.0.0/16").

Class A included addresses where the first bit was 0, which is to say addresses 0.0.0.0 to 127.255.255.255. Allocations from this class were made in "/8" blocks, each of which contained 224 (16,777,216) addresses. These blocks are referred to by the contents of the first 8 bits of each address, followed by "/8". (e.g. "10/8" for 10.0.0.0 to 10.255.255.255). There were a total of 128 "/8" blocks in class A, which is 50% of the total IPv4 address space. Only very large organizations that needed more than 65,536 addresses (such as AT&T and HP) received a "/8" block. The U.S. government received 14 "/8" blocks.

Class B included addresses where the first 2 bits were "102", which is to say addresses 128.0.0.0 to 191.255.255.255. Allocations from this class were made in "/16" blocks, each of which contained 216 (65,536) addresses. These blocks are referred to by the contents of the first 16 bits of each address, followed by "/16". (e.g. "130.34/16" for 130.34.0.0 to 130.34.255.255). There were a total of 16,384 "/16" blocks in class B, which is 25% of the total IPv4 address space. Medium size organizations (ones who needed fewer than 65,536, but more than 256 addresses) received a "/16" block from class B.

Class C included addresses where the first 3 bits were "1102", which is to say addresses 192.0.0.0 to 223.255.255.255. Allocations from this class were made in "/24" blocks, each of which contained 28 (256) addresses. These blocks are referred to by the contents of the first 24 bits of each address, followed by "/24". (e.g. "200.34.56/16" for 200.34.56.0 to 200.34.56.255). There were a total of 2,097,152 "/24" blocks in class C, which is 12.5% of the total IPv4 address space. Small organizations (ones who needed fewer than 256 addresses) received a "/24" block from class C.

Class D included addresses where the first 4 bits were "11102", which is to say addresses 224.0.0.0 to 239.255.255.255. There were a total of 268,435,456 addresses in class D, which is 6.25% of the total IPv4 address space. These addresses were (and still are) reserved for multicast.

Class E included addresses where the first 4 bits were "11112", which is to say addresses 240.0.0.0 to 255.255.255.255. There were a total of 268,435,456 addresses in class E, which is 6.25% of the total IPv4 address space.These addresses were (and still are) reserved for "future use". It would be very difficult, and takes years of reconfiguring routers and network software, to use these addresses for normal public address allocation.

Using classful allocation, anyone could determine the correct "subnet mask" for any address, just by looking at the first few bits. The subnet mask for all Class A addresses was 255.0.0.0, the subnet mask for all Class B addresses was 255.255.0.0, and the subnet mask for all Class C addresses was 255.255.255.0. After CIDR was introduced, there was no way to determine the correct subnet mask just by looking at an address.