FTC disclaimer: This post contains affiliate links and I will be compensated if you make a purchase after clicking on my link.
The concept of Classful addressing was introduced when it is needed to define the address space in IPv4.
As we know that address space is divided into two parts: Network and Host.
The network part of the IP address is also known as the network ID, and the host part is known as the host ID.
In IPv4, we need to know how address space is allocated. Also, how much address is available for the host.
Classful addressing is classified under five heads with a fixed number of a network ID and host ID.
Nowadays, Classful addressing is replaced with classless addressing, but classful addressing is still relevant to understand the network.
In other words, we can say that classless addressing is an extended part of classful addressing.
Here, we will only focus on classful addressing. And, we will learn how it helps in dividing the network and allocating the address space to hosts.
What is Classful addressing?
Classful addressing is the first addressing scheme that was adopted as a part of Internet Protocol.
The Classful addressing network architecture was first started to use on the Internet in the year 1981. After introducing Classless Inter-Domain Routing (CIDR) in 1993, the Classful addressing scheme is replaced with a Classless addressing scheme.
As we know, the IP address consists of 32-bits, and it is divided into four parts separated with dots: part1.part2.part3.part4.
Each part of the IP address consists of 8-bits (1 byte), and in total, it is 4 byte. To understand better, you can read my comprehensive guide on bits and byte.
One byte of IP address is also termed as an octet. So, byte or octet are used interchangeably in IPv4.
Also, it has to be clear that Classful and Classless addressing architecture is used in Internet Protocol version 4 (IPv4), not in IPv6.
Also, IPv4 addresses are expressed in dotted decimal notation or binary notation, which can be further converted into hexadecimal notation.
Further, the 4 part of the IP address is divided into two parts: A network ID and Host ID, which plays a significant role in the IP address classes.
Types of Classful Address
The Classful address is divided into five types: Class A, Class B, Class C, Class D, Class E.
This classification is known as Classful addressing or classes of IP address in IPv4.
The first three-class that are Class A, B and C are used for public addressing in which the communication between source and destination is always one-to-one. It means that when the data is sent from the source, then it will be destined to a single host in a network.
The Class D and Class E are in the reserved category, where Class D is used for multicast, and Class E is reserved for future use only.
In IPv4, the first part of Class A, B, and C are known as Network ID, and the remaining second part is known as the Host ID.
The Network ID always represents the network in a particular location, and the Host ID represents the number of hosts or nodes in that specific network.
The address space in Class A, B, and C is divided into a fixed number of blocks of IP address. Further, it also defines the specified number of hosts in a network.
Network and Host part in Classful Addressing
Let look into how the first three class are divided into network part and host part.
In Class A, the first octet or first byte of the IP address is part of network ID (in short, Net-ID), and the remaining three octet or 3 bytes is part of host ID (in short, host-ID).
In Class B, the first two octet or first two-byte is allocated to the network ID, and the remaining two-octet or two-byte is for the host ID.
And, in Class C, the first three octets or first three bytes are allocated to the network ID, and the one octet or one byte is for the host ID.
Now, let’s move on to know each class and learn what does it means.
Type of Classful Address
As we have discussed that the first byte or first octet of Class A is allocated to network ID, which means that the first 8-bits of IP address is for network ID.
Here, some part of the first byte is allocated to network ID, not the whole part. So, in binary notation, the first bit of the first byte of the IP address is turned zero(0), and the remaining seven bits are turned to one.
The demonstration of Class A IP address in binary notation is shown below.
01111111 00000000 00000000 00000000
Now, we have to convert the binary digit into decimal.
01111111 = 0*2^7 + 1*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 0+64+32+16+8+4+2+1 = 127.
When we include zero, the total value would be 128, which varies from 0 to 127.
The remaining 3 bytes, which is allocated to the host ID is equal to 24-bits. So, when we calculate the total number of hosts, then the value would be 16,777,216.
The Class B IP address is divided equally, which means the first two octets for network ID and the remaining two octets will be host ID.
In Class B IP address, the second bit of the first octet will be zero (0), and the remaining bits will be one (1).
The representation of Class B in binary notation is as below.
10111111 11111111 00000000 00000000
Let calculate the total value of the first byte of the Class B address.
10111111 = 1*2^7 + 0*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 128+0+32+16+8+4+2+1 = 191.
So, the first octet value varies from 128 to 191, and the second octet value ranges from 0 to 255.
Therefore, the range of Class B IP address is from 22.214.171.124 to 126.96.36.199.
Now, the available address for the host will be 2^16, which is equal to 65,536.
In Class C IP address, the first three-byte or three octets is allocated to the network ID, and the remaining 1 byte is for the host ID.
Here, the 3rd bit of the first octet is turned zero (0) and the remaining equal to one (1). So, the display of Class C in binary notation is as below.
11011111 11111111 11111111 00000000
Now, we can calculate the value of the first byte.
11011111 = 1*2^7 + 1*2^6 + 0*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 128+64+0+16+8+4+2+1 = 223.
So, the first-byte range will be from 192 to 223.
Therefore, the range of Class C IP addresses in dotted-decimal notation is from 192.0.0.0 to 188.8.131.52.
The total number of the available host will be 2^8, which is equal to 256.
The Class D IP address is not divided into network ID and host ID, which means it is not used as a public address.
The Class D IP addresses are used for multitasking. So, it has single blocks of IP address.
In Class D, the fourth bit of the first byte is set to zero (o), and the remaining are assigned to one (1). The Class D binary notation can be expressed as below.
11101111 00000000 00000000 00000000
Let’s calculate the value of the first byte.
11101111 = 1*2^7 + 1*2^6 + 1*2^5 + 0*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 128+64+32+0+8+4+2+1 = 239.
Therefore, the range of Class D IP addresses is from 184.108.40.206 to 220.127.116.11.
Like Class D, the Class E address is also not divided into network ID and host ID. It is present in a single block and is reserved for future use only.
In Class E, all first four bits of the first byte of the IP address is set to one (1). So, the binary notation will look like as below.
11111111 00000000 00000000 00000000
Now, let calculate the value of the first byte.
11110111 = 1*2^7 + 1*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 128+64+32+16+8+4+2+1 = 255
So, the range of Class E IP addresses will be from 240.0.0.0 to 255.255.255.255.
What are the disadvantages of Classful addressing?
In Classful addressing, Class A and Class B contain big blocks of IP addresses. If any organization doesn’t require a complete set of hosts, then the remaining unused addresses will go in vain.
If we consider Class C, then the available number of hosts is too small to serve any big organization.
Also, a big chunk of IP address is available in Class D and E, which is also considered wastage of addresses.
The main problem with Classful addressing is that we are not serving our customers as per their requirements. Instead, we allocate them with fixed blocks of IP address, which may turn out to be the wastage of IP address.
The concept of Subnetting and Supernetting was introduced to compensate for the wastage of address.
In Subnetting, it further divides the Classes of IP address into multiple networks by stealing some bits of the host. The subnetting method work is to convert the big networks into smaller networks.
Unlike Subnetting, the Supernetting concept is to combined small networks into big networks to fulfill the requirement. For instance, the two blocks of Class C IP address can be combined to form one bigger Class C network.
To know more about Subnetting and its link with Classes of IPv4, you can follow the guide on understanding Subnetting and Subnet Mask.
Classful addressing is the first concept introduced in IPv4 to classify IP addresses into different Classes.
Class A, B, C is used for public addressing, and Class D and E is used as an internal address or private address.
Class A and B cover the big chunk of IP address, whereas Class C doesn’t have enough IP addresses to serve the prominent organization.
The Subnetting and Supernetting concept was introduced to minimize the wastage of IP addresses.